rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

ColourSwatch

Visual swatch displaying a single colour with optional label and copy-on-click behaviour.

Examples

Single swatch

A single branded colour with its hex value.

brand-base

Palette row

Full brand palette rendered as a horizontal swatch strip.

With labels

Swatches with token name and resolved hex side by side.

Installation

pnpm add @rokle/components @rokle/tokens

Installs with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.

Usage

import { ColourSwatch } from "@rokle/components";
import { ColourSwatch } from "@rokle/components";

export function Example() {
  return <ColourSwatch />;
}

API Reference

PropTypeDefaultDescription
colourstring-CSS colour value to display.
labelstring-Colour name or token label.
copyablebooleanfalseCopy colour value to clipboard on click.