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
Source
Design
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
| Name | Type | Default Value | Description | Usage count |
|---|---|---|---|---|
| disabled | booleanundefined | false | ||
| initialViewWidth | numberundefined | Dimensions.get("window").width - 2 * screenHorizontalPadding | ||
| labelForValue | 2 possibilities((value: number, valueIndex: number) => string)undefined | |||
| maximumLabel | stringundefined | undefined | ||
| maximumValue* | number | |||
| minimumLabel | stringundefined | undefined | ||
| minimumValue | numberundefined | 0 | ||
| onChange | ((value: number) => void)undefined | |||
| snapToMiddleOnly | booleanundefined | false | ||
| value | stringnumberundefined | undefined | ||
| variant | SegmentSliderVariantundefined | neutral |