Twikit

Get Started Components Avatar Badge Button Carousel Checkbox Color Picker Item Context Menu Context Menu Item Icon Image Picker Item Input Input Unscoped Modal Nav Nav Group Nav Item Picker Progress Radio Radio Group Range Select Sortable Sortable Item Spinner Step Steps Tab Tab Group Textarea Toggle Tooltip CSS Framework Design Tokens Theming

Context Menu Item

An item in a context menu. Should always be placed in a context menu.

<tw-context-menu-item>Occaecat est duis</tw-context-menu-item>

Properties

Property Attribute Description Type Default
href href When provided, renders the context menu item as a link. string | undefined undefined
target target When provided together with a href property, determines where to open the linked URL. "_self" | "_blank" | "_parent" | "_top" "_self"
disabled disabled Disables the item when it doesn't have an href attribute. boolean false
type type The type of the context menu item. "danger" | undefined

Slots

Name Description
Default The content of the button.
start Used to place content at the start of the item. Typically used for icons.
end Used to place content at the end of the item. Typically used for icons.

CSS Properties

Property Description Default
--tw-context-menu-item-background-color The background color of the item. transparent
--tw-context-menu-item-hover-background-color The background color of the item when hovered. var(--tw-color-shade-lighten-60)
--tw-context-menu-item-expand-area The amount the clickable area should expand beyond its content. var(--tw-space-s)