Tag
Tag for categorizing or markup.
Import
import { Tag, TagGroup } from 'rsuite';
// or
import Tag from 'rsuite/Tag';
import TagGroup from 'rsuite/TagGroup';
Examples
Default
Size
Colorful Tags
Dynamically tagging
Props
<Tag>
Property | Type (Default) |
Description |
---|---|---|
as | ElementType ('div') |
You can use a custom element type for this component |
children * | ReactNode | The content of the component. |
classPrefix | string ('tag') |
The prefix of the component CSS class |
closable | boolean | |
onClose | (event) => void | Click the callback function for the Close button |
size | 'sm' | 'md' | 'lg' ('md') |
Set the tag size |