diff --git a/content/docs/3.components/checkbox.md b/content/docs/3.components/checkbox.md deleted file mode 100644 index 62e991b..0000000 --- a/content/docs/3.components/checkbox.md +++ /dev/null @@ -1,2680 +0,0 @@ ---- -title: Checkbox -description: How to build a checkbox that people can check with a click on its label, that says what it means and when it's mixed, that forms send the way they expect, and that agents can check. -navigation: - icon: i-lucide-square-check ---- - -Checkboxes let people say yes or no to one thing, like agreeing to the terms, or asking for a newsletter. The browser has had one built in for as long as there have been forms, but its box is hard to style, so many teams rebuild it, and that's where it goes wrong. Think of a box so small you keep missing it, a label that does nothing when you click it, or a "Select all" that screen readers announce as unchecked when half its options are checked. - -This page walks you through building one the right way. We'll look at: -- **User Interface** (UI) - how a checkbox looks -- **User Experience** (UX) - how it behaves for every person and every input -- **Developer Experience** (DX) - how developers work with it -- **Agentic Experience** (AX) - how agents can read and verify it - -Every example on this page runs on our [reference implementation](/docs/components/checkbox#reference-implementation), which does its part of every rule in the [checklist](/docs/components/checkbox#checklist), so feel free to check and uncheck them as you read. The code under each example comes in React, Vue, Svelte, Angular, Solid, Astro and Vanilla, written for a Checkbox with the same API in each. Pick yours from the Framework select above the sidebar. Vanilla is plain HTML and JavaScript, so it writes out the markup from the [DOM contract](/docs/components/checkbox#deterministic). - -The Checkbox is one box with its label. Its hint and error message are elements of their own, which you link to it by ID, like the [Input](/docs/components/input)'s. A list of options that people check any number of is a group, with a `
` and a ``, which the [Checkbox Group](/docs/components/checkbox-group) builds out of Checkboxes. - -::checkbox-playground -:: - -## At a glance - -| Aspect | Checkbox | -| -------- | ---------------------------------------------------------------------------------------------- | -| Element | ``, inside the `