Yamada UIにスターをあげる

スター
Yamada UIYamada UIv1.6.3

Picture

Pictureは、picture要素を使用し、異なる表示やデバイスのシナリオに応じて代替の画像を提供するコンポーネントです。

ソース@yamada-ui/image

Props

PictureProps

crossOrigin

説明

The key used to set the crossOrigin on the HTMLImageElement into which the image will be loaded. This tells the browser to request cross-origin access when trying to download the image data.

タイプ

"" | "anonymous" | "use-credentials"

enableSorting

説明

If true, the sources will be sorted by the minW and maxW properties.

タイプ

boolean

デフォルト

true

fallback

説明

Fallback image src or element to show if image is loading or image fails.

タイプ

type ONLY_FOR_FORMAT = | string | ReactElement<any, string | JSXElementConstructor<any>>

fallbackStrategy

説明

- beforeLoadOrError: loads the fallbackImage while loading the src. - onError: loads the fallbackImage only if there is an error fetching the src.

タイプ

"onError" | "beforeLoadOrError"

デフォルト

beforeLoadOrError

fit

説明

The CSS object-fit property.

タイプ

UIValue<ObjectFit>

ignoreFallback

説明

If true, opt out of the fallbackSrc logic and use as img.

タイプ

boolean

デフォルト

false

loading

説明

The image loading attribute.

タイプ

"eager" | "lazy"

onError

説明

A callback for when there was an error loading the image src.

タイプ

ReactEventHandler<HTMLImageElement>

onLoad

説明

A callback for when the image src has been loaded.

タイプ

ReactEventHandler<HTMLImageElement>

pictureProps

説明

The props for the picture element.

タイプ

HTMLUIProps<"picture">

size

非推奨

説明

The CSS box-size property.

非推奨

Use boxSize instead.

タイプ

UIValue<number | "px" | "2xl" | "lg" | "md" | "sm" | "xl" | ({} & string) | "0.5" | "1" | "1.5" | "2" | "2.5" | "2xs" | "3" | "3.5" | "3xl" | "3xs" | "4" | "4.5" | "4xl" | "4xs" | "5" | "5.5" | ... 64 more ... | "min-intrinsic">

sizes

説明

The image sizes attribute.

タイプ

string

sources

説明

The sources for the picture element.

タイプ

PictureSource[]

src

説明

The image src attribute.

タイプ

string

srcSet

説明

The image srcset attribute.

タイプ

string

GitHubでこのページを編集する

NativeImageIcon