185 Pro components and page blocks

Get Pro

Updated

Field Slider

Pro

Preview

Customize

Start value40
Step1
Ticks41
Lean30°
Reach4.0
Colors

Installation

Pro

Field Slider is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/field-slider

Usage

import { FieldSlider } from "@/components/uibrik/field-slider/field-slider";​<FieldSlider  label="Volume"  defaultValue={40}  step={1}  ticks={41}  lean={30}  reach={4}  showValue  colors={["#9cc7ff", "#2f6bff"]}  disabled={false}  min={0}  max={100}  onChange={(value) => {}}  onCommit={(value) => {}}  // value={0}  // format={(value) => {}}  // name="…"/>

Where to use Field Slider

  • Volume and audio

    The leaning ticks give a plain range input the feel of a physical control, with no extra chrome.

    Pairs with Music Player and Elastic Slider

  • Settings panels

    A tick row sits quietly in a dense list of options and only comes alive where the user is pointing.

    Pairs with Settings Page and Segmented Control

  • Editors and filters

    Intensity, opacity and blur controls read clearly as a scale, with the filled side showing the amount at a glance.

    Pairs with Filter Bar

Props

FieldSlider
label
Type string
"Volume"
Shown above the ticks and used as the accessible name.
defaultValue
Type number
40
Starting value when uncontrolled.
step
Type number
1
Value increment.
ticks
Type number
41
Number of ticks across the row.
lean
Type number
30
Strongest lean, for the ticks right beside the handle.
reach
Type number
4
How far the pull reaches, in ticks.
showValue
Type boolean
true
Shows the value next to the label.
colors
Type string[]
["#9cc7ff","#2f6bff"]
Gradient across the filled ticks, from the start to the handle. Shades of one colour by default.
disabled
Type boolean
false
value
Type number
–
Controlled value.
onChange
Type (value: number) => void
–
Called as the value changes.
onCommit
Type (value: number) => void
–
Called once a drag or key press ends, with the final value.
min
Type number
0
Lowest value.
max
Type number
100
Highest value.
format
Type (value: number) => string
–
Formats the readout and the value read to screen readers, e.g. a percent or unit.
name
Type string
–
Form field name; adds a hidden input with the value.
className
Type string
–
Classes for the wrapper. It fills its container up to max-w-sm.