Checkbox
By clicking this checkbox, you agree to the terms.
Usage
Include CSS
Import Tailwind and one full A3S UI style bundle.
Or import only the base CSS, Checkbox component CSS, and one style pack.
Using CDN or bundler imports? See the Installation page.
Add your checkbox HTML
Add class="input" to checkbox inputs. Pair it with Field and a native <label> for layout and labeling.
Examples
Basic
Pair the checkbox with field and a native <label> for proper layout and labeling.
Description
Use a section and paragraph for helper text.
By clicking this checkbox, you agree to the terms and conditions.
Disabled
Use the disabled attribute to prevent interaction and add data-disabled to the .field component for disabled styles.
Invalid
Set aria-invalid="true" on the checkbox and data-invalid on the field wrapper to show invalid styles.
Group
Use multiple fields to create a checkbox list.
Table
| Name | Role | ||
|---|---|---|---|
| Sarah Chen | sarah.chen@example.com | Admin | |
| Marcus Rodriguez | marcus.rodriguez@example.com | User | |
| Priya Patel | priya.patel@example.com | User | |
| David Kim | david.kim@example.com | Editor |
RTL
Add dir="rtl" to the field group or an ancestor.
بالنقر على هذا المربع، فإنك توافق على الشروط.