Image
Component that render image with many features.
Import
js
import { MpImage } from '@mekari/pixel3'
Playground
API
MpImage
Props
Events
Slots
Name | Type | Default |
---|---|---|
id | string | - |
src | string | - |
alt | string | - |
layout | intrinsic | fixed | fill | responsive | intrinsic |
width | number | - |
height | number | - |
sizes | string | - |
src-placeholder | string | data:image/gif;base64, |
srcset | string | - |
type-srcset | string | - |
media-srcset | string | - |
max-srcset | number | 5 |
object-fit | fill | contain | cover | none | scale-down | fill |
object-position | string | - |
error-text | string | - |
is-lazy | boolean | true |
is-show-loading | boolean | true |
Usage
With Layout
With Various State
Accessibility
- Don't forget to use
alt
attributes. - Value of
alt
should be clear and has context. for ex: alt="A logo of Mekari"