logoAnt Design X

DesignDevelopmentComponentsX SDKX MarkdownPlayground
  • Overview
  • Common
    • Bubble
    • Conversations
    • Notification
  • Confirmation
    • Think
    • ThoughtChain
  • Wake
    • Welcome
    • Prompts
  • Express
    • Attachments
    • Sender
    • Suggestion
  • Feedback
    • Actions
  • 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
loading

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

ActionsProps

PropertyDescriptionTypeDefaultVersion
itemsA list containing multiple action items(ItemType | ReactNode)[]--
onClickCallback function when an action item is clickedfunction({ item, key, keyPath, domEvent })--
footerAdditional React node content at the bottomReactNode--
dropdownPropsConfiguration properties for dropdown menuDropdownProps--
variantVariantborderless | outlined |filledborderless-

ItemType

PropertyDescriptionTypeDefaultVersion
keyThe unique identifier for the custom actionstring--
labelThe display label for the custom actionstring--
iconThe icon for the custom actionReactNode--
onItemClickCallback function when the custom action button is clicked(info: ItemType) => void--
dangerSyntax sugar, set dangerous iconbooleanfalse-
subItemsSub action itemsOmit<ItemType, 'subItems' | 'triggerSubMenuAction' | 'actionRender'>[]--
triggerSubMenuActionAction to trigger the sub-menuhover | clickhover-
actionRenderCustom render action item content(item: ItemType) => ReactNode--

Actions.Feedback

PropertyDescriptionTypeDefaultVersion
valueFeedback valuelike | dislike | defaultdefault-
onChangeFeedback status change callback(value: like | dislike | default) => void--

Semantic DOM

Changelog
Basic

Basic usage.

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

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

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Preset Template

For some commonly used functions, preset components can be used to quickly build them.

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
  • /5
  • /5
  • /5
  • /5
footer
  • root
    Root
  • item
    Item
  • itemDropdown
    Item Dropdown
  • footer
    Footer