Skip to content

feat(checkbox): add card appearance to Checkbox.Group - #834

Merged
nandanmen merged 1 commit into
mainfrom
nanda/checkbox-card-appearance
Oct 2, 2026
Merged

nandanmen merged 1 commit into
mainfrom
nanda/checkbox-card-appearance

Conversation

@nandanmen

@nandanmen nandanmen commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a card appearance to Checkbox.Group with the same styles as Radio.Group's card appearance from #833. The two PRs are independent; this one is based on main.

New props

  • Checkbox.Group: appearance ("default" | "card") and orientation ("vertical" | "horizontal").
  • Checkbox.Item: appearance (overrides the group) and description (shown in card appearance only).
  • controlFirst on the group is now optional. Card items default to the checkbox after the label (like radio cards' controlPosition="end"); the default appearance still defaults to checkbox first, so existing usage is unchanged.
  • KUMO_CHECKBOX_VARIANTS and checkboxVariants() gain an appearance axis, mirroring radio.

Card styles (identical to the radio card)

  • One card outlined with ring ring-kumo-line, with border-kumo-line dividers. Vertical groups stack the items as rows; horizontal groups use a two-column grid, and a lone last item has no stray divider.
  • Selected row: bg-kumo-tint. Hover: bg-kumo-elevated, except on the selected row, which keeps its tint. No hover transition. bg-clip-padding stops the tint from darkening the translucent dividers.
  • Checkbox controls use a 1px ring-kumo-line ring (2px brand ring on keyboard focus). The checkbox keeps its square shape and check/minus icons.
  • Card groups use Field's 8px label-to-control gap for the legend and description. The edge is a ring, so the visible gap is 7px, the same as a Field label to its input.

Horizontal orientation is new for Checkbox.Group; with the default appearance it wraps items in a row, as Radio.Group does.

Screenshots

Vertical Horizontal
vertical horizontal

Validation

  • Checkbox unit tests pass, including four new ones: vertical and horizontal card joining, card descriptions, and default appearance keeping the checkbox first. The full kumo unit suite passes (1411 tests).

  • tsc --noEmit, vp lint (kumo and the docs demo), and vp fmt are clean.

  • Added "Checkbox Card" and "Checkbox Card (Horizontal)" demos to the docs and checked them locally: 7px legend gap, kumo-tint on the selected row, kumo-elevated on hover, 1px rings.

  • Reviews

  • bonk has reviewed the change

  • automated review not possible because: requesting human design review first; bonk can run on the PR afterwards.

  • Tests

  • Tests included/updated

  • Automated tests not possible - manual testing has been completed as follows:

  • Additional testing not necessary because:

🤖 Generated with Claude Code

Checkbox.Group gains appearance="card" and orientation, and
Checkbox.Item gains appearance and description, matching Radio.Group's
card appearance: one card outlined with ring-kumo-line and
border-kumo-line dividers (rows when vertical, a two-column grid when
horizontal), a tinted selected row, a kumo-elevated hover, 1px controls,
and Field's 8px legend gap. Card items place the checkbox after the
label unless controlFirst is set.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://nanda-checkbox-card-appearance-kumo-docs.design-engineering.workers.dev (commit 58762e4)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://67304aca-kumo-docs.design-engineering.workers.dev 58762e4 2026-10-02T18:23:23.729Z Visit the dashboard ↗

@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

LGTM!

Review notes
  • Confirming PR #834 and inspecting its existing review state, changed implementation, package conventions, and coverage before evaluating behavior.
  • PR metadata confirms the requested target is cloudflare/kumo#834 at 58762e45; no prior reviews are published. The working tree is clean, and the diff adds a checkbox card/group layout plus focused unit coverage.
  • The implementation and docs follow the existing compound-component patterns. I am now checking Base UI state propagation and mixed group/item appearance cases, where the new shared-card layout can change behavior beyond the added demos.
  • Reviewed the full changed implementation against the existing Radio card API, component exports, documentation demos, and all Checkbox.Group call sites. I found no actionable regression in the new orientation, joining, control order, state, or accessibility behavior.
  • PR #834 is still at the reviewed head SHA; no inline comments or prior review comments exist. Formatting, changeset, static analysis, security, and visual-contract checks have passed; build and test-related checks remain in progress. Local unit tests could not be run because pnpm is unavailable in this runner.

github run

@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/kumo@834

commit: 58762e4

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📐 Bundle Size

Consumer fixtures bundled against packages/kumo/dist (peers external, minified ESM).

Fixture Raw Gzip Brotli
Button (root) 166.3 KB 50.9 KB 44.1 KB
Button (components/button) 166.2 KB 50.9 KB 44.1 KB
Button + Dialog + Select (root) 291.1 KB 86.8 KB 72.9 KB
Button + Dialog + Select (component subpaths) 291.1 KB 86.8 KB 72.8 KB
Chart (root) 238.6 KB 72.0 KB 61.8 KB
Chart (components/chart) 238.6 KB 72.0 KB 61.9 KB
Badge (components/badge) 36.5 KB 12.7 KB 11.1 KB
Flow (components/flow) 200.6 KB 59.2 KB 51.7 KB
Button (primitives/button) 12.2 KB 4.4 KB 3.9 KB
Primitives barrel 635.8 KB 176.8 KB 139.3 KB
Code highlighting (code) 2.07 MB 469.2 KB 350.4 KB

npm tarball: 546 files, 1.50 MB packed, 6.94 MB unpacked.

⚠️ 24 flagged files in tarball (tests / raw scripts)
  • dist/blocks-source/delete-resource/delete-resource.test.tsx
  • dist/blocks-source/resource-list/resource-list.test.tsx
  • scripts/component-registry/cache.ts
  • scripts/component-registry/discovery.ts
  • scripts/component-registry/example-cleanup.ts
  • scripts/component-registry/index.test.ts
  • scripts/component-registry/index.ts
  • scripts/component-registry/markdown-generator.ts
  • scripts/component-registry/metadata.ts
  • scripts/component-registry/props-filter.ts
  • scripts/component-registry/schema-generator.ts
  • scripts/component-registry/sub-components.ts
  • scripts/component-registry/types.ts
  • scripts/component-registry/utils.ts
  • scripts/component-registry/variant-parser.ts
  • scripts/css-build.ts
  • scripts/generate-globe-land-mask.mjs
  • scripts/generate-primitives.ts
  • scripts/theme-generator/config.ts
  • scripts/theme-generator/generate-css.test.ts
  • scripts/theme-generator/generate-css.ts
  • scripts/theme-generator/index.ts
  • scripts/theme-generator/migrate.ts
  • scripts/theme-generator/types.ts

Report-only: no size thresholds are enforced yet.

Commit: 58762e45

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Visual contracts

Linux Chromium references exercised by the PR's visual-contracts job.

1 curated contract

truncating text trigger

truncating text trigger

@nandanmen
nandanmen merged commit 3d93312 into main Oct 2, 2026
21 checks passed
@nandanmen
nandanmen deleted the nanda/checkbox-card-appearance branch October 2, 2026 18:58
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.

2 participants