Skip to content

Slider / range

In review
Live · web

Single value: drag the thumb, or tab to it and use the arrows

Output volume48%

Stepped: snaps to ticks; the value bubble rides the thumb on hover / focus / drag

Render quality3 / 6

Range: two thumbs (min / max) that can't cross; each is its own labeled slider

Price band$20 to $70

Sampling: the real Local Engine knob ranges (Sampling.kt); value is mono, accent when set

Temperature1.00
Top-P (nucleus)1.00
Top-K40

Disabled: inert, still legible

Locked by policy60%

Sizes: sm and md

Small
Medium

Track + fill + thumb are all var(--token). The track is a recessed well, the fill is the plain cyan accent, the thumb is a lifted disc (neutral shadow + catch-light, never a glow). Only transform / shadow / brightness move; no fill tweens. The island is live.

// Web: React, consuming @dizyx/nockerl-tokens. (Web is the laggard platform;
// this is the canonical API the published @dizyx/nockerl-react package exposes.)
import { NockerlSlider, NockerlRangeSlider } from '@dizyx/nockerl-react';
export function SamplingControls() {
const [temp, setTemp] = useState(1.0);
const [band, setBand] = useState({ low: 20, high: 70 });
return (
<>
{/* Real Local Engine sampling ranges (Sampling.kt) */}
<NockerlSlider label="Temperature" value={temp} onChange={setTemp} min={0.1} max={2.0} step={0.05} />
<NockerlSlider label="Top-P (nucleus)" value={topP} onChange={setTopP} min={0} max={1} step={0.01} />
{/* Stepped with tick marks */}
<NockerlSlider label="Render quality" value={q} onChange={setQ} min={0} max={6} step={1} ticks />
{/* Two-thumb range; thumbs can't cross */}
<NockerlRangeSlider label="Price band" low={band.low} high={band.high}
onChange={(low, high) => setBand({ low, high })} min={0} max={100} step={5} unit="$" />
</>
);
}
PropTypeDefaultDescription
value *number
onChange *(v: number) => void
minnumber0
maxnumber100
stepnumber1
unitstring''
label *string
sizeNockerlSliderSize'md'
disabledbooleanfalse
ticksbooleanfalseRender tick marks + min/max tick labels under the lane (stepped slider).

Also accepts the native <div> attributes (e.g. onClick, disabled, id, aria-*, data-*), forwarded straight through, plus a forwarded ref.

NockerlRangeSlider swaps value for low / high and takes onChange={(low, high) => …}; the two thumbs are bound so they can never cross. It takes a subset of the props above (low, high, onChange, min, max, step, unit, label, size), so it accepts neither disabled nor ticks.

Cross-platform drift (tracked for reconciliation)

The single-thumb slider has a settled shape on every platform: the Swift tab documents the NockerlSlider wrapper from NockerlDesign, and the Kotlin tab the Material Slider used for the sampling knobs. The two-thumb range is where the platforms still diverge.

  • Range slider: the two-thumb range is the least settled surface on this page. The Kotlin tab composes Material’s RangeSlider for the shape rather than mirroring a screen, and the Swift tab carries it as a follow-up (SwiftUI has no native range Slider). The value bubble and explicit tick marks are also designed originally here.
  • Swift look: NockerlSlider wraps the native Slider and tints it cyan (accentPrimary) with a persistent Nockerl label; the recessed-well / lifted catch-light disc treatment is still the target the platforms should converge on.
  • Temperature range: the real SAMPLING_KNOB_SPECS (Sampling.kt) uses 0.1 to 2.0 step 0.05, not the rounder “0 to 2 step 0.1”; the demo + code use the shipped values.
  • Look: Android uses Material’s default thumb/track; the recessed well + lifted catch-light disc is the Nockerl treatment the platforms should converge on.