Mixins / foldkit-mixins-ui

ImageView

interface · packages/mixins-ui/src/image.ts:39

interface ImageView<Message = never> {
  readonly asset: ImageAsset
  readonly provider: Provider.Provider
  readonly layout: Layout.Layout
  readonly alt: Alt
  readonly priority?: boolean | undefined
  readonly sizes?: string | undefined
  readonly placeholder?: 'detail' | 'average' | undefined
  readonly style?: NamedStyle<typeof ImageSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

An image in one call: its facts, where its variants live, how wide it is drawn, and what it says.

Members

ImageView.asset

property · packages/mixins-ui/src/image.ts:40

readonly asset: ImageAsset

ImageView.provider

property · packages/mixins-ui/src/image.ts:41

readonly provider: Provider.Provider

ImageView.layout

property · packages/mixins-ui/src/image.ts:42

readonly layout: Layout.Layout

ImageView.alt

property · packages/mixins-ui/src/image.ts:44

readonly alt: Alt

Required: an image either says something or is ornament, and the page must say which.

ImageView.priority

property · packages/mixins-ui/src/image.ts:46

readonly priority?: boolean | undefined

The page's largest image: fetched first, not lazily.

ImageView.sizes

property · packages/mixins-ui/src/image.ts:48

readonly sizes?: string | undefined

In place of the layout's sizes, when the page knows the drawn width better.

ImageView.placeholder

property · packages/mixins-ui/src/image.ts:53

readonly placeholder?: 'detail' | 'average' | undefined

How much of a ThumbHash placeholder to paint: its picture or its average color. By default the picture for a priority image, the color otherwise.

ImageView.style

property · packages/mixins-ui/src/image.ts:55

readonly style?: NamedStyle<typeof ImageSlots> | undefined

A style of ImageSlots, for the image's look.

ImageView.mixins

property · packages/mixins-ui/src/image.ts:57

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.