Table of contents

Public interface

Signature
interface TLUiMenuItemProps<
  TranslationKey extends string = string,
  IconType extends string = string,
> {}
Source

packages/tldraw/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx


Properties

disabled

Public propertysignature

Whether this item should be disabled.

Signature
disabled?: boolean

icon

Public propertysignature

The icon to display on the item.

Signature
icon?: IconType

id

Public propertysignature

Signature
id: string

isSelected

Public propertysignature

Whether the item is selected.

Signature
isSelected?: boolean

kbd

Public propertysignature

The keyboard shortcut to display on the item.

Signature
kbd?: string

label

Public propertysignature

The label to display on the item. If it's a string, it will be translated. If it's an object, the keys will be used as the language keys and the values will be translated.

Signature
label?:
  | {
      [key: string]: TranslationKey
    }
  | TranslationKey

noClose

Public propertysignature

Prevent the menu from closing when the item is clicked

Signature
noClose?: boolean

onSelect

Public propertysignature

The function to call when the item is clicked.

Signature
onSelect: (source: TLUiEventSource) => Promise<void> | void
References

TLUiEventSource


readonlyOk

Public propertysignature

If the editor is in readonly mode and the item is not marked as readonlyok, it will not be rendered.

Signature
readonlyOk?: boolean

spinner

Public propertysignature

Whether to show a spinner on the item.

Signature
spinner?: boolean

TLUiMenuGroupPropsTLUiMenuSubmenuProps