Inputs and controls
The fields, buttons and switches people use to enter data or change settings: text fields, dropdowns, sliders, date and time pickers.
32 elements in this category, each with a live preview and its name in English, Arabic and code.
role="radiogroup"Segmented Control (Toggle Group)
A connected row of buttons where exactly one option is selected.
<input type="checkbox" role="switch">Switch (Toggle)
A sliding control that turns a setting on or off immediately.
<input type="checkbox">Checkbox
A small box you tick; each option is independent, so you can select several.
<input type="radio" name="…">Radio Button
Small circles in a group where only one can be chosen.
<input type="range">Slider
A track with a knob — the thumb — that you drag to pick a value from a range.
<input type="number">Stepper (Number Input)
Minus and plus buttons around a number that change it one step at a time.
<button aria-pressed>Chip (Tag / Pill)
A small capsule holding a word — a filter, choice, or entered value — often removable with an ×.
placeholder="…"Placeholder Text
The gray hint inside an input that disappears as soon as you type.
role="combobox" + <datalist>Combobox (Autocomplete)
A text field with a list of suggestions that filters as you type.
:focus-visibleFocus Ring
The colored outline around a control when you reach it with the keyboard.
<select> + <option>Select (Dropdown)
A field that drops open a list of options; pick one and it closes.
<input type="date">Date Picker
A small calendar that opens from a date field so you can pick a day or a range.
<label for> + <input> + aria-describedbyForm Field
A complete input with all its parts: label, field, helper text and the red error line.
<textarea> + resize: verticalTextarea (Resize Handle)
A multi-line text box, often with three diagonal lines in the corner you drag to enlarge it.
<input type="password"> + toggle buttonPassword Visibility Toggle
The eye icon inside a password field that reveals the characters instead of dots.
<input autocomplete="one-time-code" inputmode="numeric">OTP Input (Verification Code)
A row of small boxes, one digit each, for the code you received by SMS or email.
<input type="file"> + drop eventsFile Upload (Dropzone)
A dashed area where you drop files or click to choose them from your device.
role="radiogroup" + <input type="color">Color Swatch Picker
Small colored circles or squares to choose from; the chosen one gets a ring.
role="radiogroup" (5 radios)Star Rating
Five stars you tap to give a score, or that show an average rating.
two <input type="range">Range Slider (Dual Thumb)
A track with two thumbs that set a minimum and maximum, like a price range.
<input type="time">Time Picker
A field or clock face for choosing hours and minutes.
<input> + list of <button>sTag Input (Token Field)
A field where each word you type turns into a small removable capsule.
<input type="tel" autocomplete="tel">Phone Number Input
A phone field with a small country flag and dial-code picker before the number.
contenteditable / swap to <input>Inline Edit (Click to Edit)
Plain text that turns into an input when clicked, so you edit and save in place.
role="toolbar" + contenteditableRich Text Toolbar
The strip above an editor with bold, italic, lists and link buttons.
<select> (native on iOS)Picker Wheel
A spinning column of values like a drum; the middle row is selected. Common on iPhone.
:placeholder-shown + CSS transformFloating Label
The label sits inside the field, then shrinks and floats up when you start typing.
<button> + <button aria-haspopup="menu">Split Button
A two-part button: the main side runs the default action, the arrow opens related ones.
<button aria-label="…">Icon Button
A button showing only an icon with no text, like heart, share or delete.
<button class="primary|secondary|ghost">Button Variants (Primary, Secondary, Ghost)
Buttons ranked by importance: filled primary, outlined secondary, ghost, and link.
<button aria-busy="true" disabled>Loading Button
A button that shows a spinner after you press it, so it can’t be pressed twice.
draggable + drop events / Pointer eventsDrag and Drop
You grab an item and move it elsewhere, with grip dots and a shadow showing where it lands.