Caret-Tui

Card

A container with a title, body, and footer.

The Card component is ideal for organizing related content into a distinct section. It supports an optional title header and an optional footer.

Usage

import { Card, Text } from 'caret-tui';

const App = () => (
  <Card title="System Status" footer="Updated 1m ago" variant="success">
    <Text>All systems are operational.</Text>
  </Card>
);

Props

PropTypeDefaultDescription
childrenReact.ReactNode-The main content of the card.
titlestring-Optional title displayed in the top border.
footerstring-Optional footer displayed in the bottom border.
variant'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'default''default'Determines the border and title color.
borderStyleBorderStyle'round'The border style of the card.
paddingnumber1Horizontal padding inside the card.
heightnumber | string-Explicit height for the card.

On this page