Did you know?dyk.si

Checkbox

A small box you tick; each option is independent, so you can select several.

<input type="checkbox">

When to use it

For picking several items from a list, or agreeing to terms.

Common mistake

If only one choice is allowed, use radio buttons.

Accessibility

Make the whole label clickable, not just the box.

Name in code

HTML/CSS<input type="checkbox">
React<Checkbox>
Jetpack ComposeCheckbox / TriStateCheckbox
SwiftUIToggle().toggleStyle(.checkbox)

Ready prompt for your coding agent

Add a Checkbox to this screen. What it is: A small box you tick; each option is independent, so you can select several. Implement with: <input type="checkbox"> (HTML/CSS). Accessibility: Make the whole label clickable, not just the box. When to use it: For picking several items from a list, or agreeing to terms. Avoid: If only one choice is allowed, use radio buttons. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.

Often confused with others?

⇄ Switch vs. Checkbox vs. Radio