What is Form Select?
A form select is an HTML element that allows users to choose one or more options from a dropdown list.
A form select is an HTML element that lets users choose one or more options from a dropdown list. It’s commonly used for choosing items like country names, payment methods, or other categorical data. Astral.CSS offers an easy way to customize the appearance of your form selects to create a smoother, more intuitive user experience.
To give your dropdowns a stylish makeover, simply apply the form-select
class. This triggers custom styles that transform the initial appearance of the <select>
element, improving its look and feel.
<select>
’s initial appearance and cannot modify the <option>
s due to browser limitations.
Here’s a basic example of how to create a custom dropdown with Astral.CSS:
Need users to select multiple options? The multiple
attribute allows for a multi-select dropdown.
If you want to disable a dropdown (so users can’t interact with it), simply add the disabled
attribute.
Designed and built with ♥ by Rume Aluya.