Primitives

Alert

Five tones, four looks; the icon carries the tone too. Danger and warning are announced.

soft

Rates change on 1 November

Cars pay ৳35 for the first hour from then. Monthly passes keep their price.

Payout sent

৳1,24,500 reached your bank account ending 4410.

outline

Rates change on 1 November

Cars pay ৳35 for the first hour from then. Monthly passes keep their price.

Payout sent

৳1,24,500 reached your bank account ending 4410.

accent

Rates change on 1 November

Cars pay ৳35 for the first hour from then. Monthly passes keep their price.

Payout sent

৳1,24,500 reached your bank account ending 4410.

solid

Rates change on 1 November

Cars pay ৳35 for the first hour from then. Monthly passes keep their price.

Payout sent

৳1,24,500 reached your bank account ending 4410.

Read-only

You are viewing Gulshan as an auditor. Changes are turned off.

Import#

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

your-component.tsx
import { Alert, Button, type AlertTone, type AlertVariant } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Alert>

src/components/ui/alert.tsx
PropTypeDefaultDescription
tone"info" | "success" | "warning" | "danger" | "neutral""info"
variant"soft" | "outline" | "solid" | "accent""soft"
titleReact.ReactNode—
iconReact.ReactNode | false—Replace the tone's icon, or `false` for none.
actionReact.ReactNode—Buttons under the text: "Retry", "Review".
onDismiss() => void—Shows a close button; called when it is pressed.

Also takes Omit<React.HTMLAttributes<HTMLDivElement>, "title">.

<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