Primitives
Spinner
Ring, dots, wave; five sizes; takes the text colour unless tone="brand". Keeps turning, slowly, under reduced motion.
ring
LoadingLoadingLoadingLoadingLoadingLoadingdots
LoadingLoadingLoadingLoadingLoadingLoadingwave
LoadingLoadingLoadingLoadingLoadingLoading"use client";
import { Button, Spinner } from "@waveinno/ui";
export default function SpinnerDemo() {
return (
<div className="space-y-6">
{(["ring", "dots", "wave"] as const).map((variant) => (
<div key={variant} className="flex flex-wrap items-center gap-6">
<p className="w-12 text-[12px] text-muted">{variant}</p>
{(["xs", "sm", "md", "lg", "xl"] as const).map((size) => (
<Spinner key={size} variant={variant} size={size} tone="brand" />
))}
<span className="text-muted">
<Spinner variant={variant} size="md" />
</span>
</div>
))}
<div className="flex flex-wrap items-center gap-3">
<Button disabled>
<Spinner size="sm" /> Saving
</Button>
<Button variant="secondary" disabled>
<Spinner size="sm" variant="dots" /> Connecting to gate
</Button>
</div>
</div>
);
}Examples#
Each one on its own: copy its code into your app, or copy it to Figma and paste it on the canvas as layers.
Ring
The default, for anything that takes a moment.
"use client";
import { Spinner } from "@waveinno/ui";
export default function SpinnerRingExample() {
return (
<Spinner size="lg" tone="brand" />
);
}Dots
Calmer: for waiting on someone or something else.
"use client";
import { Spinner } from "@waveinno/ui";
export default function SpinnerDotsExample() {
return (
<Spinner variant="dots" size="lg" tone="brand" />
);
}Wave
For audio, live data and connecting.
"use client";
import { Spinner } from "@waveinno/ui";
export default function SpinnerWaveExample() {
return (
<Spinner variant="wave" size="lg" tone="brand" />
);
}Sizes
xs inside text, sm in buttons, md to xl for panels and pages.
"use client";
import { Spinner } from "@waveinno/ui";
export default function SpinnerSizesExample() {
return (
<div className="flex items-center gap-5">
{(["xs", "sm", "md", "lg", "xl"] as const).map((size) => (
<Spinner key={size} size={size} tone="brand" />
))}
</div>
);
}Animated#
Motion that earns its place: free ones to copy now, and Pro ones whose code and Figma copy come with a Wavi Pro licence. They respect the visitor's reduced-motion setting.
Orbit loader Pro
Brand dots orbiting a pulsing core: for loading a page or building a report.
Building the October report…
This example's code comes with Wavi Pro
One payment for every Pro component, block and template, with every update.
Import#
Everything comes from the package root. The example above uses:
import { Button, Spinner } from "@waveinno/ui";Props#
Read from the source of this version, so they match the code exactly.
<Spinner>
src/components/ui/spinner.tsx| Prop | Type | Default | Description |
|---|---|---|---|
variant | "ring" | "dots" | "wave" | "ring" | |
size | keyof typeof SIZE | "md" | |
tone | "current" | "brand" | "current" | `current` follows the text colour; `brand` uses the primary (the gradient, for ring). |
label | string | "Loading" | |
className | string | — |
<Button>
src/components/ui/button.tsx| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | |
loading | boolean | — |
Also takes ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants>.
Install#
If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.
$ npm install @waveinno/ui