Неделя запускаСкидка 50% на год AuteurТарифы
Все компоненты

Segmented control Бесплатно

A pill that slides on a spring, with a tick you can feel as it lands.

Открыть в редакторе
Показано в
HealthSteps
61,208steps this week

The pill slides to the range you pick, and the numbers count to it.

Характер
Игривый
Зарегистрируйтесь бесплатно, чтобы скачать

Подходит для

  • Two to five views of the same thing: ranges of a chart, delivery or collection.

Не подходит для

  • More than five options, or long labels. Use a menu.
  • Switching between unrelated screens. That’s a tab bar.

Пропсы

Прочитаны прямо из TypeScript компонента, поэтому всегда актуальны.

ПропсТипПо умолчанию
optionsОбязательный{ id: T; label: string }[]
valueОбязательныйT
onChangeОбязательный(v: T) => void
labelОбязательныйstring
size'sm' | 'md''md'

Лучше с навыком

Добавьте навык агенту, и он будет использовать Segmented control так, как задумано.

Spacing and buttonsБесплатно

Sizes and spaces it on the same scale as the rest of the page, so it sits right.

$npx velvo skill spacing-and-buttons
Открыть навык
Motion with weightБесплатно

Keeps its springs and press feel intact when your agent wires it into your app.

$npx velvo skill velvo-motion
Открыть навык

Specs

Category
Controls
Tier
Free
Built with
React and TypeScript
Files
16
Size
303 KB
Needs
framer-motion
Install
npx velvo add segmented
Works with
Next.js, Vite, Remix, Expo web

Licence

Velvo free licence
  • Personal and commercial use
  • Change it however you like
  • No credit needed

Not for resale as a component or a UI kit.

Tags

controlsspringcontrolfreereact
ДальшеToggle