my/ui

Command Palette

Search for a command to run...

All components

Slider Reference Labels

sliders

Origin UI component.

responsive · 600px

Install

Same command in any shadcn project — React (Vite/CRA), Next.js, Remix, Astro, and more:

$npx shadcn@latest add https://your-domain/r/comp-245.json

Usage

import Cmp from "@/registry/origin-ui/comp-245";

export default function Demo() {
  return <Cmp />;
}

Component source

import { Label } from "@/components/ui/label";
import { Slider } from "@/components/ui/slider";

export default function Component() {
  return (
    <div className="*:not-first:mt-4">
      <Label>Slider with reference labels</Label>
      <div>
        <Slider
          aria-label="Slider with reference labels"
          defaultValue={[15]}
          max={35}
          min={5}
        />
        <span
          aria-hidden="true"
          className="mt-4 flex w-full items-center justify-between gap-1 font-medium text-muted-foreground text-xs"
        >
          <span>5 GB</span>
          <span>20 GB</span>
          <span>35 GB</span>
        </span>
      </div>
    </div>
  );
}

Source: Origin UI