Mixins / foldkit-mixins-ui

TabsClose

interface · packages/mixins-ui/src/tabs.ts:71

interface TabsClose<Value extends string, Message> {
  readonly onClose: (value: Value) => Message
  readonly label?: ((value: Value) => string) | undefined
}

Closable tabs, as the APG's tabs with deletion: Delete on a tab sends onClose, and so does a press on its close button. The button is no tab stop and hidden from assistive technology, since a tablist holds tabs alone; the tab names the key in aria-keyshortcuts. Answer onClose with closing.

Members

TabsClose.onClose

property · packages/mixins-ui/src/tabs.ts:72

readonly onClose: (value: Value) => Message

TabsClose.label

property · packages/mixins-ui/src/tabs.ts:74

readonly label?: ((value: Value) => string) | undefined

The close button's tooltip (title); default "Close <value>".