---
title: Cards
description: Link cards — the plain card()/cards() grid, GitHub repository cards and Bilibili video link cards.
---

`card()` builds a single card; `cards()` wraps any number of them in the
Plumest-style responsive grid. For rich link cards — repositories and videos —
use `GitHubCard` / `BilibiliCard` below.

## Grid

```ts
cards([
  { title: 'Markdown authoring', description: 'Write docs in plain Markdown.', href: '/guides/example/', icon: 'lucide:file-text' },
  { title: 'Component gallery', description: 'Every kit builder, live.', href: '/contribution/components/', icon: 'lucide:zap' },
  { title: 'Design tokens', description: 'The single source of truth.', href: '/contribution/styles/', icon: 'lucide:palette' },
]);
```

## Single card states

```ts
card({ title: 'Getting started', description: 'A card that links somewhere.', href: '/guides/example/', icon: 'lucide:arrow-right' });
card({ title: 'Plain card', description: 'No icon, no link — a bare block.', children: '<p>Extra HTML content inside.</p>' });
card({ title: 'Plumest', description: 'External links open in a new tab.', href: 'https://GitHub.com/CelPlume/CelestPlume', external: true, icon: 'lucide:external-link' });
```

## Props

<PropsTable
  labels={{ prop: 'Option', type: 'Type', default: 'Default' }}
  type={{
    title: { type: 'string', required: true, description: 'Card title.' },
    description: { type: 'string', default: "''", description: 'Supporting text.' },
    href: { type: 'string', default: "''", description: 'Target URL — with it the card renders as an <code>&lt;a&gt;</code>.' },
    external: { type: 'boolean', default: 'false', description: 'Opens the link in a new tab.' },
    icon: { type: 'string', default: "''", description: 'Iconify name (e.g. <code>lucide:zap</code>) or raw SVG.' },
    children: { type: 'string', default: "''", description: 'Extra HTML below the description.' },
  }}
/>

## Notes

- Icons resolve via the project's local `@iconify-json` sets — never fetched
  from the Iconify API at runtime.
- `cards()` accepts an array of `CardOptions` or a single pre-built HTML string.

## GitHub repository cards

`GitHubCard` renders one GitHub repository card per usage — the whole card is
a link and the title shows `owner/repo`. Metadata (description, language) and
star/fork counts are fetched from the GitHub API at build time, then
refreshed in the browser. Repeat the component for multiple repositories.

- [CelPlume/CelestPlume](https://github.com/CelPlume/CelestPlume)

- [CelPlume/BookmarkHarbor](https://github.com/CelPlume/BookmarkHarbor)

```astro
---
import GitHubCard from '../../../../components/kit/GitHubCard.astro';
---

<GitHubCard owner="CelPlume" repo="CelestPlume" />
<GitHubCard owner="CelPlume" repo="BookmarkHarbor" />
```

### GitHub card props

<PropsTable
  labels={{ prop: 'Option', type: 'Type', default: 'Default' }}
  type={{
    owner: { type: 'string', required: true, description: 'Repository owner (user or organization).' },
    repo: { type: 'string', required: true, description: 'Repository name.' },
    target: { type: 'string', default: "'_blank'", description: 'Link target for the repository URL.' },
    auth: { type: 'string', default: "''", description: 'GitHub token for the build-time request.' },
  }}
/>

Notes:

- The whole card links to the repository; the title shows `owner/repo`.
- Build-time data comes from the GitHub REST API; a failed request renders a
  plain link card.
- Star/fork counts and missing metadata refresh in the browser and are cached
  in `localStorage` to respect the API rate limit.
- Requires network access to `api.github.com` at build and runtime.

## Bilibili link card

`BilibiliCard` renders a Bilibili video as a link card with cover, title,
description and the uploader. Metadata is fetched from the Bilibili view API
at build time; a failed request degrades to a plain link card.

- [Bilibili: BV1DN411r7co](https://www.bilibili.com/video/BV1DN411r7co)

```astro
---
import BilibiliCard from '../../../../components/kit/BilibiliCard.astro';
---

<BilibiliCard bvid="BV1DN411r7co" />
```

### Bilibili card props

<PropsTable
  labels={{ prop: 'Option', type: 'Type', default: 'Default' }}
  type={{
    bvid: { type: 'string', required: true, description: 'Bilibili video ID (<code>BV…</code>).' },
    target: { type: 'string', default: "'_blank'", description: 'Link target for the video URL.' },
  }}
/>

Notes:

- The cover, avatar and external-link arrow use `referrerpolicy="no-referrer"`
  so the Bilibili CDN serves images to the docs site.
- Invalid `bvid` values fail the build with a clear error.
- For the playable embed, see [Embed Media](/contribution/components/embed-media/).
