Components / component

Icon Button

v1.0.0 · premium

A circular icon-only button. A fill swells from the center while the icon turns 45 degrees with a spring, so a plus becomes a cross.

Icon Button demo

Implementation

A circular icon-only button. A fill swells from the center while the icon turns 45 degrees with a spring, so a plus becomes a cross.

Framework
React 19.3.1 with TypeScript
Motion
Native CSS and browser APIs. No GSAP required.
Available modes
build
Version
1.0.0 · published

Source code

Download source ZIP
export function IconButton({ label, icon, href, onClick, type = 'button', size = 'md', disabled = false, ink, paper, cla
  /** The accessible name, for example "Add to cart". */
  label: string;

Quality evidence

Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .

Changelog

v1.0.0 · A circular icon-only button. A fill swells from the center while the icon turns 45 degrees with a spring, so a plus becomes a cross.

Frequently asked questions

Why is label required?

The button has no visible text, so the label becomes its accessible name. Without it, assistive technology would announce an unlabeled button.

Can I use my own icon?

Yes. Pass any inline SVG or element as icon. It uses the current text color, so it follows the ink and paper colors.