Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Color Slider

A color slider component for adjusting individual color channels.

vu-color-slider · @velkin/react/color-slider

Copy page

Import

React
npm i @velkin/react

import { VuColorSlider } from "@velkin/react/color-slider";

Examples

API

Props

PropTypeDefaultDescription
channelVuColorSliderChannel"hue"Which channel this slider edits.
valuestring"#808080"Current color as a CSS string (two-way bindable).
colorSpace"" | "hsb" | "hsl" | "rgb"""Color model when not inferable from `value` / `channel`. Leave blank to auto-resolve.
orientationVuColorSliderOrientation"horizontal"Layout axis.
stepnumberNaNKeyboard step in the channel's native units. NaN uses channel defaults.
baseColorstring""Opaque color the alpha track fades up to; when blank, derived from the RGB of `value`.
labelstring""Accessible name. Defaults to a channel-appropriate label.
showErrorsbooleanfalseShows validation after activation.
validationActivebooleanfalseDrives invalid styling after activation.
invalidbooleanfalseTrue when the last validation run found errors.

Events

EventDetailDescription
vu-inputVuColorSliderChangeDetailContinuous: every drag tick / key press.
vu-changeVuColorSliderChangeDetailCommit: pointer release or discrete key move.
vu-invalidCustomEventWhen validation messages are recomputed while `validationActive`.

Slots

SlotDescription
errorReplaces default validation message list when assigned.

CSS parts

PartDescription
trackThe clickable gradient strip for the active channel.
thumbThe position indicator.
liveVisually-hidden live region announcing the value on commit.
fieldColumn that stacks the track and optional error.
error-messageRegion for `slot="error"` or stacked default validation lines.
error-lineOne default validation string when `slot="error"` is empty.

Types

NameDefinition
VuColorSliderChangeDetail
{
  value: string;
  color: VuColorSliderColor;
  channel: VuColorSliderChannel;
  channelValue: number;
}
VuColorSliderChannel
"hue"
| "saturation"
| "brightness"
| "lightness"
| "red"
| "green"
| "blue"
| "alpha"
VuColorSliderColorSpace | ""
"" | "hsb" | "hsl" | "rgb"
VuColorSliderOrientation
"horizontal" | "vertical"

Related

Inputs

  • Advanced FilterAn advanced filter component with expression input and visual builder.
  • ButtonA clickable button component with multiple variants and states.
  • Button GroupA button group component with shared styling and optional selection.
  • CheckboxA checkbox component with label, hint, and validation.
  • Checkbox GroupA checkbox group component with shared label and validation.
  • Color AreaA two-dimensional color picker component for saturation and brightness.

Guides

  • FormsFormData, VuForm, and validation
  • EventsonVu* / v-model / e.detail
  • Appearancevariant, color, tone, size

Browse

  • Previous: Color PickerEarlier in the sidebar
  • Next: Color SwatchLater in the sidebar
  • All componentsBrowse the full index