rokle

Personality

20
40
70
15

Active brand: Meridian

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

IconButton

Icon-only button with accessible label. Same variants as Button but square aspect ratio.

Examples

Primary

Square icon button with primary styling.

Secondary

Square icon button with secondary (outlined) styling.

Ghost

Square icon button with ghost (no border) styling.

Destructive

Square icon button signalling a destructive action.

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 { IconButton } from "@rokle/components";
import { IconButton } from "@rokle/components";

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

API Reference

PropTypeDefaultDescription
iconReactNode-Icon element to display.
labelstring-Accessible label for screen readers.
variant"primary" | "secondary" | "ghost" | "destructive""ghost"Visual style variant.
size"sm" | "md" | "lg""md"Button size.