GitHub

Color Select

llms.txt

Example

Usage

		
<ColorSelect
	colors={[
		{ class: 'text-red-700', label: 'red' },
		{ class: 'text-green-700', label: 'green' },
		{ class: 'text-blue-700', label: 'blue' },
		{ class: 'text-yellow-700', label: 'yellow' }
	]}
/>

<!-- with custom colors -->
<ColorSelect
	colors={[
		{ value: '#ff0000', label: 'red' },
		{ value: '#00ff00', label: 'green' },
		{ value: '#0000ff', label: 'blue' },
		{ value: '#ffff00', label: 'yellow' }
	]}
/>

API Reference

ColorSelect

A group of color swatches that allows selecting a single color.

Property
colors
selected
name
onselected
colorsClass
class
ref