Primitives

Accordion

line, card, contained; chevron or plus; icons, descriptions, badges; opens to the content's real height.

line · chevron

At the gate, by scanning the QR on the ticket, or in the app before they leave. Cash goes into the attendant's shift.

card · plus · icons, descriptions, a badge

Each pass bills on the 25th for the next month. A pass unpaid by the 5th stops opening the gate until it is paid.

contained · several open at once

Bikes pay half. Overnight (10 pm – 8 am) is a flat ৳150.

Import#

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

your-component.tsx
import { Accordion, AccordionItem, Badge } from "@waveinno/ui";

Props#

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

<Accordion>

src/components/ui/accordion.tsx
PropTypeDefaultDescription
variant"line" | "card" | "contained""line"
indicator"chevron" | "plus""chevron"

Also takes ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>.

<AccordionItem>

src/components/ui/accordion.tsx
PropTypeDefaultDescription
titlerequiredReact.ReactNode—
descriptionReact.ReactNode—A muted line under the title.
iconReact.ReactNode—
badgeReact.ReactNode—Beside the title: a count, "New".

Also takes Omit<React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>, "title">.

<Badge>

src/components/ui/badge.tsx
PropTypeDefaultDescription
dotbooleantrue
variant"soft" | "solid" | "outline" | "dot" | "gradient" | "live""soft"

Also takes HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants>.

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