Patterns
Note
Soft, outline, gradient; any tone; title, icon and an action.
Notes explain a rule in one or two sentences, next to the thing it governs.
Vehicles inside keep their rate
A new rate applies to sessions that start after you publish it.Gate 2 has been offline for 6 minutes
Exits are being recorded on the attendant phone and will sync.3 payments failed
bKash did not confirm them. The drivers were asked to pay again.ParkingOS Pro
Monthly parkers, cash control and reports for every car park you run.note.tsx
"use client";
import { Button, Note } from "@waveinno/ui";
export default function NoteExample() {
return (
<div className="max-w-2xl">
<Note>Notes explain a rule in one or two sentences, next to the thing it governs.</Note>
<Note tone="info" icon title="Vehicles inside keep their rate">
A new rate applies to sessions that start after you publish it.
</Note>
<Note tone="warning" icon variant="outline" title="Gate 2 has been offline for 6 minutes" action={<Button size="sm">Open gate</Button>}>
Exits are being recorded on the attendant phone and will sync.
</Note>
<Note tone="danger" icon title="3 payments failed">
bKash did not confirm them. The drivers were asked to pay again.
</Note>
<Note variant="gradient" icon title="ParkingOS Pro" action={<Button variant="glass" size="sm">Upgrade</Button>}>
Monthly parkers, cash control and reports for every car park you run.
</Note>
</div>
);
}Import#
Everything comes from the package root. The example above uses:
your-component.tsx
import { Button, Note } from "@waveinno/ui";Props#
Read from the source of this version, so they match the code exactly.
<Button>
src/components/ui/button.tsx| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | |
loading | boolean | — |
Also takes ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants>.
<Note>
src/components/patterns/page-header.tsx| Prop | Type | Default | Description |
|---|---|---|---|
childrenrequired | React.ReactNode | — | |
className | string | — | |
tone | Tone | "accent" | |
title | React.ReactNode | — | |
icon | boolean | React.ReactNode | — | true = the tone's icon; or pass your own. |
action | React.ReactNode | — | |
variant | "soft" | "outline" | "gradient" | "soft" |
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