Icon button
A square button whose name comes from its label or its help text.
Features
- Square, in every button variant and size.
Use it for
- Toolbars.
Installation
- Get runets.
git clone https://github.com/ziyam-khan/runets - Copy these files into your project, keeping their folders.
- Install what they use.
pnpm add react @base-ui/react motion - Load the styles once. Bring your own base tokens, or use runets’ default theme.
import 'runets/styles/theme.css' import 'runets/styles/kit.css'
Usage
import { IconButton } from 'runets'
<IconButton label="Settings" variant="ghost"><Settings /></IconButton>API
| Prop | Type | What it does |
|---|---|---|
label | string | Its accessible name and tooltip. |
Accessibility
- Named by its label: never an unlabelled icon.
Source
The code is in src/kit/controls.tsx in runets, MIT licensed.