Something went wrong. Try again.
shadcn-ui for Phoenix shadix.workinghypothes.is
elixir phoenix shadcn
Something went wrong. Try again.
fix(website/checkbox): wrap checkbox in a <label> so clicking text toggles it master
The checkbox doc page rendered the label text as a plain <span> beside the checkbox, so there was no HTML association between them — clicking the text did nothing. Replace the outer <span> wrapper with a <label>; a <label> wrapping its input forwards clicks to the box natively (no `for` attribute needed). Also give each demo a distinct field name (agree/agreed/locked) so generated checkbox ids are unique. All three demos previously shared field name `agree`, producing duplicate id="agree" — which breaks LiveView DOM patching and would make a for="agree" association ambiguous. Adds a live test asserting each checkbox on the page sits inside a <label>.
Author Tao Bojlén Date (Jun 20, 2026, 11:17 AM UTC) Commit 9481fe85 9481fe857cc4a14fe6c074b52a1c1cfed540e2fa Parent e1216a11 e1216a11d8ef7a2947c5708d37a79a8d9c53f7ad