Anytime you need to display a piece of content—like an image with an optional caption, consider using a figure.
Here is the related HTML
<figure class="figure">
<img src="..." class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption">A caption for the above image.</figcaption>
</figure>
A figure is made of an image, a caption. On the advanced properties, you can change the alignment of the caption.
Label | Name | Description |
---|---|---|
Caption | jcr:title |
This optional caption will be display after the image |
Image | image |
The image to display |
Caption alignment | captionAlignment |
This advanced properties can change the alignment of the caption. Value can be Start (default), Center or End |
Here is the definition of a figure
[bootstrap5mix:figureAdvancedSettings] mixin
extends = bootstrap5nt:figure
itemtype = content
- captionAlignment (string, choicelist[resourceBundle]) = 'text-start' autocreated indexed=no < 'text-start', 'text-center', 'text-end'
[bootstrap5nt:figure] > jnt:content, bootstrap5mix:component, bootstrap5mix:imageAdvanced, mix:title
There are a few advanced settings for the image
Here is the definition of the image
[bootstrap5mix:imageAdvancedSettings] mixin
extends = bootstrap5mix:imageAdvanced
itemtype = content
- imageClass (string) indexed=no
- imageStyle (string) indexed=no
- imageID (string) indexed=no
- responsive (boolean) = 'true' indexed=no
- thumbnails (boolean) = 'false' indexed=no
- align (string, choicelist[resourceBundle]) = 'default' autocreated indexed=no < 'default', 'start', 'end', 'center'
- alt (string) i18n
- borderRadius (string, choicelist[resourceBundle]) = 'rounded-0' autocreated indexed=no < 'rounded','rounded-top', 'rounded-end', 'rounded-bottom','rounded-start','rounded-circle','rounded-pill','rounded-0'
- borderRadiusSize (string, choicelist[resourceBundle]) = 'default' < 'default','rounded-0','rounded-1','rounded-2','rounded-3'
[bootstrap5mix:imageAdvanced] > bootstrap5mix:image mixin
[bootstrap5mix:image] mixin
- image (weakreference, picker[type='image']) < 'jmix:image'