Mixins / foldkit-mixins-ui

CardView

interface · packages/mixins-ui/src/card.ts:72

interface CardView<Message> {
  readonly title?: string | undefined
  readonly headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined
  readonly description?: string | undefined
  readonly content?: Html | undefined
  readonly image?: Html | undefined
  readonly media?: Html | undefined
  readonly action?: Html | undefined
  readonly footer?: Html | undefined
  readonly press?: Press<Message> | undefined
  readonly label?: string | undefined
  readonly selected?: boolean | undefined
  readonly disabled?: boolean | undefined
  readonly dismiss?: CardDismiss<Message> | undefined
  readonly recoveryPart?: string | undefined
  readonly words?: Partial<CardWords> | undefined
  readonly style?: NamedStyle<typeof CardSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

A card in one call: the regions it has, what pressing it does, its state, a style for its slots, and mixins beside the style. No upstream component stands behind it; this is the whole implementation.

Members

CardView.title

property · packages/mixins-ui/src/card.ts:73

readonly title?: string | undefined

CardView.headingLevel

property · packages/mixins-ui/src/card.ts:75

readonly headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined

The level of the heading that holds the title, for the page's outline. Default 3.

CardView.description

property · packages/mixins-ui/src/card.ts:76

readonly description?: string | undefined

CardView.content

property · packages/mixins-ui/src/card.ts:77

readonly content?: Html | undefined

CardView.image

property · packages/mixins-ui/src/card.ts:79

readonly image?: Html | undefined

A banner across the top of a stacked card, a square beside an inline one.

CardView.media

property · packages/mixins-ui/src/card.ts:81

readonly media?: Html | undefined

A leading icon or logo, drawn in a small tile.

CardView.action

property · packages/mixins-ui/src/card.ts:83

readonly action?: Html | undefined

Controls at the top end of the header, pressable above a pressable card.

property · packages/mixins-ui/src/card.ts:84

readonly footer?: Html | undefined

CardView.press

property · packages/mixins-ui/src/card.ts:85

readonly press?: Press<Message> | undefined

CardView.label

property · packages/mixins-ui/src/card.ts:87

readonly label?: string | undefined

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

CardView.selected

property · packages/mixins-ui/src/card.ts:89

readonly selected?: boolean | undefined

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

CardView.disabled

property · packages/mixins-ui/src/card.ts:90

readonly disabled?: boolean | undefined

CardView.dismiss

property · packages/mixins-ui/src/card.ts:91

readonly dismiss?: CardDismiss<Message> | undefined

CardView.recoveryPart

property · packages/mixins-ui/src/card.ts:96

readonly recoveryPart?: string | undefined

The name of the dismiss button in the parts of the FocusRecovery.behavior on the list holding the cards, which the application owns: the button marks itself that part.

CardView.words

property · packages/mixins-ui/src/card.ts:98

readonly words?: Partial<CardWords> | undefined

The dismiss button's name and mark, and what a new-tab link says.

CardView.style

property · packages/mixins-ui/src/card.ts:100

readonly style?: NamedStyle<typeof CardSlots> | undefined

A style of CardSlots, for the card's look.

CardView.mixins

property · packages/mixins-ui/src/card.ts:102

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.