Histogram Range
Диапазон цен с гистограммой, двумя ползунками и полями. Pro · Формы и ввод › Флажки и ползунки
Установка
npx valyro-cli@latest login
npx valyro-cli@latest add histogram-range
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { HistogramRange } from 'valyro-ui-pro';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
histogram * | number[] | Counts per bucket, evenly spread from min to max (e.g. listings per price step). | |
min * | number | Lowest selectable value. | |
max * | number | Highest selectable value. | |
step | number | 1 | Granularity of the thumbs and the fields. Default 1. |
value | [number, number] | Selected range (controlled). | |
defaultValue | [number, number] | Initial value when uncontrolled. | |
onValueChange | (value: [number, number]) => void | Called with the new value when it changes. | |
prefix | ReactNode | Text before the numbers in the fields: "quot;, "₽". | |
suffix | ReactNode | Text after the numbers in the fields: "kg", "₽". | |
showInputs | boolean | true | Shows the two number fields under the slider. Default true. |
histogramHeight | number | 56 | Height of the histogram in px. Default 56. |
formatValue | (value: number) => string | Formats values for the thumbs' screen reader text. | |
name | string | Form field name; the range submits as two values. | |
locale | string | BCP 47 locale for the numbers in the fields. | |
disabled | boolean | false | Disables the whole control. |
labels | Partial<HistogramRangeLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Похожие компоненты
- Checkbox — Флажки
- Checkbox Group — Флажки с общей подписью, подсказкой, ошибкой и обязательностью
- Radio Group — Выбор одного варианта
- Switch — Переключатель
- Slider — Ползунок
- Rating Input — Оценка звёздами
- Text Input — Текстовые поля
- Textarea — Многострочный ввод
- Search Input — Поисковая строка
- Mentions Input — Текст с @упоминаниями и #тегами, асинхронные подсказки
- Tags Input — Ввод тегов
- Select — Выбор из списка
Назад: Slider · Далее: Rating Input · Весь раздел «Формы и ввод»