Card

Displays a card with header, content, and footer.

Login to your account

Enter your email below to login to your account

Installation

ng g @spartan-ng/cli:ui card

Usage

import { HlmCardImports } from '@spartan-ng/helm/card';
<hlm-card>
  <hlm-card-header>
    <h3 hlmCardTitle>Card Title</h3>
    <p hlmCardDescription>Card Description</p>
    <div hlmCardAction>Card Action</div>
  </hlm-card-header>
  <div hlmCardContent>Card Content</div>
  <hlm-card-footer>Card Footer</hlm-card-footer>
</hlm-card>

Examples

Size

Use the size="sm" prop to set the size of the card to small. The small size variant uses smaller spacing.

Small Card

This card uses the small size variant.

The card component supports a size prop that can be set to "sm" for a more compact appearance.

Spacing

In addition to the size prop, you can use the --card-spacing CSS variable to control the spacing between sections and the inset of card parts.

Login to your account

Enter your email below to login to your account

Use negative margins with -mx-(--card-spacing) to make content go edge to edge while keeping it aligned with the card inset. When the edge-to-edge content sits above a footer, use -mb-(--card-spacing) on hlmCardContent to remove the section gap.

Terms of Service

Review the terms before accepting the agreement.

These terms govern your use of the workspace, including access to shared documents, project files, and collaboration tools.

You are responsible for the content you upload and for ensuring that your team has the appropriate permissions to view or edit it.

We may update features or limits as the service evolves. When those changes materially affect your workflow, we will notify your workspace administrators.

By continuing, you agree to keep your account credentials secure and to follow your organization's acceptable use policies.

Image

Event cover
Featured

Design systems meetup

A practical talk on component APIs, accessibility, and shipping faster.

RTL

To enable RTL support in spartan-ng, see the RTL configuration guide.

تسجيل الدخول إلى حسابك

أدخل بريدك الإلكتروني أدناه لتسجيل الدخول إلى حسابك

Helm API

HlmCardAction

Selector: [hlmCardAction]

HlmCardContent

Selector: [hlmCardContent]

HlmCardDescription

Selector: [hlmCardDescription]

HlmCardFooter

Selector: [hlmCardFooter],hlm-card-footer

HlmCardHeader

Selector: [hlmCardHeader],hlm-card-header

HlmCardTitle

Selector: [hlmCardTitle]

HlmCard

Selector: [hlmCard],hlm-card

Inputs

PropTypeDefaultDescription
size HlmCardConfig['size'] this._defaultConfig.size -
Carousel Calendar