Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Slider

    Picks a value from a range. A thick rounded track and a slim handle with breathing room on both sides; press it and the handle thins, drag it and a bubble shows the value.

    Install

    npx shadcn@latest add @nelumbo/slider

    Basic

    The dot at the end of the track marks where it stops. Tab to the handle and use the arrow keys; Page Up and Down move in bigger steps.

    Range

    Pass two values for a range. Each handle is announced as the minimum or the maximum.

    $120$480

    Steps

    With marks, a dot shows every step. Use it for a handful of choices, not for fine steps.

    Large, with an icon

    The lg size is made for media and device controls. The icon sits inside the filled part, and moves past the handle when there is no room.

    Brand color

    For a slider that should carry the accent.

    In a form

    Show the value next to the title so it reads at a glance, and pass formatValue so screen readers hear the same text.

    Export settings
    Corner radius12 px
    Quality80%

    Usage

    import { Slider } from "@/components/ui/slider"​<Slider aria-label="Volume" defaultValue={[40]} valueLabel />​<Slider  aria-label="Price"  max={600}  step={10}  value={range}  onValueChange={setRange}  formatValue={(v) => `$${v}`}/>​<Slider size="lg" icon="volume_up" aria-label="Media volume" />

    Props

    Other props go to Radix Slider (value, defaultValue, onValueChange, onValueCommit, min, max, step, minStepsBetweenThumbs, name…).

    PropTypeDefaultNotes
    size"default" | "lg""default"16px or 40px track
    color"auto" | "neutral" | "brand""auto"
    marksbooleanfalseA dot for every step
    valueLabelbooleanfalseBubble with the value while dragging or focused
    formatValue(value: number) => stringStringUsed by the bubble and as aria-valuetext
    iconIconNamelg only, single value