Figure

A media container for a complimentary graphic within an article.

Published Last updated: 5.0.0 Change log Github NPM
Twig Usage
{% set image %}
  {% include '@bolt-elements-image/image.twig' with {
    attributes: {
      src: '/images/placeholders/500x500.jpg',
      loading: 'lazy',
    }
  } only %}
{% endset %}
{% include '@bolt-components-figure/figure.twig' with {
  media: {
    content: image
  },
  caption: 'Figure caption.'
} only %}
Schema
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case.
Prop Name Description Type Default Value Option(s)
attributes

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

object
media

Pass in any renderable media content via the media.content prop.

object
    • content

      Figure media content, e.g image, icon, video, etc.

caption

Caption for the figure.

string , object , array
Install Install
npm install @bolt/components-figure
Dependencies @bolt/core-v3.x @bolt/element @bolt/lazy-queue