Slider
Sets a number, or a low and a high bound, by its place along a scale, and lets the bounds of a range be typed exactly.
Examples
Match threshold
Funds with $1B to $50B in assets

3 funds
Usage
Use it when
- A number whose place on a known scale matters more than its exact figure, such as how close a name must be to count as a match.
- A range of numbers that people set roughly and sometimes exactly, such as a fund's assets or its age.
- A numeric filter in a filter row over a list, as one more pill beside the others.
Use something else when
- An exact number with no scale to place it on, such as a quantity. Use NumberField instead.
- One of a few named settings, such as daily or weekly. Use SegmentedControl instead.
- A filter over named choices, such as a fund's type. Use FilterBar instead.
- A range of dates. Use DatePicker instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/slider.json https://kaanarici.com/r/cobalt/range-filter.json https://kaanarici.com/r/cobalt/range.jsonimport { RangeField, rangeFieldLabels, Slider, sliderLabels, SliderValue } from "@/components/cobalt/ui/slider"import { RangeFilter, rangeFilterLabels } from "@/components/cobalt/ui/range-filter"import { describeRange, formatAmount, parseAmount, rangeWords, sameRange, type Bound, type Range } from "@/lib/cobalt/range"