🏠

Tailwind CSS Concept Explained

Styling Common Web Page Parts

Style checkboxes and radio buttons.

Skill ID: StylingCommonParts_15

Description: Change the default look of those little square checkboxes or round radio buttons.

Where to apply: Forms asking for choices, settings panels.

Key Tailwind Classes:

accent-blue-500 , or @tailwindcss/forms classes

Gotcha: Trying to extensively style the shape and size of native checkboxes/radios without the @tailwindcss/forms plugin or using appearance-none (and then rebuilding the look from scratch) is very difficult. accent-blue-500 only changes the color of the browser's default controls.

Example 1:

Example 2:

Example 3:

Example 4:

Example 5:

Example 6:

Example 7:

Example 8:

Example 9:

🏠