@@ -10,6 +10,8 @@ import DynamicDemo from './demo/Dynamic';
1010import DynamicSource from './demo/Dynamic.tsx?raw';
1111import StatusDemo from './demo/Status';
1212import StatusSource from './demo/Status.tsx?raw';
13+ import VariantDemo from './demo/Variant';
14+ import VariantSource from './demo/Variant.tsx?raw';
1315
1416# Tag
1517
@@ -59,17 +61,6 @@ Adding or removing a set of tags dynamically.
5961
6062<DemoBlock component ={CheckableDemo} source ={CheckableSource} />
6163
62- </Demo>
63- </Column >
64- <Column >
65- <Demo>
66-
67- ### Colorful Tag
68-
69- We preset a series of colorful tag styles for use in different situations. You can also set it to a hex color string for custom color.
70-
71- <DemoBlock component ={ColorDemo} source ={ColorSource} />
72-
7364 </Demo>
7465 <Demo>
7566
@@ -88,6 +79,26 @@ By using the `visible` prop, you can control the close state of Tag.
8879
8980<DemoBlock component ={ControlledDemo} source ={ControlledSource} />
9081
82+ </Demo>
83+ </Column >
84+ <Column >
85+ <Demo>
86+
87+ ### Colorful Tag
88+
89+ We preset a series of colorful tag styles for use in different situations. You can also set it to a hex color string for custom color.
90+
91+ <DemoBlock component ={ColorDemo} source ={ColorSource} />
92+
93+ </Demo>
94+ <Demo>
95+
96+ ### Variant
97+
98+ Tags support four variants: ` filled ` (default), ` soft ` , ` solid ` , and ` outlined ` .
99+
100+ <DemoBlock component ={VariantDemo} source ={VariantSource} />
101+
91102 </Demo>
92103 </Column >
93104</Layout >
@@ -96,16 +107,17 @@ By using the `visible` prop, you can control the close state of Tag.
96107
97108### Tag
98109
99- | Property | Description | Type | Default |
100- | -------------- | ---------------------------------------------- | ------------------------------ | ------- |
101- | color | color of the tag (preset or custom hex) | string | - |
102- | closable | whether the tag can be closed | boolean | false |
103- | defaultVisible | initial visibility | boolean | true |
104- | visible | controlled visibility | boolean | - |
105- | onClose | callback when tag is closed | (e: MouseEvent) => void | - |
106- | onClick | click callback | (e: MouseEvent) => void | - |
107- | style | style object of container | CSSProperties | - |
108- | className | className of container | string | - |
110+ | Property | Description | Type | Default |
111+ | -------------- | ---------------------------------------------- | --------------------------------------- | --------- |
112+ | color | color of the tag (preset or custom hex) | string | - |
113+ | variant | variant style of the tag | ` 'filled' ` \| ` 'soft' ` \| ` 'solid' ` \| ` 'outlined' ` | ` 'filled' ` |
114+ | closable | whether the tag can be closed | boolean | false |
115+ | defaultVisible | initial visibility | boolean | true |
116+ | visible | controlled visibility | boolean | - |
117+ | onClose | callback when tag is closed | (e: MouseEvent) => void | - |
118+ | onClick | click callback | (e: MouseEvent) => void | - |
119+ | style | style object of container | CSSProperties | - |
120+ | className | className of container | string | - |
109121
110122Preset colors: ` magenta ` , ` red ` , ` volcano ` , ` orange ` , ` gold ` , ` lime ` , ` green ` , ` cyan ` , ` blue ` , ` geekblue ` , ` purple ` .
111123
0 commit comments