Components / component

Flip Label Button

v1.0.0 · premium

A solid pill that flips on its horizontal axis to a second face with its own label and inverted colors.

Flip Label Button demo

Implementation

A solid pill that flips on its horizontal axis to a second face with its own label and inverted colors.

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 FlipLabelButton({ children, hoverLabel, href, onClick, type = 'button', size = 'md', disabled = false, i
  /** Front label. It is the accessible name. */
  children: string;

Quality evidence

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

Changelog

v1.0.0 · A solid pill that flips on its horizontal axis to a second face with its own label and inverted colors.

Frequently asked questions

Does the back label affect accessibility?

No. Only the front label is announced, and the back label is hidden from assistive technology. Keep the back label a restatement of the same action.

Does the button change size when it flips?

No. Both faces share one grid cell, so the button is as wide as the longer label and the layout never shifts.