Fusion UI LogoFusion UI Logo
Fusion UI LogoFusion UI Logo
/
Getting Started
Concepts
Components
Example Apps
Getting Started
Concepts
Components
Example Apps
Fusion UI LogoFusion UI Logo
Getting Started
Concepts
Components
Example Apps
Overview
Actions
Button
Button Group
Segmented Button
Deprecated
Split Button
Toggle Button
Click To Copy
Toolbar
Navigation
Main Nav
Side Menu
Page Header
Tabs
Breadcrumbs
On-Page Menu
Link
Command Menu
Application Switcher
Context Switcher
Account Menu
Menu Bar
Deprecated
Inputs & Forms
Form
Form Actions
Deprecated
Form Divider
Form Field
Form Repeat
Form Spacing
Input
Prefix & Suffix
Rich Text Input
Autocomplete
Select
Date / Time Input
Calendar
Slider
Selection
Checkbox
Radio
Switch
Switch Select
Chip
Chip Choice
Chip Filter
Chip Input
Chip Sortable
Visual Select
Pricing Plan Select
Feedback & Loading
Banner
Inline Message
Snackbar
Inline Snackbar
Loading Spinner
Skeleton
Text Skeleton
Contextual Information
Badge
Status
Tag
Tooltip
Info
Hotkey
Icon
Icon Sizer
Containers & Overlays
Tile
Tile Content
Tile Footer
Tile Header
Annotated Section
Modal
Sheet
Popover
Context Menu
Data Display
Data Table
List
Timeline
Data Visualization
KPI Card
Ratio Card
Bar Chart
Line Chart
Pie Chart
Heatmap Calendar
Layout
Container
Stack Layout
Flow Layout
Internals
Blanket
Expansion Panel
Menu List Base
Menu Group
Search Bar
Components
...
Slider

Slider

Picks a number or a range by dragging along a track.

Overview

Slider picks a number or a range between min and max. A number as value gives one thumb, a [from, to] tuple a range.

Budget
50 €200 €
"use client";
import React, {useState} from "react";
import {Slider} from "@brynlabs/fusion-ui";
export const SliderExample = () => {
const [value, setValue] = useState(100);
return (
<Slider
label={"Budget"}
min={50}
max={200}
formatLabel={value => `${value} €`}
value={value}
onChange={setValue}
/>
);
};

Ticks

Budget*
50 €200 €
50200
Helper Text
"use client";
import React, {useState} from "react";
import {Slider} from "@brynlabs/fusion-ui";
export const SliderTicksExample = () => {
const [value, setValue] = useState(100);
return (
<Slider
label={"Budget"}
hint={"Helper Text"}
required={true}
min={50}
max={200}
formatLabel={value => `${value} €`}
showTicks={true}
value={value}
onChange={setValue}
/>
);
};

Histogram with few values

A histogram above the track shows how the values are distributed.

Rating
1 ★5 ★
15
Every bar is centered on its rating, the first and last bar are half as wide.
"use client";
import React, {useState} from "react";
import {Slider} from "@brynlabs/fusion-ui";
// Maps every star rating to the number of reviews with that rating.
const ratingDistribution = {1: 12, 2: 8, 3: 25,4: 61, 5: 44};
export const SliderRatingExample = () => {
const [value, setValue] = useState<[number, number]>([3, 5]);
return (
<Slider
label={"Rating"}
hint={"Every bar is centered on its rating, the first and last bar are half as wide."}
min={1}
max={5}
formatLabel={value => `${value} ★`}
showTicks={true}
histogram={ratingDistribution}
value={value}
onChange={setValue}
/>
);
};

Range with histogram

Price range
50 €200 €
50200
Helper Text
"use client";
import React, {useState} from "react";
import {Slider} from "@brynlabs/fusion-ui";
// Maps prices to the number of products with that price.
const priceDistribution = {
50: 12,
60: 25,
70: 38,
80: 45,
90: 52,
100: 48,
110: 40,
120: 33,
130: 27,
140: 22,
150: 30,
160: 41,
170: 36,
180: 24,
190: 15,
200: 8,
};
export const SliderRangeExample = () => {
const [value, setValue] = useState<[number, number]>([100, 140]);
return (
<Slider
label={"Price range"}
hint={"Helper Text"}
min={50}
max={200}
step={10}
formatLabel={value => `${value} €`}
showTicks={true}
histogram={priceDistribution}
value={value}
onChange={setValue}
/>
);
};
On this page
  • Overview
  • Ticks
  • Histogram with few values
  • Range with histogram