@startupjs-ui/badge 0.1.12 → 0.1.16

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 CHANGED
@@ -3,6 +3,22 @@
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.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/badge
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
15
+
16
+ **Note:** Version bump only for package @startupjs-ui/badge
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.1.12](https://github.com/startupjs/startupjs-ui/compare/v0.1.11...v0.1.12) (2026-01-21)
7
23
 
8
24
  **Note:** Version bump only for package @startupjs-ui/badge
package/README.mdx CHANGED
@@ -6,7 +6,9 @@ import { Sandbox } from '@startupjs-ui/docs'
6
6
 
7
7
  # Badge
8
8
 
9
- Badge is small state descriptors for UI elements.
9
+ Badges are small status descriptors that attach to UI elements, such as icons or buttons. They are commonly used to display counts (like unread messages) or to indicate a change in state.
10
+
11
+ The component supports a `style` prop for custom styles on the root wrapper and a `badgeStyle` prop for custom styles on the badge indicator itself.
10
12
 
11
13
  ```js
12
14
  import { Badge } from 'startupjs-ui'
@@ -24,7 +26,7 @@ return (
24
26
 
25
27
  ## Sizes
26
28
 
27
- Badges come in three different sizes: `s`, `m`, and `l`. The `m` size is the default and most frequently used. The other sizes should be used with care so as not to break the hierarchy of importance on the page.
29
+ Badges come in three different sizes: `'s'`, `'m'`, and `'l'`. The default size is `'m'`.
28
30
 
29
31
  ```jsx example
30
32
  return (
@@ -44,7 +46,7 @@ return (
44
46
 
45
47
  ## Variants
46
48
 
47
- There are two types of Badges: `default` and `dot`. `default` it is the most frequently used and the default specified. `dot` turns the badge into a small dot, this can be used as a message that something has changed. If the property is `variant='dot'`, the `size` property will be ignored.
49
+ There are two variants: `'default'` and `'dot'`. The `'default'` variant displays a label and is used by default. The `'dot'` variant renders the badge as a small dot, which is useful for indicating that something has changed without showing a specific count. When `variant='dot'` is set, the `size` prop is ignored.
48
50
 
49
51
  ```jsx example
50
52
  return (
@@ -61,7 +63,7 @@ return (
61
63
 
62
64
  ## Colors
63
65
 
64
- Color is `primary` by default. It can be changed by passing color name from the config colors to `color` property. Possible values of property can be found in the `Sandbox` section at the bottom of the page.
66
+ 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.
65
67
 
66
68
  ```jsx example
67
69
  return (
@@ -73,7 +75,7 @@ return (
73
75
 
74
76
  ## Position
75
77
 
76
- Badge can be in two positions: `top` and `bottom`. **Default value:** `top`.
78
+ The badge can be positioned at the `'top'` or `'bottom'` of its child element. The default position is `'top'`.
77
79
 
78
80
  ```jsx example
79
81
  return (
@@ -90,7 +92,7 @@ return (
90
92
 
91
93
  ## Icons
92
94
 
93
- Icon can be added using `icon` property.
95
+ An icon can be displayed inside the badge using the `icon` prop.
94
96
 
95
97
  ```jsx example
96
98
  return (
@@ -102,7 +104,7 @@ return (
102
104
 
103
105
  ## Counter
104
106
 
105
- If `label` property takes a numeric value, then the `max` property can be used to limit the maximum displayed number in the label.
107
+ When the `label` prop is a number, you can use the `max` prop to cap the displayed value. If `label` exceeds `max`, the badge shows the max value followed by a `+` sign.
106
108
 
107
109
  ```jsx example
108
110
  return (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/badge",
3
- "version": "0.1.12",
3
+ "version": "0.1.16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -9,14 +9,14 @@
9
9
  "type": "module",
10
10
  "dependencies": {
11
11
  "@startupjs-ui/core": "^0.1.11",
12
- "@startupjs-ui/div": "^0.1.12",
13
- "@startupjs-ui/icon": "^0.1.11",
14
- "@startupjs-ui/span": "^0.1.12"
12
+ "@startupjs-ui/div": "^0.1.16",
13
+ "@startupjs-ui/icon": "^0.1.16",
14
+ "@startupjs-ui/span": "^0.1.16"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": "*",
18
18
  "react-native": "*",
19
19
  "startupjs": "*"
20
20
  },
21
- "gitHead": "c0b4606437077bb6d170e2c0b16b674801c304fe"
21
+ "gitHead": "9943aa3566d5d80f5b404473906eb3c0611f9ee5"
22
22
  }