BetaPublic beta — Read the release notes
Documentation

Card

Content container with header, body, and footer sections.

Package
@solidiom/card
Version
0.6.0
Status
stable

Preview

Get Started

Learn how to integrate Solidiom into your project.

Install the primitives you need and compose them with your own styling. No mandatory design system — bring your own CSS, Tailwind, or UnoCSS.
Documentation →

This preview uses documentation-only styling. Ship with one of the included recipe outputs (CSS, Tailwind, or UnoCSS) for production styles.

Card renders a content container with composable parts for header, title, description, content body, and footer. It provides a semantic structure for grouping related content and actions.

Usage

Card provides multiple composable parts. Use the parts you need for your content structure.

import * as Card from "@solidiom/card"

;<Card.Root>
  <Card.Header>
    <Card.Title>Card Title</Card.Title>
    <Card.Description>Optional description text.</Card.Description>
  </Card.Header>
  <Card.Content>Main content goes here.</Card.Content>
  <Card.Footer>Footer content or actions.</Card.Footer>
</Card.Root>

Installation

Install the package with pnpm add @solidiom/card. The package requires compatible solid-js and @solidjs/web peer dependencies.

Parts

PartElementPropsDescription
Root<div>class, style, childrenOuter container for the card.
Header<div>class, style, childrenHeader section of the card.
Title<h3>class, childrenTitle heading within the card header.
Description<p>class, childrenDescriptive text within the card header.
Content<div>class, style, childrenMain content body of the card.
Footer<div>class, style, childrenFooter section of the card.

Styling

Card carries data-scope="card" and data-part attributes on each part. Style individual parts using the data attributes for targeting. Parts render as semantic HTML elements; apply your visual recipe using the data attributes for selection.

Keyboard & behavior

This primitive has no keyboard interaction. It renders static content that does not receive focus or respond to key events.

SSR and hydration

Card is a passive display element with no interactive state. It renders as static HTML and requires no client-side hydration.