All or some field
v0.64.0, changelogBeta"All, including future ones" or "only these" with a checklist, for an entitlement such as licensed modules.
Some
Install
npx shadcn add @syncrobotic/all-or-some-field Also installs: @syncrobotic/cn, @syncrobotic/checkbox, @syncrobotic/choice-field, @syncrobotic/radio-group
Overview
When to use
- A project's licensed modules, a key's projects, any entitlement that may follow the catalog as it grows.
Use something else
- Permission strings bounded by the viewer: Scope picker.
- A fixed set with no "all": checkboxes in a FieldSet.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
All
None
Bounded
Zh tw
Usage rules
- All is
null, including what ships later; a list is exactly these. Ticking every box never becomes all. - An empty list is legal and says what it means; it is not an unfinished form.
- When a limit above the viewer bounds the choice (the project's entitlement), disable "all" with
allDisabledReasonand each option outside it with itsreason.
Changelog
- 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
- 0.57.02026-11-27First release:
nullis all including future ones, an array exactly these (empty is none, said so); ticking every box never becomes all; options and "all" disabled with a reason; the checklist survives a trip to all and back.