Primitives

Radio group and Radio card

Dots for forms; whole cards for plans, payment methods, vehicle types.

Import#

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

your-component.tsx
import { RadioCard, RadioGroup, RadioGroupItem } from "@waveinno/ui";

Props#

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

<RadioCard>

src/components/ui/radio-group.tsx
PropTypeDefaultDescription
titlerequiredReact.ReactNode—
descriptionReact.ReactNode—
iconReact.ReactNode—
asideReact.ReactNode—On the right: a price, a time, a badge.

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

<RadioGroup>

src/components/ui/radio-group.tsx

Also takes ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> (passed through).

<RadioGroupItem>

src/components/ui/radio-group.tsx
PropTypeDefaultDescription
labelReact.ReactNode—
descriptionReact.ReactNode—A muted line under the label.

Also takes ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>.

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