Primitives

Spinner

Ring, dots, wave; five sizes; takes the text colour unless tone="brand". Keeps turning, slowly, under reduced motion.

ring

LoadingLoadingLoadingLoadingLoadingLoading

dots

LoadingLoadingLoadingLoadingLoadingLoading

wave

LoadingLoadingLoadingLoadingLoadingLoading

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
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
PropTypeDefaultDescription
variant"ring" | "dots" | "wave""ring"
sizekeyof typeof SIZE"md"
tone"current" | "brand""current"`current` follows the text colour; `brand` uses the primary (the gradient, for ring).
labelstring"Loading"
classNamestring—

<Button>

src/components/ui/button.tsx
PropTypeDefaultDescription
asChildbooleanfalse
loadingboolean—

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