Pico ships dedicated styles for common input types: textarea, select, checkboxes, radios, type="search", type="file", type="range", color and date pickers, and switches via type="checkbox" role="switch".
Checkboxes, radios, and switches
- Group related radios in a
fieldsetwith alegend(covered next lesson). - Toggle switches use the checkbox +
role="switch"pattern Pico documents—still native inputs, not custom div widgets. disabledandreadonlyuse browser semantics; Pico dims disabled controls automatically.
Submit vs button inputs
type="submit" and type="button" inputs render like buttons. Reset inputs get Pico’s secondary styling by default—use sparingly in production forms.
Self-check
- How do you style a toggle switch in Pico without a custom component?
- Which attribute disables a control for keyboard and assistive tech users?
- When is
textareapreferable to a single-lineinput?