image
July 20, 2018 ยท View on GitHub
Use this block for creating an independent image.
Overview
Custom fields of the block
| Field | Type | Description |
|---|---|---|
| title | String | Tooltip content. |
| alt | String | The alternate text of the image. |
| url | String | Image address. |
| width | Number | The width of the image in pixels. |
| height | Number | The height of the image in pixels. |
| content | BEMJSON | Image content in SVG format. |
Block description
The block is used to create an independent image that is adapted for specific output modes (screen reader, print, programs for people with limited physical capacities).
Custom fields of the block
title field
Type: String.
Specifies the tooltip content.
{
block : 'image',
url : 'https://img-fotki.yandex.ru/get/16159/259818507.0/0_130be6_4116d8e7_S',
title : 'Find detailed description on bem.info'
}
alt field
Type: String.
Specifies the alternate text of the image. The text provides useful information about the image if a browser cannot display it for some reasons.
{
block : 'image',
url : 'https://img-fotki.yandex.ru/get/6737/259818507.0/0_130be4_7315e1e0_S',
alt : 'BEM'
}
url field
Type: String.
Specifies the address for the image uploading.
{
block : 'image',
url : 'https://img-fotki.yandex.ru/get/5405/259818507.0/0_130be5_948d59aa_S'
}
width field
Type: Number.
Specifies the image width in pixels.
{
block : 'image',
url : 'https://img-fotki.yandex.ru/get/17848/259818507.0/0_12ab32_a798a820_X5L',
width : 200,
height : 100
}
height field
Type: Number.
Specifies the image height in pixels.
{
block : 'image',
url : 'https://img-fotki.yandex.ru/get/17848/259818507.0/0_12ab32_a798a820_X5L',
width : 100,
height : 200
}
content field
Type: BEMJSON.
Specifies content of the image in SVG format.
{
block : 'image',
content : { html: '<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16"><path d="M13.5.5l-8 12L1.7 8l-1 1.6L5.6 15l9.1-13.4z"/></svg>' }
}