Inputs
v1.0.0Added in 1.0.0
The iOS segmented control: pick one of a few options on a raised thumb that slides, and on touch drags along with your finger.
Click or tap an option and the raised thumb glides over to it on a quick spring; the hairlines next to it fade away. Press the thumb and it dips a little; keep holding and slide sideways to drag it across the options, the value follows the finger and settles where you let go. A vertical swipe still scrolls the page. With the keyboard the control is one tab stop: Left and Right (Up and Down too) move and select, Home and End jump to the ends, and disabled options are skipped. Icon-only options show their name in a tooltip on hover and focus, or on a long press on touch. On a phone the medium size is 44px tall and fullWidth shares the width between options. With dir set to rtl the arrows and the drag mirror.
npx wingo-ui@latest add segmented-controlPro item: the CLI needs a Pro account. See plans