Figure

A media container for a complimentary graphic within an article.

Twig Usage
{% set image %}
  {% include '@bolt-elements-image/image.twig' with {
    attributes: {
      src: '/images/placeholders/square.jpg',
      loading: 'lazy',
    }
  } only %}
{% endset %}
{% include '@bolt-elements-figure/figure.twig' with {
  content: image,
  caption: 'Figure caption.'
} only %}
Schema
Prop Name Description Type Default Value Option(s)
attributes

A Drupal-style attributes object with extra attributes to append to this element.

object
content

Pass in any renderable content. The recommended content types are image, video, table or icon

string , object , array
caption

Caption for the figure.

string , object , array
Install Install
npm install @bolt/elements-figure
Dependencies @bolt/core