Sections
Get Started
Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Filter
- Form
- Hover Card
- Image
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Mega Menu
- Menubar
- Native Select
- Navigation Menu
- Number Field
- Pagination
- Pin Input
- Popover
- Price
- Progress
- Radio Group
- Radio Stack
- Range Calendar
- Rating
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Stepper
- Swatch
- Swatch Group
- Switch
- Table
- Tabs
- Tags Input
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Forms
<script setup lang="ts">
import { Slider } from '@/components/ui/slider'
</script>
<template>
<Slider
:default-value="[50]"
:max="100"
:step="1"
class="w-[60%]"
/>
</template>Installation
pnpm dlx @frontic/ui add slider
Usage
<script setup lang="ts">
import { Slider } from '@/components/ui/slider'
</script>
<template>
<Slider :default-value="[33]" :max="100" :step="1" />
</template>Examples
Label
Use the label prop to add an accessible label above the slider.
<Slider label="Volume" :default-value="[50]" :max="100" :step="1" />Legend
Use the show-legend prop to display min/max values below the slider.
01000
<Slider label="Price" show-legend :default-value="[250]" :min="0" :max="1000" :step="10" />Range
Pass an array with two values to create a range slider with two thumbs.
01000
<Slider label="Price Range" show-legend :default-value="[100, 500]" :min="0" :max="1000" :step="10" />