ReviewOS

stacks/stx

Built-in Badge, Avatar, and Chip components

#1680
Closed glennmichael123 opened this 23 days ago · 1 comment
23 days ago

Summary

Small display components for status indicators, user avatars, and tags.

Components

<StxBadge>

<StxBadge>New</StxBadge>
<StxBadge color="red" variant="outline">Critical</StxBadge>
<StxBadge color="green" dot>Active</StxBadge>

Props: color (gray/red/green/blue/yellow/purple), variant (solid/outline/subtle), size (xs/sm/md), dot (leading dot indicator)

<StxAvatar>

<StxAvatar src="/avatars/glenn.jpg" alt="Glenn" size="md" />
<StxAvatar fallback="GT" color="indigo" />
<StxAvatar src="/missing.jpg" fallback="?" status="online" />

Props: src, alt, fallback (initials when image fails), size (xs/sm/md/lg/xl), color, status (online/offline/busy/away), rounded (full/md/none)

<StxChip>

<StxChip>TypeScript</StxChip>
<StxChip closable @close="removeTag('ts')">TypeScript</StxChip>

Props: color, closable, size, variant

Shared features

  • Dark mode via CSS variables
  • Consistent color palette across all three
  • Composable with other builtins (Badge inside Tabs, Avatar in Cards)
23 days ago

Delivered via @stacksjs/components, which ships with every stx app and is auto-registered (no import needed in .stx files). See CLAUDE.md § "Reach for stx primitives before vanilla JS" for the full inventory; the relevant components for this request are documented there.

Closing as effectively delivered. If a specific behavior or API affordance from the original request is missing from the shipped components, please open a focused ticket against @stacksjs/components describing the exact gap — that's easier to track than a broad "make it a builtin" ask.

Sign in to comment on this issue.