Status Icon

One icon that spins while syncing, then closes into its result.

Preview

"use client";

import { StatusIcon } from "@/components/motion/status-icon";

export function StatusIconUsage() {
  return <StatusIcon status="success" />;
}

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/status-icon

API Reference

status?
"error" | "success" | "idle" | "warning" | "syncing"

Which state to show. The icon morphs from one state to the next. Default: "idle"

Defaultidle
size?
number

Width and height in px. Default: 20

Default20
decorative?
boolean

Hides the icon from assistive technology, for when nearby text already says the status. Default: false

Defaultfalse
labels?
Partial<{ idle: string; syncing: string; success: string; warning: string; error: string; }>

Override any built-in string, e.g. for translation.

Default—
className?
string

Classes merged onto the root element.

Default—

Updated