Skip to content
Ginga UI
Ginga UI
日本語

Getting started

  • Overview
  • Quick start
  • Theme generation
  • Custom rendering
  • All components

Forms

  • Button
  • Checkbox
  • Input
  • Radio
  • Questionnaire
  • SegmentedControl
  • Select
  • ComboBox
  • NumberField
  • SearchField
  • Slider
  • Switch
  • FormControl

Display

  • Accordion
  • Alert
  • AlertDialog
  • Badge
  • CodeBlock
  • Card
  • Dialog
  • Drawer
  • Image
  • List
  • Popover
  • Menu
  • Tooltip
  • Table
  • Tab
  • Toast
  • Trace

Typography

  • Heading
  • Paragraph

Navigation

  • Anchor

Layout

  • Box

Resources

  • Changelog
  • GitHub (opens in a new tab)

Logo: Twemoji (opens in a new tab) (CC-BY 4.0)

Card

A card container that groups related information.

View in Storybook (opens in a new tab)

Installation

import { Card } from "@ginga-ui/core";

Basic usage

A basic card with a header and content.

Card title
The main content of the card. Use it to group related information.
card.tsx
card.module.css
import { Card, CardContent, CardHeader, CardTitle } from "@ginga-ui/core";
import styles from "./card.module.css";

export function BasicExample() {
  return (
    <Card className={styles.basicCard}>
      <CardHeader>
        <CardTitle>Card title</CardTitle>
      </CardHeader>
      <CardContent>
        The main content of the card. Use it to group related information.
      </CardContent>
    </Card>
  );
}

With footer

An example of a card with a footer.

Create project
Enter a project name and choose your deployment settings. You can publish to production right away.
card.tsx
card.module.css
import { Card, CardContent, CardFooter, CardHeader, CardTitle, Button } from "@ginga-ui/core";
import styles from "./card.module.css";

export function WithFooterExample() {
  return (
    <Card className={styles.withFooterCard}>
      <CardHeader>
        <CardTitle>Create project</CardTitle>
      </CardHeader>
      <CardContent>
        Enter a project name and choose your deployment settings. You can
        publish to production right away.
      </CardContent>
      <CardFooter>
        <Button variant="outline">Cancel</Button>
        <Button variant="filled">Deploy</Button>
      </CardFooter>
    </Card>
  );
}

Multiple cards

Displays multiple cards in a grid layout.

Free
$0
  • Up to 5 projects
  • Community support
  • Core features
Pro
$20/month
  • Unlimited projects
  • Priority support
  • Advanced features
card.tsx
card.module.css
import { Card, CardContent, CardFooter, CardHeader, CardTitle, Button } from "@ginga-ui/core";
import styles from "./card.module.css";

export function MultipleCardsExample() {
  return (
    <div className={styles.plans}>
      <Card className={styles.plan}>
        <CardHeader>
          <CardTitle>Free</CardTitle>
        </CardHeader>
        <CardContent>
          <div className={styles.planPrice}>$0</div>
          <ul className={styles.planFeatures}>
            <li>Up to 5 projects</li>
            <li>Community support</li>
            <li>Core features</li>
          </ul>
        </CardContent>
        <CardFooter>
          <Button variant="outline">Get started</Button>
        </CardFooter>
      </Card>

      <Card className={styles.plan}>
        <CardHeader>
          <CardTitle>Pro</CardTitle>
        </CardHeader>
        <CardContent>
          <div className={styles.planPrice}>$20/month</div>
          <ul className={styles.planFeatures}>
            <li>Unlimited projects</li>
            <li>Priority support</li>
            <li>Advanced features</li>
          </ul>
        </CardContent>
        <CardFooter>
          <Button variant="filled">Upgrade</Button>
        </CardFooter>
      </Card>
    </div>
  );
}

Simple card

A simple card without a header.

A simple card. It can be used without a header or footer.
card.tsx
card.module.css
import { Card, CardContent } from "@ginga-ui/core";
import styles from "./card.module.css";

export function SimpleExample() {
  return (
    <Card className={styles.simpleCard}>
      <CardContent>
        A simple card. It can be used without a header or footer.
      </CardContent>
    </Card>
  );
}

Props

Card

NameTypeDefaultDescription
render(props) => ReactElement-Replaces the root element. Return an element that receives the given props, such as next/link.

Also accepts the attributes of the HTML div (opens in a new tab) element.

CardHeader

NameTypeDefaultDescription
render(props) => ReactElement-Replaces the root element. Return an element that receives the given props, such as next/link.

Also accepts the attributes of the HTML div (opens in a new tab) element.

CardTitle

NameTypeDefaultDescription
render(props) => ReactElement-Replaces the root element. Return an element that receives the given props, such as next/link.

Also accepts the attributes of the HTML div (opens in a new tab) element.

CardContent

NameTypeDefaultDescription
render(props) => ReactElement-Replaces the root element. Return an element that receives the given props, such as next/link.

Also accepts the attributes of the HTML div (opens in a new tab) element.

CardFooter

NameTypeDefaultDescription
render(props) => ReactElement-Replaces the root element. Return an element that receives the given props, such as next/link.

Also accepts the attributes of the HTML div (opens in a new tab) element.