Slider
Slider is part of the Forms and selection group. Range input primitive for numeric values.
Installation
Section titled “Installation”npx bambiui add slider --framework reactnpx bambiui add slider --framework solidnpx bambiui add slider --framework sveltenpx bambiui add slider --framework vueimport { Slider, SliderTrack, SliderRange, SliderThumb } from "@/components/ui/slider";
export function Example() { return <Slider />;}import { Slider, SliderTrack, SliderRange, SliderThumb } from "~/components/ui/slider";
export function Example() { return <Slider />;}<script lang="ts"> import { Slider, SliderTrack, SliderRange, SliderThumb } from "$lib/components/ui/slider";</script>
<Slider /><script setup lang="ts">import { Slider, SliderTrack, SliderRange, SliderThumb } from "@/components/ui/slider";</script>
<template> <Slider /></template>Preview
Section titled “Preview”
Slider preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use when approximate adjustment is better than exact typed input.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Slider. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”Slider, SliderTrack, SliderRange, SliderThumbTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-intent-primary-bg--bambi-border--bambi-ring