Components

Frost Button

A frosted-glass button for React, built on the DuskUI Button with Motion and Tailwind CSS. A soft ripple spreads from where you press, an optional faint light sweep runs on hover and focus, and loading states, sizes and every shadcn/ui Button prop keep working.

  • Built on Button
  • Press ripple
  • Light sweep
  • Loading state
  • prefers-reduced-motion

Installation

$ npx shadcn@latest add https://duskui.com/r/frost-button.json

Builds on the DuskUI Button; the CLI installs it automatically. Installing by hand? Add components/ui/button.tsx from the Button page first.

Usage

hero-actions.tsx
import { FrostButton } from "@/components/dusk/glass/frost-button"

export function HeroActions() {
  return (
    <FrostButton size="lg" tone="primary" className="rounded-full">
      Start building
    </FrostButton>
  )
}

Examples

Loading

loading and loadingText come straight from the base Button: the content crossfades to a spinner without changing width, and the button stays focusable.

Effects & icon buttons

Choose the interaction with effect: sweep, ripple, both or none. Icon sizes work too — give them an aria-label.

API Reference

Accepts every DuskUI Button prop except variant — including size, loading, loadingText and asChild (effects are skipped with asChild, since Slot needs a single child).

PropTypeDefaultDescription
tone"clear" | "dark" | "primary""clear"White frost, smoked glass or a primary-tinted pane.
effect"sweep" | "ripple" | "both" | "none""ripple"Ripple on press, light sweep on hover/focus, both or neither.
loadingbooleanfalseSpinner without a width change; clicks are blocked but focus is kept.

Accessibility

  • It's the DuskUI Button underneath: a native <button> with focus-visible ring, aria-busy and aria-disabled while loading.
  • Keyboard presses (Enter / Space) get the ripple from the center, and keyboard focus triggers the light sweep when it is on.
  • White text gets a soft text-shadow, and browsers without backdrop-filter get an opaque fill, so the label stays readable on any background.
  • With reduced motion the sweep is skipped and the ripple becomes a soft flash.