Actions
Actions
Used for quickly configuring required action buttons or features in some AI scenarios.
Importimport { Actions } from "@ant-design/x"; |
Sourcecomponents/actions |
Docs |
Importimport { Actions } from "@ant-design/x"; |
Sourcecomponents/actions |
Docs |
The Actions component is used for quickly configuring required action buttons or features in some AI scenarios.
Common props ref:Common props
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| items | A list containing multiple action items | ActionItem[] | - | - |
| rootClassName | Style class for the root node | string | - | - |
| onClick | Callback function when an action item is clicked | function({ item, key, keyPath, selectedKeys, domEvent }) | - | - |
| style | Style for the root node | React.CSSProperties | - | - |
| variant | Variant | 'borderless' | 'border' | 'borderless' | - |
| prefixCls | Prefix for style class names | string | - | - |
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| key | The unique identifier for the custom action | string | - | - |
| label | The display label for the custom action | string | - | - |
| icon | The icon for the custom action | ReactNode | - | - |
| children | Sub action items | ActionItem[] | - | - |
| triggerSubMenuAction | Action to trigger the sub-menu | hover | click | - | - |
| onItemClick | Callback function when the custom action button is clicked | (info: ActionItem) => void | - | - |
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| label | The display label for the custom action | string | - | - |
| key | The unique identifier for the custom action | string | - | - |
| icon | The icon for the custom action | ReactNode | - | - |
| onItemClick | Callback function when the custom action button is clicked | (info: ActionItem) => void | - | - |
| danger | Syntax sugar, set dangerous icon | boolean | false | - |
type ActionItem = ItemType | SubItemType;