Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Animated Color Selector

Preview

Accent

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/color-selector

Import the shared styles once in your application.

TSUsage
import ColorSelector from '@/components/beui/controls/ColorSelector.vue'
import '@/components/beui/styles.css'

API Reference

ColorSelector

v-model?
string
Default—
defaultValue?
string

Starting value when `v-model` is not bound.

Default
name?
string

The radio group name used in form submission. Generated when omitted.

Default—
required?
boolean
Defaultfalse
class?
string
Default—
disabled?
boolean
Defaultfalse
form?
string
Default—
options?
readonly ChoiceOption[]

Data-driven form: renders the label, list and one item per option when the default slot is empty.

Default—
label?
string

Legend text of the data-driven form.

DefaultColor
#default?
slot

`ColorSelectorLabel` and `ColorSelectorList` with its items.

Default—

ColorSelectorLabel

class?
string
Default—

ColorSelectorList

class?
string
Default—

ColorSelectorItem

value
string
Default—
color
string

Any CSS color, including a custom property.

Default—
label
string

Accessible color name; selection never relies on color alone.

Default—
class?
string

Applied to the visible swatch surface.

Default—
disabled?
boolean
Defaultfalse

Updated