Skip to main content

Color Swatch

A color swatch displays a color sample.

On this page
Props
<ColorSwatch />

Installation

npx shadcn@latest add @dotui/color-swatch

Usage

Use color swatches to display a color sample.

import { ColorSwatch } from '@/components/ui/color-swatch'
<ColorSwatch color="#ff0000" />

Examples

Default

API Reference

ColorSwatch

A ColorSwatch displays a preview of a selected color.

PropType
Color | string
string

Last updated on 6/16/2026