PrimeBrickPrimeBrick
  • Docs
  • Contact
  • MIT License
  • Documentation
  • MCP Server
  • API Catalog
  • Services
  • Libraries
PrimeBrickPrimeBrick

© 2026 PrimeBrick. MIT License. v3.11.2

github
Backend
Frontend
    Developer Guide
      OverviewGetting startedUI stackApp shell & sidebarAuthentication & sessionsSystem settingsUI componentsUI patternsIcon ConventionsInput AnatomyField Hints & TooltipsButton Style StandardsEntity metadatai18n — Translations on the FrontendThe AI Tool Loop (caller-driven)Error HandlingComposables (use* hooks)
      Components
        Entity list tableComboSelectDynamicIconColorSelectorColorPickerAvatarPreviewEventCardCommandPaletteAppShellAppSidebarAppTopbarAppPageLayoutAppPageScaffoldAppPageBreadcrumbAppServerBannerBrowserClientInfoLangSelectThemeToggleSidebarAppLauncherSidebarHealthBadgeSidebarOrgSwitcherSidebarProfileMenuSidebarVersionBadgeButtonButton (async)FormPageLayoutFormLabelWithPriorityHelpPasswordChecklistChoiceboxDateWheelPickerEventToastLoadingBarMetadataLoadingJsonTableViewerNumberTickerStatCardToolbarDialogBorderedEntity Confirm DialogsSheet panelRFCErrorDialogLoginFormPasskeyButtonPasskeyEnrollmentAuthMethodsPromptDialogSessionExpiredDialogInputSliderSliderFieldSwitchFieldSelectableFieldsetBadgeValuesEditorTooltipFormPrimeFieldSmartRegexInput
      API Reference
Microservices
powered by Zudoku
Components

Slider

src/lib/components/ui/slider/slider.svelte

Purpose

A single-value range slider for bounded numeric settings (e.g. temperature 0–2 step 0.1). value is a bindable number.

Origin

Primebrick wrapper over the bits-ui Slider primitive (Slider.Root/Range/Thumb), styled after the shadcn-svelte™ slider (track bg-primary/20, filled Range, bordered thumb).

Usage

Basic

Code
<script lang="ts"> import Slider from "$lib/components/ui/slider/slider.svelte"; let temperature = $state(0.1); </script> <Slider bind:value={temperature} min={0} max={2} step={0.1} />

Tones

The filled range is a semantic gradient (never a flat color), selected via tone — same color pairs as the border-{tone}-gradient utilities:

toneRange gradient
primary (default)sky-400 → indigo-400
destructiverose-400 → red-600
warningyellow-300 → yellow-500
infosky-400 → blue-600
successemerald-400 → emerald-600

The track (bg-{tone}/20) and thumb border (border-{tone}/50) follow the same tone.

Code
<Slider bind:value={level} tone="warning" min={0} max={10} />

Nullable "inherit" ranges — use SliderField

When null means "inherit a default" (e.g. per-assistant overrides over model defaults), do NOT pair Slider with a numeric Input — use SliderField, the single reusable component for that pattern (slider + reactive label + reset-to-inherit).

Props

PropTypeDefaultNotes
valuenumber (bindable)0current value
min / maxnumber0 / 100range bounds
stepnumber1granularity
disabledbooleanfalsedims the control
tone'primary' | 'destructive' | 'warning' | 'info' | 'success''primary'semantic gradient of the range/track/thumb
onValueChange(v: number) => void—live drag callback (bits-ui passthrough)
classstring—appended to Root
Last modified on October 28, 2026
InputSliderField
On this page
  • Purpose
  • Origin
  • Usage
    • Basic
    • Tones
    • Nullable "inherit" ranges — use SliderField
  • Props