Skip to content
Forms

Slider

Pick a value or a range.

Import

tsx
import { Slider } from "@cronus-ui/ui";
bash
npx cronus-ui add slider

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
half.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component SliderHalf layout:inline style:slider {
  value:50
  aria-label:"Volume"
  label "Volume"
}

page "/audit/slider/half" type:custom {
  use SliderHalf
}

API Reference

Generated from the component's exported types.

SliderProps

Extends ComponentPropsWithoutRef<typeof SliderPrimitive.Root>

Skip SliderProps props table
PropTypeDefaultDescription
value
number[]—Controlled thumbs. Pair with `onValueChange`.
defaultValue
number[]—Uncontrolled initial thumbs.
onValueChange
(value: number[]) => void—Called when the value changes.
onValueCommit
(value: number[]) => void—Called when a thumb is released.
min
number0—
max
number100—
step
number1—
disabled
boolean—Disables pointer and keyboard interaction.
orientation
"horizontal" | "vertical"——
dir
"ltr" | "rtl"—Reading direction. Inherits from the document when omitted.
name
string—Submitted name when used in a form.