lotusui
A Go design system for desktop and mobile — one codebase, native apps. Web when you want it.
GitHub

Slider

The draggable value: track, brand fill, a ringed thumb.

Value is a fraction in [0, 1] — map it to your domain at the call site. Press or drag anywhere on the control; Step snaps to multiples.

Installation

Use the module import (the default), or own the source: lotusui add vendors the component into your app and lotusui update keeps the copy mergeable — see Registry.

Go
go get github.com/ikaito-com/lotusui

# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add slider

Usage

open demo ↗

Step

open demo ↗

Disabled

open demo ↗

Range

Values with two entries — two thumbs, the fill between them; each stays between its neighbors.

open demo ↗

Multiple

Any number of entries — one thumb each.

open demo ↗

Vertical

Vertical rotates the axis; cap the height at the call site — the value grows upward.

open demo ↗

API

OptionTypeDescription
Valuefloat32Fraction in [0, 1] — map to your domain at the call site.
Values[]float32Multi-thumb mode: one thumb per entry, kept ordered; two = range.
Stepfloat32Snaps to multiples; zero = continuous.
VerticalboolRotates the axis; the value grows upward.
DisabledboolDimmed, inert.

lotusui is a Go design system for native desktop and mobile — and the web when you want it. Docs demos are the real components (WebAssembly) — one gallery app, each Preview an iframe addressed by URL hash.