Skip to content

Commit ee96298

Browse files
Erick Teowarangclaude
andcommitted
feat(badge): add solid info variant + show all outline variants in demo
Adds a solid blue `info` variant alongside the new `subtle-info`, filling the gap in the solid family (success/warning/error/neutral/info). Also expands the primitives demo to render all five outline variants instead of only `outline-success` as a placeholder. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fca36d4 commit ee96298

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

.changeset/add-subtle-info-badge.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"@tailor-platform/app-shell": patch
33
---
44

5-
Add `subtle-info` badge variant for low-emphasis informational status labels (e.g. in-progress, processing).
5+
Add `info` and `subtle-info` badge variants for informational or in-progress status labels (blue palette, matching the existing `outline-info` dot color). Also extend the primitives demo to show all five outline variants (previously only `outline-success` was rendered).
66

77
```tsx
8+
<Badge variant="info">New</Badge>
89
<Badge variant="subtle-info">In Progress</Badge>
910
```

docs/components/badge.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { Badge, type BadgeVariant, type BadgeOptions } from "@tailor-platform/ap
2020
<Badge variant="success">Success</Badge>
2121
<Badge variant="warning">Warning</Badge>
2222
<Badge variant="error">Error</Badge>
23+
<Badge variant="info">Info</Badge>
2324
<Badge variant="subtle-success">Subtle Success</Badge>
2425
<Badge variant="subtle-warning">Subtle Warning</Badge>
2526
<Badge variant="subtle-error">Subtle Error</Badge>
@@ -38,6 +39,7 @@ Filled variants for high emphasis, plus subtle variants for lower-emphasis statu
3839
<Badge variant="warning">Pending</Badge>
3940
<Badge variant="error">Rejected</Badge>
4041
<Badge variant="neutral">Draft</Badge>
42+
<Badge variant="info">New</Badge>
4143
<Badge variant="subtle-success">Matched</Badge>
4244
<Badge variant="subtle-warning">Needs Attention</Badge>
4345
<Badge variant="subtle-error">Needs Review</Badge>
@@ -74,6 +76,7 @@ type BadgeVariant =
7476
| "warning" // Yellow
7577
| "error" // Red/destructive
7678
| "neutral" // Gray/secondary
79+
| "info" // Blue
7780
| "subtle-success" // Low-emphasis green
7881
| "subtle-warning" // Low-emphasis yellow
7982
| "subtle-error" // Low-emphasis red/destructive
@@ -199,6 +202,7 @@ function ProductBadge({ product }: { product: Product }) {
199202
| `warning` | ![Yellow badge] | Pending, in progress, attention needed |
200203
| `error` | ![Red badge] | Failed, rejected, critical |
201204
| `neutral` | ![Gray badge] | Draft, inactive, disabled |
205+
| `info` | ![Blue badge] | Informational, new, in-progress |
202206
| `subtle-success` | ![Subtle green badge] | Low-emphasis completed or matched statuses |
203207
| `subtle-warning` | ![Subtle yellow badge] | Low-emphasis pending or attention states |
204208
| `subtle-error` | ![Subtle red badge] | Low-emphasis failures or exceptions |

examples/nextjs-app/src/modules/pages/primitives-demo.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,16 @@ export const primitiveComponentsDemoResource = defineResource({
101101
<Badge variant="warning">Warning</Badge>
102102
<Badge variant="error">Error</Badge>
103103
<Badge variant="neutral">Neutral</Badge>
104+
<Badge variant="info">Info</Badge>
104105
<Badge variant="subtle-success">Subtle Success</Badge>
105106
<Badge variant="subtle-warning">Subtle Warning</Badge>
106107
<Badge variant="subtle-error">Subtle Error</Badge>
107108
<Badge variant="subtle-info">Subtle Info</Badge>
108-
<Badge variant="outline-success">Outline</Badge>
109+
<Badge variant="outline-success">Outline Success</Badge>
110+
<Badge variant="outline-warning">Outline Warning</Badge>
111+
<Badge variant="outline-error">Outline Error</Badge>
112+
<Badge variant="outline-info">Outline Info</Badge>
113+
<Badge variant="outline-neutral">Outline Neutral</Badge>
109114
</div>
110115
</Card.Content>
111116
</Card.Root>

packages/core/src/components/badge.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const badgeVariants = cva(
1717
"astw:border-transparent astw:bg-destructive astw:text-destructive-foreground astw:hover:bg-destructive/80",
1818
neutral:
1919
"astw:border-transparent astw:bg-secondary astw:text-secondary-foreground astw:hover:bg-secondary/80",
20+
info: "astw:border-transparent astw:bg-blue-500 astw:text-white astw:hover:bg-blue-600",
2021
"subtle-success":
2122
"astw:border-transparent astw:bg-green-500/10 astw:text-green-700 astw:hover:bg-green-500/20 astw:dark:text-green-500",
2223
"subtle-warning":

0 commit comments

Comments
 (0)