logo

Mentions

Mention component.

When To Use

When need to mention someone or something.

Examples

Basic usage.

expand code expand code

Controlled mode, for example, to work with Form.

expand code expand code

Configurate disabled and readOnly.

expand code expand code

Customize the rendering of the textarea. Most common usecase will be to use the TextArea component.

expand code expand code

When the list of matched content is returned asyncronously.

expand code expand code

Customize Trigger Token by prefix props. Default to @, Array<string> also supported.

expand code expand code

Change the suggestions placement.

expand code expand code

Mentions API#

Property Description Type Default Value
ChildContent Parameter RenderFragment --
Disable Parameter Boolean --
Rows Parameter UInt32 --
Focused Parameter Boolean --
Readonly Parameter Boolean --
Loading Parameter Boolean --
Attributes Parameter Dictionary<String, Object> --
Placeholder Parameter String --
Value Parameter String --
ValueChanged Parameter EventCallback<String> --
LoadOptions ParameterDynamically load mention options for display when the user types a value after the @ symbol Func<String, CancellationToken, Task<IEnumerable<MentionsDynamicOption>>> --
TextareaTemplate Parameter RenderFragment<MentionsTextareaTemplateOptions> --
Prefix Parameter String --
Id ParameterID for the component's HTML String Uniquely Generated ID
Class ParameterSpecifies one or more class names for an DOM element. String --
Style ParameterSpecifies an inline style for a DOM element. String --
RefBack ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. ForwardRef --
Method Signature Return Type Description
GetMentionNames() List<String>
PrevOption() void
NextOption() void
EnterOption() Task

MentionsOption API#

Property Description Type Default Value
Value ParameterThe value of option. String --
ChildContent ParameterThe content of option. RenderFragment --
Id ParameterID for the component's HTML String Uniquely Generated ID
Class ParameterSpecifies one or more class names for an DOM element. String --
Style ParameterSpecifies an inline style for a DOM element. String --
RefBack ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current. ForwardRef --
InputNumber Radio
文档已更新,请点击 此处 更新。
A new version of this app is available. Click here to update.