@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
24 lines (13 loc) • 1.44 kB
Markdown
# kol-image
<!-- Auto Generated Below -->
## Overview
The **Image** component renders an image with support for responsive loading via `srcset` and `sizes`, lazy loading, and accessible alternative text.
## Properties
| Property | Attribute | Description | Type | Default |
| ------------------- | ---------- | ----------------------------------------------------------------------------- | -------------------------------- | ----------- |
| `_alt` _(required)_ | `_alt` | Sets the alternative text of the image. | `string` | `undefined` |
| `_loading` | `_loading` | Defines the loading mode for the image. | `"eager" \| "lazy" \| undefined` | `undefined` |
| `_sizes` | `_sizes` | Defines the image sizes for different screen resolutions, supporting _srcset. | `string \| undefined` | `undefined` |
| `_src` _(required)_ | `_src` | Sets the image `src` attribute to the given string. | `string` | `undefined` |
| `_srcset` | `_srcset` | Sets a list of source URLs with widths of the images. | `string \| undefined` | `undefined` |
----------------------------------------------