@startupjs-ui/tag 0.1.13 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.mdx +21 -10
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.1.19](https://github.com/startupjs/startupjs-ui/compare/v0.1.18...v0.1.19) (2026-03-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **docs:** don't load all icons to keep bundle small ([#17](https://github.com/startupjs/startupjs-ui/issues/17)) ([d7eb70b](https://github.com/startupjs/startupjs-ui/commit/d7eb70bc11f5b15923f2e43b7ef1f86ea066494e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @startupjs-ui/tag
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @startupjs-ui/tag
|
package/README.mdx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { faTimesCircle
|
|
2
|
+
import { faTimesCircle } from '@fortawesome/free-solid-svg-icons/faTimesCircle'
|
|
3
|
+
import { faStopCircle } from '@fortawesome/free-solid-svg-icons/faStopCircle'
|
|
3
4
|
import { Sandbox } from '@startupjs-ui/docs'
|
|
4
5
|
import Tag, { _PropsJsonSchema as TagPropsJsonSchema } from './index'
|
|
5
6
|
import Br from '@startupjs-ui/br'
|
|
@@ -12,7 +13,9 @@ Inherits [Div props](/docs/components/Div).
|
|
|
12
13
|
|
|
13
14
|
Tags are compact elements that represent an input, attribute, or action. They allow users to enter information, make selections, filter content, or trigger actions. While buttons are expected to appear consistently and with familiar calls to action, tags should appear dynamically as a group of multiple interactive elements.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
The component supports style overrides via `style`, `textStyle`, `iconStyle`, `secondaryIconStyle`, `hoverStyle`, and `activeStyle`. Use `onIconPress` and `onSecondaryIconPress` to handle presses on the left and right icons independently. Set `disabled` to prevent all interactions.
|
|
17
|
+
|
|
18
|
+
```jsx
|
|
16
19
|
import { Tag } from 'startupjs-ui'
|
|
17
20
|
```
|
|
18
21
|
|
|
@@ -28,7 +31,7 @@ return (
|
|
|
28
31
|
|
|
29
32
|
## Colors
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
The default color is `'primary'`. You can change it by passing a color name from the theme configuration to the `color` prop. See the Sandbox section at the bottom of the page for all available values.
|
|
32
35
|
|
|
33
36
|
```jsx example
|
|
34
37
|
return (
|
|
@@ -43,7 +46,7 @@ return (
|
|
|
43
46
|
|
|
44
47
|
## Sizes
|
|
45
48
|
|
|
46
|
-
The `size`
|
|
49
|
+
The `size` prop controls the overall dimensions of the tag, including its icons and text. Available sizes are `'s'` and `'m'` (default).
|
|
47
50
|
|
|
48
51
|
```jsx example
|
|
49
52
|
return (
|
|
@@ -55,9 +58,13 @@ return (
|
|
|
55
58
|
)
|
|
56
59
|
```
|
|
57
60
|
|
|
58
|
-
##
|
|
61
|
+
## Variants
|
|
62
|
+
|
|
63
|
+
The `variant` prop controls the tag's visual style. The default value is `'flat'`.
|
|
59
64
|
|
|
60
|
-
|
|
65
|
+
- **flat** -- a solid, filled tag (default)
|
|
66
|
+
- **outlined** -- a bordered tag with no background fill
|
|
67
|
+
- **outlined-bg** -- a bordered tag with a tinted background
|
|
61
68
|
|
|
62
69
|
```jsx example
|
|
63
70
|
return (
|
|
@@ -70,7 +77,10 @@ return (
|
|
|
70
77
|
|
|
71
78
|
## Shapes
|
|
72
79
|
|
|
73
|
-
|
|
80
|
+
The `shape` prop controls the border radius of the tag. The default value is `'circle'`.
|
|
81
|
+
|
|
82
|
+
- **circle** -- fully rounded corners (default)
|
|
83
|
+
- **rounded** -- standard rounded corners
|
|
74
84
|
|
|
75
85
|
```jsx example
|
|
76
86
|
return (
|
|
@@ -83,9 +93,9 @@ return (
|
|
|
83
93
|
|
|
84
94
|
## Icons
|
|
85
95
|
|
|
86
|
-
|
|
96
|
+
Use the `icon` prop to add a left-side icon and the `secondaryIcon` prop for a right-side icon. To change the color of an icon, use the corresponding `iconStyleName` or `secondaryIconStyleName` prop.
|
|
87
97
|
|
|
88
|
-
In `.styl` file
|
|
98
|
+
In your `.styl` file:
|
|
89
99
|
```stylus
|
|
90
100
|
.icon
|
|
91
101
|
color var(--color-text-main)
|
|
@@ -121,7 +131,8 @@ return (
|
|
|
121
131
|
```
|
|
122
132
|
|
|
123
133
|
## Actions
|
|
124
|
-
|
|
134
|
+
|
|
135
|
+
A tag can be made interactive using the `onPress` prop.
|
|
125
136
|
|
|
126
137
|
```jsx example
|
|
127
138
|
const [counter, setCounter] = useState(0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/tag",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@startupjs-ui/core": "^0.1.
|
|
12
|
-
"@startupjs-ui/div": "^0.1.
|
|
13
|
-
"@startupjs-ui/icon": "^0.1.
|
|
14
|
-
"@startupjs-ui/span": "^0.1.
|
|
11
|
+
"@startupjs-ui/core": "^0.1.19",
|
|
12
|
+
"@startupjs-ui/div": "^0.1.19",
|
|
13
|
+
"@startupjs-ui/icon": "^0.1.19",
|
|
14
|
+
"@startupjs-ui/span": "^0.1.19"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": "*",
|
|
18
18
|
"react-native": "*",
|
|
19
19
|
"startupjs": "*"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "bfcca786dc363f42a09b6eef4feb7ca8139302fc"
|
|
22
22
|
}
|