Skip to content

BbColorPalette

Assign a color from an application-owned trigger and keep persistence in application state.

import { BbColorPalette } from 'bitboss-ui';

On this page

Use it for

Use BbColorPalette to assign a color from a trigger you own, such as a label dot or calendar category.

Use something else when

  • BbColorInput — users need a form field and editable hex text
  • BbPopover — the overlay contains arbitrary content

Pass Through

Hover or tap a part to outline it. Toggles flip loading, errors and warnings when the component has them — only parts highlight.

Assign and save label colors

Spread the activator slot's props onto the clickable element and give each instance a specific label.

Issue labelsAll changes saved
  • accessibility
  • design system
  • documentation

The model starts as string | null, but v3 emits only concrete colors. Dragging emits on every frame: repaint locally, debounce persistence, and provide your own action to clear back to null.

Color constraints

Treat swatches, alpha, and the eyedropper as constraints on one picker, not visual variants.

Each custom swatch array is a column. Enable alpha wherever eight-digit values can arrive. The eyedropper button exists only where the native API does; keep the gradient or swatches as the universal path.

Coming from v2picker → eye-dropper

picker became eye-dropper; the old attribute silently does nothing. The activator slot value was renamed from color to value.

Trigger and open state

The palette owns its open state. Observe open from the activator slot; there is no open prop or v-model:open.

Archived project — read onlyLocked by the workspace theme

readonly keeps the trigger focusable without opening the palette. disabled removes interaction. In v3, a leftover @update:open listener never fires and does not warn.

Placement and mobile behavior

Anchor the popover to a larger row when the click target is only a small color dot.

Brand accent#4f46e5

placement is a preference and flips on overflow unless disable-flip is set. On mobile, adaptive opens a draggable bottom sheet; picker drag surfaces do not move the sheet. Positioning props are ignored there, and the chosen surface is latched for the open cycle.

Coming from v2flip → disable-flip

:flip="false" became disable-flip with inverted polarity. show-arrow and arrow-padding were removed.