Skip to content

feat(CheckboxGroup): add max prop - #7130

Merged
benjamincanac merged 10 commits into
feat/input-menu-unmount-on-hidefrom
feat/checkbox-group-max
Oct 6, 2026
Merged

benjamincanac merged 10 commits into
feat/input-menu-unmount-on-hidefrom
feat/checkbox-group-max

Conversation

@benjamincanac

@benjamincanac benjamincanac commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

Stacked on #7129.

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Reka UI 2.11 adds a max prop to CheckboxGroupRoot (unovue/reka-ui#2058). Once the limit is reached the unchecked checkboxes get aria-disabled but stay focusable, they are not natively disabled.

This forwards max from CheckboxGroup. Since those checkboxes have no disabled attribute, Checkbox reads the group context and applies its disabled variant when the limit is reached, so they look the same as disabled ones and theme overrides of that variant apply.

The shared hover selector in the checkbox theme also excludes aria-disabled so a blocked card or table item does not highlight on hover. RadioGroup uses the same selector, which is why its snapshots change. It never matches there.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ui Ready Ready Preview Oct 6, 2026 3:54pm UTC
ui-repl Ready Ready Preview Oct 6, 2026 3:54pm UTC

Request Review

@benjamincanac benjamincanac mentioned this pull request Oct 6, 2026
3 of 8 tasks
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Client output of the apps in test/bundle, compared to the base branch.

Fixture JS (gzip) CSS (gzip)
nuxt 115.5 kB (-2.3 kB, -2.0%) 27.2 kB (+0.5 kB, +1.7%)
nuxt-detection 115.5 kB (-2.3 kB, -2.0%) 10.5 kB (+0.2 kB, +1.8%)
nuxt-full 837.7 kB (-1.6 kB, -0.2%) 27.4 kB (+0.5 kB, +1.7%)
vue 92.3 kB (+4 B, +0.0%) 25.4 kB (+0.2 kB, +0.6%)
vue-detection 92.3 kB (+4 B, +0.0%) 8.7 kB
Raw sizes
Fixture JS CSS
nuxt 333.2 kB (-8.1 kB, -2.4%) 202.0 kB (+3.0 kB, +1.5%)
nuxt-detection 333.2 kB (-8.1 kB, -2.4%) 61.3 kB (+0.2 kB, +0.4%)
nuxt-full 2644.0 kB (-6.0 kB, -0.2%) 202.3 kB (+3.0 kB, +1.5%)
vue 277.7 kB (+8 B, +0.0%) 200.0 kB (+2.7 kB, +1.4%)
vue-detection 277.7 kB (+8 B, +0.0%) 57.8 kB

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3a5aa794-f685-4724-aa9d-d5c1fbd8f2bf
📥 Commits

Reviewing files that changed from the base of the PR and between cbb5d6e and 8e36d77.

⛔ Files ignored due to path filters (6)
  • test/components/__snapshots__/Checkbox-vue.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/Checkbox.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/CheckboxGroup-vue.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/CheckboxGroup.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/RadioGroup-vue.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/RadioGroup.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • src/theme/checkbox-group.ts
  • src/theme/checkbox.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

CheckboxGroup now accepts and forwards max. Checkbox uses the group context to determine whether the selection limit is reached and updates its disabled styling state for unchecked values. The checkbox hover selector excludes elements with aria-disabled. The documentation adds a max usage example, and a render case configures a group with max: 1.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Merge Risk: ⚪ Minimal · up to 8e36d

At the selection limit, unchecked options receive disabled styling while selected options remain styled normally. The reviewed changes show no material merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: adding a max prop to CheckboxGroup.
Description check ✅ Passed The description explains how the max prop works, how the change handles checkboxes at the limit, and what theme and documentation updates it includes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codspeed

codspeed Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing feat/checkbox-group-max (d3f1252) with feat/input-menu-unmount-on-hide (32f8659)1

Open in CodSpeed

Footnotes

  1. No successful run was found on feat/input-menu-unmount-on-hide (d3f1252) during the generation of this report, so 74f0711 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@pkg-pr-new

pkg-pr-new Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@7130

commit: 8e36d77

@benjamincanac
benjamincanac merged commit d400336 into v4 Oct 6, 2026
13 of 16 checks passed
@benjamincanac
benjamincanac deleted the feat/checkbox-group-max branch October 6, 2026 15:47
@benjamincanac
benjamincanac restored the feat/checkbox-group-max branch October 6, 2026 15:48
@benjamincanac benjamincanac mentioned this pull request Oct 6, 2026
2 of 8 tasks

This branch was successfully deployed

2 active deployments
Preview – ui — d3f12524 Deployed Oct 6, 2026 by vercel[bot]
Preview – ui-repl — d3f12524 Deployed Oct 6, 2026 by vercel[bot]
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