common-intellisense
Version:
148 lines (147 loc) • 4.84 kB
JSON
{
"props": [
{
"Attribute": "children",
"Type": "`ReactNode`",
"Description": "The contents of the dropdown item.",
"Default": "-"
},
{
"Attribute": "key",
"Type": "`React.Key`",
"Description": "The unique key for the dropdown item.",
"Default": "-"
},
{
"Attribute": "title",
"Type": "`string` | `ReactNode`",
"Description": "The title of the dropdown item.",
"Default": "-"
},
{
"Attribute": "textValue",
"Type": "`string`",
"Description": "A string representation of the item's contents, used for features like typeahead.",
"Default": "-"
},
{
"Attribute": "description",
"Type": "`string` | `ReactNode`",
"Description": "The description of the dropdown item.",
"Default": "-"
},
{
"Attribute": "shortcut",
"Type": "`string` | `ReactNode`",
"Description": "The dropdown item keyboard shortcut.",
"Default": "-"
},
{
"Attribute": "startContent",
"Type": "`ReactNode`",
"Description": "The start content of the dropdown item.",
"Default": "-"
},
{
"Attribute": "endContent",
"Type": "`ReactNode`",
"Description": "The end content of the dropdown item. This is positioned after the shortcut and the selected icon.",
"Default": "-"
},
{
"Attribute": "selectedIcon",
"Type": "[SelectedIconProps](#dropdown-item-selected-icon-props)",
"Description": "Custom icon to render when the item is selected.",
"Default": "-"
},
{
"Attribute": "showDivider",
"Type": "`boolean`",
"Description": "Whether to show a divider below the item.",
"Default": "`false`"
},
{
"Attribute": "isDisabled",
"Type": "`boolean`",
"Description": "Whether the dropdown item should be disabled. (**Deprecated**) pass **disabledKeys** to `DropdownMenu` instead.",
"Default": "`false`"
},
{
"Attribute": "isSelected",
"Type": "`boolean`",
"Description": "Whether the dropdown item should be selected. (**Deprecated**) pass **selectedKeys** to `DropdownMenu` instead.",
"Default": "`false`"
},
{
"Attribute": "isReadOnly",
"Type": "`boolean`",
"Description": "Whether the dropdown item press events should be ignored.",
"Default": "`false`"
},
{
"Attribute": "closeOnSelect",
"Type": "`boolean`",
"Description": "Whether the dropdown menu should be closed when the item is selected.",
"Default": "`true`"
},
{
"Attribute": "classNames",
"Type": "`Record<\"base\"| \"wrapper\"| \"title\"| \"description\"| \"shortcut\" | \"selectedIcon\", string>`",
"Description": "Allows to set custom class names for the dropdown item slots.",
"Default": "-"
}
],
"link": "https://nextui.org/docs/components/dropdownitem",
"events": [
{
"Attribute": "onAction",
"Type": "`() => void`",
"Description": "Handler that is called when the dropdown item is selected. (**Deprecated**) pass to `DropdownMenu` instead."
},
{
"Attribute": "onClose",
"Type": "`() => void`",
"Description": "Handler that is called when the dropdown item should close after selecting. (**Deprecated**) pass to `DropdownMenu` instead."
},
{
"Attribute": "onPress",
"Type": "`(e: PressEvent) => void`",
"Description": "Handler called when the press is released over the target."
},
{
"Attribute": "onPressStart",
"Type": "`(e: PressEvent) => void`",
"Description": "Handler called when a press interaction starts."
},
{
"Attribute": "onPressEnd",
"Type": "`(e: PressEvent) => void`",
"Description": "Handler called when a press interaction ends, either over the target or when the pointer leaves the target."
},
{
"Attribute": "onPressChange",
"Type": "`(isPressed: boolean) => void`",
"Description": "Handler called when the press state changes."
},
{
"Attribute": "onPressUp",
"Type": "`(e: PressEvent) => void`",
"Description": "Handler called when a press is released over the target, regardless of whether it started on the target or not."
},
{
"Attribute": "onKeyDown",
"Type": "`(e: KeyboardEvent) => void`",
"Description": "Handler called when a key is pressed."
},
{
"Attribute": "onKeyUp",
"Type": "`(e: KeyboardEvent) => void`",
"Description": "Handler called when a key is released."
},
{
"Attribute": "onClick",
"Type": "`MouseEventHandler`",
"Description": "The native button click event handler (**Deprecated**) use **onPress** instead."
}
]
}