logoAnt Design X

DesignDevelopmentComponentsPlayground
  • Overview
  • Common
    • Actions
    • Bubble
    • Conversations
  • Wake
    • Welcome
    • Prompts
  • Express
    • Attachments
    • Sender
    • Suggestion
  • Confirm
    • ThoughtChain
  • Tools
    • useXAgent
    • useXChat
    • XStream
    • XRequest
    • XProvider

Actions

Used for quickly configuring required action buttons or features in some AI scenarios.
Importimport { Actions } from "@ant-design/x";
Sourcecomponents/actions
Docs
Edit this page...

Resources

Ant Design
Ant Design Charts
Ant Design Pro
Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Web3
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community

When to Use

The Actions component is used for quickly configuring required action buttons or features in some AI scenarios.

Examples

API

Common props ref:Common props

Actions

PropertyDescriptionTypeDefaultVersion
itemsA list containing multiple action itemsActionItem[]--
rootClassNameStyle class for the root nodestring--
onClickCallback function when an action item is clickedfunction({ item, key, keyPath, selectedKeys, domEvent })--
styleStyle for the root nodeReact.CSSProperties--
variantVariant'borderless' | 'border''borderless'-
prefixClsPrefix for style class namesstring--

ItemType

PropertyDescriptionTypeDefaultVersion
keyThe unique identifier for the custom actionstring--
labelThe display label for the custom actionstring--
iconThe icon for the custom actionReactNode--
childrenSub action itemsActionItem[]--
triggerSubMenuActionAction to trigger the sub-menuhover | click--
onItemClickCallback function when the custom action button is clicked(info: ActionItem) => void--

SubItemType

PropertyDescriptionTypeDefaultVersion
labelThe display label for the custom actionstring--
keyThe unique identifier for the custom actionstring--
iconThe icon for the custom actionReactNode--
onItemClickCallback function when the custom action button is clicked(info: ActionItem) => void--
dangerSyntax sugar, set dangerous iconbooleanfalse-

ActionItem

typescript
type ActionItem = ItemType | SubItemType;
Changelog
Basic

Basic usage.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
More Menu Items

Display more menu items by setting the children property. Items with children don't need to configure an icon; <EllipsisOutlined /> will be used by default.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Using Variants

Use variant to switch variants.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code