Skip to content

feat(react): add Badge and Status, the first Bones-only components - #48

Merged
sigurdarson merged 11 commits into
mainfrom
feat/badge
Sep 6, 2026
Merged

feat(react): add Badge and Status, the first Bones-only components#48
sigurdarson merged 11 commits into
mainfrom
feat/badge

Conversation

@sigurdarson

Copy link
Copy Markdown
Owner

What

  • Badge: a non-focusable span with color (neutral plus red, orange, green, teal, blue, violet, fuchsia, rose), size (default 24px, compact 16px with text one step smaller and icons following), an optional status dot, and icons as children before the text; hues are for categories, feedback goes through the dot.
  • Status: an 8px dot in neutral, success, info, warning, danger. With label it is role="img" named by it; without label it is aria-hidden for use beside text that already says the state (the Badge's status prop renders it that way). Color is never the only signal.
  • Both are built to the same rules as wrapped parts: semantic tokens only (new --ub-tint--bg/-text pairs, defined in light, dark, and the matrix theme, with a theming reference row), data-attribute variants, size through per-root vars, className merged, aria pass-through, contract tests (9 new; 172 total).
  • Docs: Badge and Status pages on the template (playground with controls, Variants, a combined sizes/status/icons showcase, Styling states, Props, Agent instructions), nav entries, llms.txt entries and slugs, the Beyond Base UI roadmap table, and changelog entries for tokens and react.

Verified

  • pnpm build, typecheck, and test green; both pages prerender.

Badge is a small label for categories, counts, and states: a plain
non-focusable span in nine tints (neutral plus the eight palette hues)
and two sizes (24px, 16px), with an optional status dot and icons as
children before the text. Status is the 8px dot in the five feedback
colors; with a label it is an image named by it, without one it is
decorative beside text that already reads the state, which is how the
Badge uses it. Both are built as if wrapping a Base UI part: semantic
tokens only, data-attribute variants, per-root size vars, aria pass-
through, and contract tests.

The tints come from new semantic tokens, a soft fill and readable text
per hue in both modes (the matrix theme collapses them to phosphor),
with a row in the theming override reference. Docs pages with
playgrounds, nav, llms.txt, the roadmap, and the changelog follow.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
usebones-www 22fc08d Sep 06 2026, 06:28 PM

…s get a status dot

The Experimental mark on Icons is a compact neutral Badge instead of a
one-off pill, and nav items can carry a Status dot after the title: an
info dot named New marks the components added this round, Badge and
Status themselves.
…ver it

Between the mobile breakpoint and the width the three columns need,
pages with a rail reserve its width on the content, so prose wraps
beside the sticky rail rather than underneath it.
…widths

The mobile layout now starts at 64rem so tablets use the header menu
and drawer, and the controls rail is hidden there instead of stacking
under the playground.
…lumn

Three tiers: phones get one column and no rail, tablets get the drawer
navigation with the rail beside a centered content column, desktop
keeps the three columns.
@sigurdarson
sigurdarson merged commit 93cc63e into main Sep 6, 2026
2 checks passed
@sigurdarson
sigurdarson deleted the feat/badge branch September 6, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant