Skip to Content
Nextra 4.0 is released 🎉

Card

The Card component is a pixel-art styled content container.
It supports an optional title, body content, and footer section — making it a versatile building block for layouts, dashboards, and content displays with a retro aesthetic.


🚀 Usage

Basic Example


This is a basic card with some content.

import { Card } from "pixelartui-react"; <Card> <p>This is a basic card with some content.</p> </Card>

With Title


Card Title

This is a card with a title and body content.

<Card title="Card Title"> <p>This is a card with a title and body content.</p> </Card>

Card Title

This card has a title, body, and a footer with an action button.

import { Card, Button } from "pixelartui-react"; <Card title="Card Title" footer={ <Button text="Action" buttonSize="small" buttonType="main" onClick={() => {}} /> } > <p>This card has a title, body, and a footer with an action button.</p> </Card>

Custom Background


Custom Color

A card with a custom background color.

<Card title="Custom Color" backgroundColor="#05EB57"> <p>A card with a custom background color.</p> </Card>

Styles


Dark

Dark style card.

Light

Light style card.

<Card title="Dark" cardStyle="dark"> <p>Dark style card.</p> </Card> <Card title="Light" cardStyle="light"> <p>Light style card.</p> </Card>

đź”§ Props

PropTypeDefaultDescription
titlestringundefinedText displayed as the card’s header.
childrenReactNode—Content displayed inside the card body.
footerReactNodeundefinedContent displayed in the card’s footer section.
cardStyle"dark" | "light"undefinedApplies a light or dark theme to the component.
backgroundColorstringundefinedOverrides the default background color with a custom value.
classNamestringundefinedAdds additional CSS classes for custom styling.
Last updated on