Mixins / foldkit-mixins-ui

ItemView

interface · packages/mixins-ui/src/item.ts:46

interface ItemView<Message = never> {
  readonly header?: Html | undefined
  readonly footer?: Html | undefined
  readonly content?: Html | undefined
  readonly media?: Html | undefined
  readonly title?: string | undefined
  readonly description?: string | undefined
  readonly actions?: Html | undefined
  readonly press?: Press<Message> | undefined
  readonly label?: string | undefined
  readonly selected?: boolean | undefined
  readonly disabled?: boolean | undefined
  readonly words?: Partial<ItemWords> | undefined
  readonly style?: NamedStyle<typeof ItemSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

A row in one call: the regions it earns, what pressing it does, its state, a style for its slots, and mixins beside the style. content follows the title and description in the content region. No upstream component stands behind it.

Members

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

readonly header?: Html | undefined

A band across the top of the row, above the media and the title; pressable above a pressable row.

property · packages/mixins-ui/src/item.ts:50

readonly footer?: Html | undefined

A band across the bottom of the row; pressable above a pressable row.

ItemView.content

property · packages/mixins-ui/src/item.ts:51

readonly content?: Html | undefined

ItemView.media

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

readonly media?: Html | undefined

An icon, an avatar or a picture at the start.

ItemView.title

property · packages/mixins-ui/src/item.ts:54

readonly title?: string | undefined

ItemView.description

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

readonly description?: string | undefined

ItemView.actions

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

readonly actions?: Html | undefined

Controls at the end, pressable above a pressable row.

ItemView.press

property · packages/mixins-ui/src/item.ts:59

readonly press?: Press<Message> | undefined

What pressing the row does: send a Message, or follow a link.

ItemView.label

property · packages/mixins-ui/src/item.ts:61

readonly label?: string | undefined

The press's accessible name; the title when omitted, and required without one.

ItemView.selected

property · packages/mixins-ui/src/item.ts:63

readonly selected?: boolean | undefined

Chosen: aria-pressed on a pressing button, aria-current on a link.

ItemView.disabled

property · packages/mixins-ui/src/item.ts:64

readonly disabled?: boolean | undefined

ItemView.words

property · packages/mixins-ui/src/item.ts:66

readonly words?: Partial<ItemWords> | undefined

What a link opening a new tab says.

ItemView.style

property · packages/mixins-ui/src/item.ts:68

readonly style?: NamedStyle<typeof ItemSlots> | undefined

A style of ItemSlots, for the row's look.

ItemView.mixins

property · packages/mixins-ui/src/item.ts:70

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.