AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Color picker

Pick a colour from a selectable palette of presets.

Examples

Size
Disabled
Interactive · click to open the palette — the selected swatch is ringed + checked (probe value #6A1EBB)
#6A1EBB

API

PropTypeDefaultNotes
valuestring#6A1EBBSelected colour (hex) — its swatch is ringed + checked
swatchesstringbrand ramp (12)Pipe-separated hex presets, e.g. "#6A1EBB|#FF4081"
size'small' | 'default' | 'large'defaultScales trigger + swatch dimensions
disabledbooleanfalseGreys + inerts the whole control
openbooleanfalsePanel open state; reflected attribute
changeCustomEvent<{value}>Composed event; read e.detail.value

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-color-picker';   // registers <aha-color-picker>

Agent feed for this component (absolute, fetchable anywhere): color-picker.agent.json · color-picker.md · color-picker.llms.txt

When to use

When to use
  • Color picker — choosing a brand or theme colour from a curated set
  • Segmented — picking a labelled option rather than a colour
  • Input — an arbitrary free-form value is genuinely needed
Prefer a curated palette over a free spectrum — on-brand results, fewer accessibility misses. Show the current value beside the trigger so the choice is legible.
Surfaces
editor dashboard settings

Spec

Trigger 1px border #E3E3E3, radius 6; current swatch 16/20/24 by size (radius 4) · Panel bg-elevated #FFFFFF, radius 8, 4-col swatch grid · Swatch 22/28/34 by size, radius 4; selected ringed color-primary + check glyph · Selected aria-pressed=true, .on ring + system-check (dark on pale chips) · Disabled bg-container-disabled fill, border-disabled, not-allowed, inert · Motion panel fade + lift; swatch hover scale; check fade (ease-out)