Card

Documentation and examples for the Card component.

Preview

Card 1!

A card description

This is a card!
footer

Properties

PropTypeDefaultDescription
titlestring-Headline of the card.
descriptionstring-Sub-text below the title.
footerReactNode-Content at the bottom.
classNamestringdefault classesTo add your own style.
color"red" | "blue" | "green" | "yellow"blueColor of the effect of the card.

Usage

Follow these steps to add and use Card.

1

Create next app (skip if you already have setup a next app)

terminal
npx create-next-app@latest --yes
2

Install

terminal
npx modui-uikit@latest add card
3

Implement

typescript
import { Card } from '@/components/ui/card'

export default function Example() {
  return (
    <Card 
      title="Project Alpha"
      color="red"
      subtitle="A new web application."
      footer="A footer!"
      action={
        <button>
          Hello!
        </button>
      }
    >
      This is the main content of the card.
    </Card>
  )
}