You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adapter for apps that use shadcn/ui directly (their own copied components). Since shadcn components live in the app, the adapter is created from the app's components: createShadcnAdapter({ Input, Select, Checkbox, … }), with a documented list of the shadcn components it needs, or a shadcn registry item that generates the adapter file. Test it against stock shadcn components.
createShadcnAdapter({ Button, Input, Label, … }) comes from @javaabu/forms/shadcn. Each slot is built only when its shadcn components are passed, and slots without them fall back to plain HTML. That keeps a partial components/ui usable. The docs list which components make which slots, plus the npx shadcn add command: docs/advanced-usage/shadcn.md.
Testing: stock new-york-v4 components are vendored from the registry in test/shadcn/ui, with only their imports changed. The adapter passes all 19 conformance cases against them, and examples/shadcn.html renders the demo on them.
Decisions:
Factory, not a registry item: I chose the factory over a shadcn registry item. Apps keep their components, and the factory gets fixes on package updates. A registry item can still be added later.
Selects: a select without search uses Radix Select. Search, multiple values, tags and server search use the shadcn combobox (Popover + Command), and its values are submitted through hidden inputs.
Radios: each radio is its own Radix RadioGroup. The core now syncs radio groups through a registry instead of DOM events, so selecting a Radix button-radio unselects its siblings. The cost is that arrow keys don't move between them. This is documented.
Activity
Base shadcn/ui adapter
n4ff4h commentedon Nov 4, 2026
Done on
next-gen(acd7d02).createShadcnAdapter({ Button, Input, Label, … })comes from@javaabu/forms/shadcn. Each slot is built only when its shadcn components are passed, and slots without them fall back to plain HTML. That keeps a partialcomponents/uiusable. The docs list which components make which slots, plus thenpx shadcn addcommand:docs/advanced-usage/shadcn.md.Testing: stock new-york-v4 components are vendored from the registry in
test/shadcn/ui, with only their imports changed. The adapter passes all 19 conformance cases against them, andexamples/shadcn.htmlrenders the demo on them.Decisions:
Select. Search, multiple values, tags and server search use the shadcn combobox (Popover+Command), and its values are submitted through hidden inputs.RadioGroup. The core now syncs radio groups through a registry instead of DOM events, so selecting a Radix button-radio unselects its siblings. The cost is that arrow keys don't move between them. This is documented.