Primitives
Badge
Status is always dot + text + hue. Soft by default; solid, outline, dot, gradient and live when the context asks for it.
"use client";
import { Badge, CountBadge, StatusBadge } from "@waveinno/ui";
import { Sparkles } from "lucide-react";
const TONES = ["neutral", "info", "success", "warning", "danger", "accent"] as const;
const LABEL: Record<(typeof TONES)[number], string> = {
neutral: "Draft",
info: "Scheduled",
success: "Paid",
warning: "Due soon",
danger: "Overdue",
accent: "New",
};
export default function BadgeExample() {
return (
<div className="space-y-3">
{(["soft", "solid", "outline", "dot"] as const).map((variant) => (
<div key={variant} className="flex flex-wrap items-center gap-2">
<span className="w-16 text-[11.5px] text-muted">{variant}</span>
{TONES.map((t) => (
<StatusBadge key={t} label={LABEL[t]} tone={t} variant={variant} />
))}
</div>
))}
<div className="flex flex-wrap items-center gap-2">
<span className="w-16 text-[11.5px] text-muted">special</span>
<Badge variant="gradient" dot={false}>
<Sparkles className="size-3" /> Pro
</Badge>
<Badge variant="gradient">New</Badge>
<Badge variant="live" tone="success">
Gate online
</Badge>
<Badge variant="live" tone="danger">
Live
</Badge>
<CountBadge value={7} />
<CountBadge value={12} tone="danger" />
</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.
Soft
The default for status in tables and cards: a dot, the word, and a tint.
"use client";
import { StatusBadge } from "@waveinno/ui";
const TONES = ["neutral", "info", "success", "warning", "danger", "accent"] as const;
const LABEL: Record<(typeof TONES)[number], string> = {
neutral: "Draft",
info: "Scheduled",
success: "Paid",
warning: "Due soon",
danger: "Overdue",
accent: "New",
};
export default function BadgeSoftExample() {
return (
<div className="flex flex-wrap justify-center gap-2">
{TONES.map((t) => (
<StatusBadge key={t} label={LABEL[t]} tone={t} />
))}
</div>
);
}Solid
Filled: for the one status that must stand out on a busy screen.
"use client";
import { StatusBadge } from "@waveinno/ui";
const TONES = ["neutral", "info", "success", "warning", "danger", "accent"] as const;
const LABEL: Record<(typeof TONES)[number], string> = {
neutral: "Draft",
info: "Scheduled",
success: "Paid",
warning: "Due soon",
danger: "Overdue",
accent: "New",
};
export default function BadgeSolidExample() {
return (
<div className="flex flex-wrap justify-center gap-2">
{TONES.map((t) => (
<StatusBadge key={t} label={LABEL[t]} tone={t} variant="solid" />
))}
</div>
);
}Outline
A hairline only: quiet status on coloured or image backgrounds.
"use client";
import { StatusBadge } from "@waveinno/ui";
const TONES = ["neutral", "info", "success", "warning", "danger", "accent"] as const;
const LABEL: Record<(typeof TONES)[number], string> = {
neutral: "Draft",
info: "Scheduled",
success: "Paid",
warning: "Due soon",
danger: "Overdue",
accent: "New",
};
export default function BadgeOutlineExample() {
return (
<div className="flex flex-wrap justify-center gap-2">
{TONES.map((t) => (
<StatusBadge key={t} label={LABEL[t]} tone={t} variant="outline" />
))}
</div>
);
}Dot
Just the dot and the word: for dense lists where tints would be noise.
"use client";
import { StatusBadge } from "@waveinno/ui";
const TONES = ["neutral", "info", "success", "warning", "danger", "accent"] as const;
const LABEL: Record<(typeof TONES)[number], string> = {
neutral: "Draft",
info: "Scheduled",
success: "Paid",
warning: "Due soon",
danger: "Overdue",
accent: "New",
};
export default function BadgeDotExample() {
return (
<div className="flex flex-wrap justify-center gap-3">
{TONES.map((t) => (
<StatusBadge key={t} label={LABEL[t]} tone={t} variant="dot" />
))}
</div>
);
}Gradient
In the brand gradient: for Pro, New and upgrade marks.
"use client";
import { Badge } from "@waveinno/ui";
import { Sparkles } from "lucide-react";
export default function BadgeGradientExample() {
return (
<div className="flex items-center gap-2">
<Badge variant="gradient" dot={false}>
<Sparkles className="size-3" /> Pro
</Badge>
<Badge variant="gradient">New</Badge>
</div>
);
}Live
A pulsing dot: something is happening right now.
"use client";
import { Badge } from "@waveinno/ui";
export default function BadgeLiveExample() {
return (
<div className="flex items-center gap-2">
<Badge variant="live" tone="success">
Gate online
</Badge>
<Badge variant="live" tone="danger">
Live
</Badge>
</div>
);
}Count
A number on its own: unread, waiting, in the cart.
"use client";
import { CountBadge } from "@waveinno/ui";
export default function BadgeCountExample() {
return (
<div className="flex items-center gap-2">
<CountBadge value={7} />
<CountBadge value={12} tone="danger" />
<CountBadge value={128} />
</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.
Count bumpFree
The count pops each time it changes, so new items are noticed.
"use client";
import { Button, CountBadge } from "@waveinno/ui";
import { Plus } from "lucide-react";
import * as React from "react";
export default function CountBumpExample() {
const [n, setN] = React.useState(3);
return (
<div className="flex items-center gap-3">
<span className="inline-flex items-center gap-2 text-[13.5px] font-medium text-text">
Inbox <CountBadge key={n} value={n} tone="danger" className="animate-wv-pop" />
</span>
<Button size="sm" onClick={() => setN((x) => x + 1)}>
<Plus /> New message
</Button>
</div>
);
}Glowing newFree
A soft glow breathes behind a New badge on a menu item.
"use client";
import { Badge } from "@waveinno/ui";
export default function BadgeGlowExample() {
return (
<span className="inline-flex items-center gap-2 text-[13.5px] font-medium text-text">
Templates
<span className="relative inline-flex">
<span aria-hidden className="absolute inset-0 animate-pulse rounded-full bg-primary/40 blur-md" />
<Badge variant="gradient" className="relative">
New
</Badge>
</span>
</span>
);
}Shimmer Pro
A band of light crosses the badge: for Pro marks on a pricing page.
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 { Badge, CountBadge, StatusBadge } from "@waveinno/ui";Props#
Read from the source of this version, so they match the code exactly.
<Badge>
src/components/ui/badge.tsx| Prop | Type | Default | Description |
|---|---|---|---|
dot | boolean | true | |
variant | "soft" | "solid" | "outline" | "dot" | "gradient" | "live" | "soft" |
Also takes HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants>.
<CountBadge>
src/components/ui/badge.tsx| Prop | Type | Default | Description |
|---|---|---|---|
valuerequired | string | number | — | |
tone | "neutral" | "danger" | "neutral" | |
className | string | — |
<StatusBadge>
src/components/ui/badge.tsx| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | string | — | |
tone | Tone | "neutral" | |
variant | "soft" | "solid" | "outline" | "dot" | "gradient" | "live" | — | |
className | string | — |
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