Cards & content / Badges & tags
Issue Label and Status Chips
Small rounded pill chips with a coloured dot and 12–13px label (Bug, Design, AI), tinted hairline outlines and mono issue IDs, used in board cards and issue lists.
Rebuilt from linear.app in the Obsidian Precision style.
npx shadcn@latest add https://justyoink.it/r/obsidian-precision-5cbef2/blocks/status-label-chips.json
Looks exactly like linear.app: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/obsidian-precision-5cbef2/mine/status-label-chips.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Pass `issues` (id, title, chips with label and tone: danger|info|accent|success|neutral) to render board cards; `LabelChip` is also exported for standalone use. Chips brighten subtly on hover and cards highlight when selected.
components/status-label-chips.tsx
import { useState } from "react"; type Chip = { label: string; tone: "danger" | "info" | "accent" | "success" | "neutral" }; type Issue = { id: string; title: string; chips: Chip[] }; const toneClass: Record<Chip["tone"], string> = { danger: "bg-danger", info: "bg-info-blue", accent: "bg-accent-indigo", success: "bg-success", neutral: "bg-quaternary", }; export function LabelChip({ label, tone = "neutral" }: { label: string; tone?: Chip["tone"] }) { return ( <span className="inline-flex items-center gap-1.5 rounded-pill border border-hairline bg-surface px-2 py-0.5 text-[12px] leading-5 text-tertiary transition-colors duration-hover-fill ease-hover-fill hover:bg-surface-raised hover:text-secondary"> <span aria-hidden className={`h-1.5 w-1.5 rounded-pill ${toneClass[tone]}`} /> {label} </span> ); } const defaultIssues: Issue[] = [ { id: "APP-412", title: "Fix flicker on settings page", chips: [{ label: "Bug", tone: "danger" }, { label: "Design", tone: "info" }] }, { id: "APP-388", title: "Unhandled error when saving draft", chips: [{ label: "Bug", tone: "danger" }] }, { id: "APP-401", title: "Upgrade summarizer model", chips: [{ label: "AI", tone: "neutral" }] }, { id: "APP-397", title: "Speed up dashboard load", chips: [{ label: "Performance", tone: "success" }, { label: "Planned", tone: "accent" }] }, ]; export default function IssueLabelAndStatusChips({ issues = defaultIssues }: { issues?: Issue[] }) { const [active, setActive] = useState<string | null>(null); return ( <div className="relative w-full max-w-md overflow-hidden rounded-xl border border-hairline bg-surface p-3 shadow-low font-sans"> <div className="pointer-events-none absolute inset-0 bg-corner-glow" /> <ul className="relative flex flex-col gap-2"> {issues.map((issue) => ( <li key={issue.id}> <button type="button" onClick={() => setActive(issue.id)} className={`w-full rounded-lg border p-3 text-left transition-colors duration-hover-fill ease-hover-fill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-indigo ${active === issue.id ? "border-accent-indigo bg-surface-raised" : "border-hairline bg-canvas hover:bg-surface-raised"}`} > <span className="block font-mono text-[11px] uppercase tracking-wide text-quaternary">{issue.id}</span> <span className="mt-1 block text-[13px] font-medium text-primary">{issue.title}</span> <span className="mt-2 flex flex-wrap gap-1.5"> {issue.chips.map((c) => ( <LabelChip key={c.label} {...c} /> ))} </span> </button> </li> ))} </ul> </div> ); }import { useState } from "react"; type Chip = { label: string; tone: "danger" | "info" | "accent" | "success" | "neutral" }; type Issue = { id: string; title: string; chips: Chip[] }; const toneClass: Record<Chip["tone"], string> = { danger: "bg-destructive", info: "bg-obsidian-info-blue", accent: "bg-primary", success: "bg-obsidian-success", neutral: "bg-foreground", }; export function LabelChip({ label, tone = "neutral" }: { label: string; tone?: Chip["tone"] }) { return ( <span className="inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-2 py-0.5 text-[12px] leading-5 text-muted-foreground transition-colors duration-obsidian-hover-fill ease-obsidian-hover-fill hover:bg-secondary hover:text-muted-foreground"> <span aria-hidden className={`h-1.5 w-1.5 rounded-full ${toneClass[tone]}`} /> {label} </span> ); } const defaultIssues: Issue[] = [ { id: "APP-412", title: "Fix flicker on settings page", chips: [{ label: "Bug", tone: "danger" }, { label: "Design", tone: "info" }] }, { id: "APP-388", title: "Unhandled error when saving draft", chips: [{ label: "Bug", tone: "danger" }] }, { id: "APP-401", title: "Upgrade summarizer model", chips: [{ label: "AI", tone: "neutral" }] }, { id: "APP-397", title: "Speed up dashboard load", chips: [{ label: "Performance", tone: "success" }, { label: "Planned", tone: "accent" }] }, ]; export default function IssueLabelAndStatusChips({ issues = defaultIssues }: { issues?: Issue[] }) { const [active, setActive] = useState<string | null>(null); return ( <div className="relative w-full max-w-md overflow-hidden rounded-2xl border border-border bg-card p-3 shadow-obsidian-low font-sans"> <div className="pointer-events-none absolute inset-0 " /> <ul className="relative flex flex-col gap-2"> {issues.map((issue) => ( <li key={issue.id}> <button type="button" onClick={() => setActive(issue.id)} className={`w-full rounded-lg border p-3 text-left transition-colors duration-obsidian-hover-fill ease-obsidian-hover-fill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${active === issue.id ? "border-primary bg-secondary" : "border-border bg-background hover:bg-secondary"}`} > <span className="block font-mono text-[11px] uppercase tracking-wide text-muted-foreground">{issue.id}</span> <span className="mt-1 block text-[13px] font-medium text-foreground">{issue.title}</span> <span className="mt-2 flex flex-wrap gap-1.5"> {issue.chips.map((c) => ( <LabelChip key={c.label} {...c} /> ))} </span> </button> </li> ))} </ul> </div> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: not passedElements must meet minimum color contrast ratio thresholds (4 elements)
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.