Prompts

Display a predefined set of questions or suggestion.
Import

When To Use#

The Prompts component is used to display a predefined set of questions or suggestion that are relevant to the current context.

Examples#

✨ Inspirational Sparks and Marvelous Tips
Ignite Your Creativity

Got any sparks for a new project?

Uncover Background Info

Help me understand the background of this topic.

Efficiency Boost Battle

How can I work faster and better?

Tell me a Joke

Why do not ants get sick? Because they have tiny ant-bodies!

Common Issue Solutions

How to solve common issues? Share some tips!

Basic usage.

      Loading...
    
☕️ It's time to relax!
Task Completion Secrets

What are some tricks for getting tasks done?

Time for a Coffee Break

How to rest effectively after long hours of work?

To mark a prompt as disabled, add the nxDisabled property to the prompt item.

      Loading...
    
🤔 You might also want to ask:

How to rest effectively after long hours of work?

What are the secrets to maintaining a positive mindset?

How to stay calm under immense pressure?

Use the nxVertical property to control the Prompts' display direction.

      Loading...
    
🤔 You might also want to ask:

Got any sparks for a new project?

Help me understand the background of this topic.

How to solve common issues? Share some tips!

How can I work faster and better?

What are some tricks for getting tasks done?

How to rest effectively after long hours of work?

What are the secrets to maintaining a positive mindset?

How to stay calm under immense pressure?

Use the nxWrap attribute to control the layout of the Prompts.

      Loading...
    
Do you want?
Hot Topics

What are you interested in?

What's new in X?

What's AGI?

Where is the doc?

Design Guide

How to design a good product?

Know the well

Set the AI role

Express the feeling

Start Creating

How to start a new project?

Fast Start

Install Ant Design X

Online Playground

Play on the web without installing

Nest usage.

      Loading...
    

API#

nx-prompts#

PropertyDescriptionTypeDefault
[nxItems]List containing multiple prompt items.NxPrompt[]-
[nxTitle]Title displayed at the top of the prompt list.string-
[nxVertical]When set to true, the Prompts will be arranged vertically.booleanfalse
[nxWrap]When set to true, the Prompts will automatically wrap.booleanfalse
(nxItemClick)Callback function when a prompt item is clicked.EventEmitter<{ data: PromptProps }>-

interfaces#

NxPrompt#

PropertyDescriptionTypeDefault
keyUnique identifier used to distinguish each prompt item.string-
disabledWhen set to true, click events are disabled.booleanfalse
iconPrompt icon displayed on the left side of the prompt item.string-
labelPrompt label displaying the main content of the prompt.string-
descriptionPrompt description providing additional information.string-
childrenNested child prompt items.NxPrompts[]-