Playground

Shimmer button

The Button with a light sweep across it. Still a native button.

  • Built on radix-ui/Slot
  • Native <button>: Enter and Space activate, Tab focuses; behaviour comes from Button.
  • The sweep is a pseudo-element, never read aloud, and is off under prefers-reduced-motion.
  • Styles in one file: 02-buttons.css

Import

import '@monoline/css';
import {ShimmerButton} from '@monoline/react';

Not installed yet? Pick a route.

Copies the source and its styles into your project.

npx monoline add shimmer-button

It needs radix-ui; install it if your project does not have it:

npm install radix-ui

Usage

import {ShimmerButton} from '@monoline/react';

<ShimmerButton>Start free trial</ShimmerButton>

Examples

Solid

Line

Data Attributes

State is exposed through attributes. Style it with these selectors, not with class toggles.

This component sets no state attributes.

CSS classes

ClassStylesheet
.btn02-buttons.css
.btn-block02-buttons.css
.btn-danger02-buttons.css
.btn-ghost02-buttons.css
.btn-lg02-buttons.css
.btn-line02-buttons.css
.btn-sm02-buttons.css
.btn-solid02-buttons.css
.skeleton13-loading.css
.skeleton-block13-loading.css
.skeleton-hatch13-loading.css
.spinner13-loading.css
.shimmer-buttonshimmer-button.css

Customization

Style it with the kit's tokens in your own CSS, loaded after @monoline/css. Prefer the attributes above over extra classes. See Theming for every token.

app.css
.btn {
  border-color: var(--accent);
}

Accessibility

  • Native <button>: Enter and Space activate, Tab focuses; behaviour comes from Button.
  • The sweep is a pseudo-element, never read aloud, and is off under prefers-reduced-motion.

Keyboard

KeysAction
Enter / SpaceActivate
TabFocuses