import { Tag, TagGroup } from 'rsuite';
<Tag>
<TagGroup>
Examples
Basic
Rendering...
Size
Rendering...
Colorful Tags
Rendering...
Dynamically tagging
Rendering...
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 | Whether to display the Close button |
color | Color | Set the tag color |
onClose | (event) => void | Click the callback function for the Close button |
size | 'sm' | 'md' | 'lg' ('md') |
Set the tag size |
<TagGroup>
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-group') |
The prefix of the component CSS class |
ts:Color
type Color = 'red' | 'orange' | 'yellow' | 'green' | 'cyan' | 'blue' | 'violet';