# SliderProps (@salmonui/inputs/slider)

> The SliderProps interface of @salmonui/inputs/slider.

Canonical: https://salmonui.dev/docs/reference/inputs/slider/SliderProps

```ts
import type { SliderProps } from '@salmonui/inputs/slider';
```

Entry index: https://salmonui.dev/docs/reference/inputs/slider (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/inputs/slider.md).

## Reference

Kind: interface

```ts
interface SliderProps<T extends SliderValue = number> extends FieldCommonProps {
    readonly value?: T | undefined;
    readonly defaultValue?: T | undefined;
    readonly onValueChange?: ((value: SliderValueOf<T>, details: SliderChangeDetails) => void) | undefined;
    readonly onValueCommit?: ((value: SliderValueOf<T>, details: SliderChangeDetails) => void) | undefined;
    readonly min?: number | undefined;
    readonly max?: number | undefined;
    readonly step?: number | undefined;
    readonly pageStep?: number | undefined;
    readonly values?: readonly SliderScalar[] | undefined;
    readonly minStepsBetweenThumbs?: number | undefined;
    readonly fill?: boolean | undefined;
    readonly orientation?: 'horizontal' | 'vertical' | undefined;
    readonly ticks?: SliderTicks | undefined;
    readonly renderTick?: ((ctx: SliderTickContext) => ReactNode) | undefined;
    readonly valueLabel?: SliderValueLabel | undefined;
    readonly formatOptions?: Intl.NumberFormatOptions | undefined;
    readonly locale?: string | undefined;
    readonly limits?: SliderLimits | undefined;
    readonly name?: string | undefined;
    readonly form?: string | undefined;
    readonly disabled?: boolean | undefined;
    readonly readOnly?: boolean | undefined;
    readonly localeText?: SliderLocaleText | undefined;
    readonly id?: string | undefined;
    readonly dir?: 'ltr' | 'rtl' | 'auto' | undefined;
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly classNames?: {
        readonly label?: string;
        readonly control?: string;
        readonly track?: string;
        readonly range?: string;
        readonly thumb?: string;
        readonly valueLabel?: string;
        readonly ticks?: string;
        readonly tick?: string;
        readonly description?: string;
        readonly error?: string;
    } | undefined;
    readonly ref?: Ref<HTMLDivElement> | undefined;
}
```

Members (36):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `value` | `readonly value?: T \| undefined;` | optional | Controlled value: a number (or `values` entry), or `[start, end]` for two thumbs. |
| `defaultValue` | `readonly defaultValue?: T \| undefined;` | optional | Default `min` (`[min, max]` for a range is chosen by passing a tuple). |
| `onValueChange` | `readonly onValueChange?: ((value: SliderValueOf<T>, details: SliderChangeDetails) => void) \| undefined;` | optional | While the value changes; at most once per animation frame during a drag. |
| `onValueCommit` | `readonly onValueCommit?: ((value: SliderValueOf<T>, details: SliderChangeDetails) => void) \| undefined;` | optional | When a drag ends (pointerup) or a key is released. |
| `min` | `readonly min?: number \| undefined;` | optional | Default 0. |
| `max` | `readonly max?: number \| undefined;` | optional | Default 100. |
| `step` | `readonly step?: number \| undefined;` | optional | Default 1. |
| `pageStep` | `readonly pageStep?: number \| undefined;` | optional | PageUp / PageDown distance. Default a tenth of the range rounded to `step` (at least `step`). |
| `values` | `readonly values?: readonly SliderScalar[] \| undefined;` | optional | Discrete entries; the value is an entry and `min` / `max` / `step` are ignored. |
| `minStepsBetweenThumbs` | `readonly minStepsBetweenThumbs?: number \| undefined;` | optional | Smallest distance between the thumbs of a range, in steps. Default 0. |
| `fill` | `readonly fill?: boolean \| undefined;` | optional | Fills the track from `min` to the thumb. A range always fills between its thumbs. |
| `orientation` | `readonly orientation?: 'horizontal' \| 'vertical' \| undefined;` | optional |  |
| `ticks` | `readonly ticks?: SliderTicks \| undefined;` | optional |  |
| `renderTick` | `readonly renderTick?: ((ctx: SliderTickContext) => ReactNode) \| undefined;` | optional | Tick content; default the label of major ticks. |
| `valueLabel` | `readonly valueLabel?: SliderValueLabel \| undefined;` | optional |  |
| `formatOptions` | `readonly formatOptions?: Intl.NumberFormatOptions \| undefined;` | optional | `Intl.NumberFormat` options of `aria-valuetext` and the default labels. |
| `locale` | `readonly locale?: string \| undefined;` | optional | Formatting locale. Default `'en-US'`; the host locale is never read. |
| `limits` | `readonly limits?: SliderLimits \| undefined;` | optional |  |
| `name` | `readonly name?: string \| undefined;` | optional |  |
| `form` | `readonly form?: string \| undefined;` | optional |  |
| `disabled` | `readonly disabled?: boolean \| undefined;` | optional |  |
| `readOnly` | `readonly readOnly?: boolean \| undefined;` | optional | Focusable, announced, but not changeable. |
| `localeText` | `readonly localeText?: SliderLocaleText \| undefined;` | optional |  |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `dir` | `readonly dir?: 'ltr' \| 'rtl' \| 'auto' \| undefined;` | optional |  |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |
| `classNames` | `readonly classNames?: {     readonly label?: string;     readonly control?: string;     readonly track?: string;     readonly range?: string;     readonly thumb?: string;     readonly valueLabel?: string;     readonly ticks?: string;     readonly tick?: string;     readonly description?: string;     readonly error?: string; } \| undefined;` | optional | Part classes: `root` is `className`. |
| `ref` | `readonly ref?: Ref<HTMLDivElement> \| undefined;` | optional | The root element. |
| `label` | `label?: ReactNode;` | optional, inherited |  |
| `description` | `description?: ReactNode;` | optional, inherited |  |
| `errorMessage` | `errorMessage?: ((ctx: { readonly errors: readonly string[]; }) => ReactNode) \| ReactNode;` | optional, inherited | Error text (or a function of the errors) shown while the field is invalid. |
| `invalid` | `invalid?: boolean;` | optional, inherited | Forces the error state. |
| `validation` | `validation?: FieldValidation;` | optional, inherited | Rules in the Data Grid vocabulary. |
| `validateOn` | `validateOn?: ValidateOn;` | optional, inherited | When errors appear; default the `Form`'s, else `'blur'`. |
| `size` | `size?: FieldSize;` | optional, inherited | Metric set. Default `'md'`. |
