You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Badge comes in two sizes. The default `md` size is 20px tall and should be used in most situations, while `sm` is 16px tall for use in tighter layouts where density is desired (such as log viewers). Small badges generally look better with `pill={false}` applied.
|`variant`|`"neutral"`\|`"primary"`\|`"warning"`\|`"danger"`\|`"success"`|`"primary"`| The visual style variant of the badge. |
158
-
|`display`|`"both"`\|`"text-only"`\|`"icon-only"`|`"both"`| Controls what elements are displayed. `"both"` shows icon and text, `"text-only"` shows only text, `"icon-only"` shows only icon. |
159
-
|`icon`|`string`\|`ReactElement`| - | Icon to display. Can be a Lucide icon name or a custom React element. |
160
-
|`closeable`|`boolean`|`false`| When true, displays a close button on the badge. |
161
-
|`handleClosable`|`() => void`| - | Callback function called when the close button is clicked. Required when `closeable` is true. |
162
-
|`truncate`|`boolean`|`false`| When true, truncates long text with an ellipsis and shows full text on hover. |
163
-
|`truncateLength`|`number`|`50`| Maximum character length before truncation occurs. |
164
-
|`className`|`string`| - | Additional CSS classes to apply to the badge. |
|`variant`|`"neutral"`\|`"primary"`\|`"secondary"`\|`"warning"`\|`"danger"`\|`"success"`|`"primary"`| The visual style variant of the badge. |
228
+
|`size`|`"sm"`\|`"md"`|`"md"`| The size of the badge. `"md"` renders at 20px tall, `"sm"` at 16px tall. |
229
+
|`display`|`"both"`\|`"text-only"`\|`"icon-only"`|`"both"`| Controls what elements are displayed. `"both"` shows icon and text, `"text-only"` shows only text, `"icon-only"` shows only icon. |
230
+
|`icon`|`string`\|`ReactElement`| - | Icon to display. Can be a Lucide icon name or a custom React element. |
231
+
|`pill`|`boolean`|`true`| When true (default), badge is pill-shaped. Set to `false` for a square badge with subtle border radius. |
232
+
|`monospace`|`boolean`|`false`| When true, renders badge text in a monospace font. |
233
+
|`closeable`|`boolean`|`false`| When true, displays a close button on the badge. |
234
+
|`handleClosable`|`() => void`| - | Callback function called when the close button is clicked. Required when `closeable` is true. |
235
+
|`truncate`|`boolean`|`false`| When true, truncates long text with an ellipsis and shows full text on hover. |
236
+
|`truncateLength`|`number`|`50`| Maximum character length before truncation occurs. |
237
+
|`className`|`string`| - | Additional CSS classes to apply to the badge. |
0 commit comments