XiodUI
HomeDocs
OverviewComponentsStyling & CustomizationChangelog

Components

  • Accordion
  • Agent Steps
  • Alert
  • Alert Dialog
  • Aspect Ratio
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Button Split
  • Calendar
  • Card
  • Carousel
  • Checkbox
  • Circular Progress
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy To Clipboard
  • Corner Badge
  • Dashboard Grid
  • Date Picker
  • Dialog
  • Dot Matrix
  • Draggable
    Updated
  • Drawer
  • Empty
  • Field
  • Fieldset
  • File Upload
    Updated
  • Form
  • Frame
  • Gauge
  • Grid
  • Group
  • Input
  • Input Group
  • Input OTP
  • Input Payment
  • Input Phone
    Updated
  • Input Sensitive
  • Kbd
  • Kinetic Click
  • Label
  • List Box
    Updated
  • Loader
  • Marker
  • Menu
  • Menubar
  • Message
  • Meter
  • Morphic Toast
  • Navigation Menu
  • Number Field
  • Option Picker
  • Orb
  • Pagination
  • Popover
  • Preview Card
    Updated
  • Progress
  • Radio
  • Resizable
  • Ruler Picker
  • Scroll Area
  • Scroll Bar
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Sortable
  • Switch
  • Table
  • Tabs
  • Text
  • Textarea
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
  • Waveform
  • Wheel Picker

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Ruler Picker

Previous: ResizableNext: Scroll Area

A value picker drawn as a ruler the user scrolls along.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import { RulerPicker } from "xiod-ui/ruler-picker";

API Reference

Detailed documentation of properties and options.

RulerPicker

Accepts render, plus every native <div> attribute.

PropTypeDefaultDescription
defaultValue
number
–

The value selected at first, when it isn't controlled. Defaults to min.

disabled
ResizableScroll Area
boolean
false

Whether the ruler ignores input.

format
((value: number) => string)
–

Formats a value for the marks and for screen readers, such as (v) => ${v} kg``.

itemWidth
number
80

The distance between two marks, in pixels.

labels
Partial<RulerPickerLabels>
–

Replaces the built-in text for this instance. See LabelsProvider to change it everywhere.

max
number
100

The highest value on the ruler.

min
number
0

The lowest value on the ruler.

name
string
–

The form field name. The value is submitted under it.

onChange
((value: number) => void)
–

Called with the new value as the ruler settles on a mark, by scrolling, dragging or the keys. Not called when value changes from outside.

size
"lg"|"md"|"sm"
md

The size of the component.

step
number
1

The distance between two marks, in value. Use 0.5 or 0.1 for fractions.

subDivisions
number
4

The number of small ticks drawn between two marks. With 9, the middle tick is drawn longer.

value
number
–

The selected value. Use with onChange to control it.