Checkbox

@sushindustries/ui

A native checkbox with its words attached, painted by accent-color rather than redrawn.

4 min read
View as MarkdownEdit on GitHub

Props

Accepts every prop of Omit<InputHTMLAttributes<HTMLInputElement>, "type">, plus:

PropTypeDefaultDoes
labelstring-

Notes

Every prop except type passes straight through to the underlying <input>, so checked, onChange, disabled, required and any aria-* attribute all work exactly as they would on a plain checkbox. type is not exposed at all - the component fixes it to "checkbox", so there is no way to accidentally render a radio through this component.