ButtonView.label
property · packages/mixins-ui/src/button.ts:50
readonly label: stringThe button's text.
Mixins / foldkit-mixins-ui
interface · packages/mixins-ui/src/button.ts:48
interface ButtonView<Message> {
readonly label: string
readonly style?: NamedStyle<typeof ButtonSlots> | undefined
readonly mixins?: MixinList<Message> | undefined
readonly input?: unknown
readonly type?: 'button' | 'submit' | 'reset' | undefined
readonly disabled?: boolean | undefined
readonly onClick?: Message | undefined
readonly pressed?: boolean | undefined
}A button in one call: the label, a style for its slot, and the rest of
@foldkit/ui's own config. toView stays for a button drawn as something
else (an a, a split control); this covers the common case.
ButtonView.labelproperty · packages/mixins-ui/src/button.ts:50
readonly label: stringThe button's text.
ButtonView.styleproperty · packages/mixins-ui/src/button.ts:52
readonly style?: NamedStyle<typeof ButtonSlots> | undefinedA style of ButtonSlots, for the button's own look.
ButtonView.mixinsproperty · packages/mixins-ui/src/button.ts:54
readonly mixins?: MixinList<Message> | undefinedMixins beside the style, for state or behavior the style does not own.
ButtonView.inputproperty · packages/mixins-ui/src/button.ts:56
readonly input?: unknownWhat an input-driven Mixin reads; omit it when no attached Mixin reads one.
ButtonView.typeproperty · packages/mixins-ui/src/button.ts:57
readonly type?: 'button' | 'submit' | 'reset' | undefinedButtonView.disabledproperty · packages/mixins-ui/src/button.ts:58
readonly disabled?: boolean | undefinedButtonView.onClickproperty · packages/mixins-ui/src/button.ts:59
readonly onClick?: Message | undefinedButtonView.pressedproperty · packages/mixins-ui/src/button.ts:64
readonly pressed?: boolean | undefinedWhether the button is on, as a toggle button: aria-pressed, and the
recipe's pressed look. Omit it for a button that is not a toggle.