Skip to main content
Card components provide structured, styled containers for displaying various types of content.

Card

The base card component with customizable styling.

Usage

import { Card } from "@/components/card/Card";

<Card $hoverable={true} $color="text-primary">
  <Text>Card content</Text>
</Card>

Props

$hoverable
boolean
Adds hover effects and cursor pointer
$color
keyof Colors
Accent color for the left border. Available colors from theme:
  • text-primary
  • text-warning
  • text-muted
  • And other theme colors

Styling

padding
string
default:"16px 24px 16px 28px"
Internal padding with extra left space for accent border
border-radius
string
Uses theme.scalars.borderRadiusCard
box-shadow
string
Uses theme.shadows.medium

Source

Defined in /src/components/card/Card.ts:8

SummaryCard

A horizontal card for displaying summary information with an image.

Usage

import { SummaryCard } from "@/components/card/SummaryCard";

<SummaryCard
  title="Anime Title"
  description="2024 • Winter • TV"
  image="/images/cover.jpg"
  to="/anime/example"
/>

Props

title
string | ReactNode
required
Card title, automatically linked if to prop is provided
description
string | ReactNode
Secondary description text
image
string
Image URL for the card thumbnail
imageProps
ComponentPropsWithoutRef<typeof StyledCover>
Additional props for the image element, including:
  • $objectFit: CSS object-fit value
  • $backgroundColor: Background color
to
string
Navigation link URL
children
ReactNode
Additional content rendered at the end of the card

SummaryCard.Description

A helper component for formatting multiple description items with bullet separators.
<SummaryCard
  title="Example"
  description={
    <SummaryCard.Description>
      {["2024", "Winter", "TV"]}
    </SummaryCard.Description>
  }
/>

Source

Defined in /src/components/card/SummaryCard.tsx:68

ThemeDetailCard

Displays theme information with video entries and playback options.

Usage

import { ThemeDetailCard } from "@/components/card/ThemeDetailCard";
import { ThemeDetailCardThemeFragment } from "@/generated/graphql";

interface Props {
  theme: ThemeDetailCardThemeFragment;
}

export function ThemeList({ theme }: Props) {
  return <ThemeDetailCard theme={theme} />;
}

Props

theme
ThemeDetailCardThemeFragment
required
GraphQL fragment containing:
  • type: Theme type (OP, ED, etc.)
  • sequence: Theme sequence number
  • song: Song information with title and performances
  • anime: Anime information
  • entries: Array of theme entries with videos

GraphQL Fragment

From /src/components/card/ThemeDetailCard.tsx:96:
fragment ThemeDetailCardTheme on Theme {
  type
  sequence
  group {
    name
    slug
  }
  anime {
    slug
    name
  }
  song {
    title
    performances {
      alias
      as
      artist {
        slug
        name
      }
    }
  }
  entries {
    version
    episodes
    spoiler
    nsfw
    videos {
      filename
      tags
    }
  }
}

Features

  • Displays theme type and sequence (e.g., “OP1”)
  • Shows song title and artist performances
  • Lists all theme entry versions
  • Provides video playback buttons for each entry
  • Includes theme menu for additional actions

Example

From /src/components/card/ThemeDetailCard.tsx:60:
<StyledThemeCard>
  <StyledRow>
    <Text variant="small" color="text">
      {theme.type}{theme.sequence || null}
    </Text>
    <Text>
      <SongTitle song={theme.song} />
      <Performances song={theme.song} expandable />
    </Text>
    <ThemeMenu theme={theme} />
  </StyledRow>
  {theme.entries.sort(entryVersionComparator).map((entry) => (
    <StyledRow key={entry.version || 0}>
      {/* Entry details and video buttons */}
    </StyledRow>
  ))}
</StyledThemeCard>

Source

Defined in /src/components/card/ThemeDetailCard.tsx:52

AnnouncementCard

Renders MDX announcement content.

Usage

import { AnnouncementCard } from "@/components/card/AnnouncementCard";
import type { MDXRemoteSerializeResult } from "next-mdx-remote";

interface Props {
  announcementSource: MDXRemoteSerializeResult;
}

export function Announcements({ announcementSource }: Props) {
  return <AnnouncementCard announcementSource={announcementSource} />;
}

Props

announcementSource
MDXRemoteSerializeResult
required
Serialized MDX content from next-mdx-remote

Source

Defined in /src/components/card/AnnouncementCard.tsx:10

Styling Cards

All card components support nested Solid contexts for adaptive backgrounds:
<Solid>
  <Card>
    {/* Card background adjusts to solid-on-card color */}
  </Card>
</Solid>

Build docs developers (and LLMs) love