Styling API
You can use the following properties to style Image
with Tailwind:
Property | Description |
---|---|
class | Class for the <figure> element |
imageClass | Class for the <img> element |
captionClass | Class for the <figcaption> element |
Functionality API
You can use these properties to adjust the Image
’s output.
Property | Type | Description |
---|---|---|
src | string | Source of the image. This should be an absolute url from your project root. |
alt | string | Alt text |
caption | string | Caption text |
formats | array | Image formats to create and optimize for. |
widths | array | srcset sizes to create and optimize for. |