Skip to main content
Brand and assets
Build
Monitor and contribute
/
Component library
  • All components
  • Buttons & actions
  • Forms & inputs
    • Checkbox
    • ChoiceGroup
    • CurrencyInput
    • DateInput
    • FileInputZone
    • Filters
    • Form
    • MaskedTextInput
    • PasswordInput
    • Pill
    • Pill
    • Radio
    • SearchInput
    • SegmentedSlider
    • Select
    • Switch
    • TextArea
    • TextInput
  • Layout & containers
  • Overlays
  • Feedback & status
  • Data display
  • Typography
  • Accessibility
  • Contrib
  • Deprecated
  • Forms & inputs
  • SegmentedSlider

SegmentedSlider

Picks a value on a scale by dragging, snapping to each step. Each step can carry its own label, and the colour variants run good-to-bad or bad-to-good for answers that have a direction.

Health
Component health
Source
View on Github
Design
View Figma
Accessibility
unknown
Platform
Mobile
📱 Mobile-only
This component is only for mobile. To see how it looks like you can check the mobile storybook with:
yarn workspace alan-mobile dev:install-client -p ios
yarn workspace alan-mobile dev:storybook
  • Overview
  • Props
  • Figma

SegmentedSlider props

NameTypeDefault ValueDescriptionUsage count
disabledbooleanundefinedfalse
initialViewWidthnumberundefinedDimensions.get("window").width - 2 * screenHorizontalPadding
labelForValue
2 possibilities((value: number, valueIndex: number) => string)undefined
maximumLabelstringundefinedundefined
maximumValue*number
minimumLabelstringundefinedundefined
minimumValuenumberundefined0
onChange((value: number) => void)undefined
snapToMiddleOnlybooleanundefinedfalse
valuestringnumberundefinedundefined
variantSegmentSliderVariantundefinedneutral
Edit this page
Previous
SearchInput
Next
Select