Card

A box of related content: a header with its title, description and action, the content, a footer. In the look of the app's style.

LayoutExperimental

Usage

import { Component, ViewEncapsulation, signal } from '@angular/core';import {  FormField,  FormRoot,  email,  form,  required,} from '@angular/forms/signals';import { RouterLink } from '@angular/router';import {  ScButton,  ScCard,  ScCardAction,  ScCardBody,  ScCardDescription,  ScCardFooter,  ScCardHeader,  ScCardTitle,  ScField,  ScFieldGroup,  ScInput,  ScLabel,  ScLink,} from '@semantic-components/ui';
@Component({  selector: 'app-card-usage-demo',  imports: [    RouterLink,    FormField,    FormRoot,    ScButton,    ScCard,    ScCardAction,    ScCardBody,    ScCardDescription,    ScCardFooter,    ScCardHeader,    ScCardTitle,    ScField,    ScFieldGroup,    ScInput,    ScLabel,    ScLink,  ],  template: `    <div scCard class="w-full max-w-sm">      <div scCardHeader>        <h3 scCardTitle>Login to your account</h3>        <p scCardDescription>Enter your email below to login to your account</p>        <div scCardAction>          <button scButton variant="link">Sign Up</button>        </div>      </div>      <div scCardBody>        <form id="login-form" [formRoot]="loginForm">          <div scFieldGroup>            <div scField>              <label scLabel>Email</label>              <input                scInput                type="email"                [formField]="loginForm.email"                placeholder="m&#64;example.com"              />            </div>            <div scField>              <div class="flex items-center">                <label scLabel>Password</label>                <a scLink routerLink="." class="ms-auto">                  Forgot your password?                </a>              </div>              <input scInput type="password" [formField]="loginForm.password" />            </div>          </div>        </form>      </div>      <div scCardFooter class="flex-col gap-2">        <button scButton type="submit" form="login-form" class="w-full">          Login        </button>        <button scButton variant="outline" class="w-full">          Login with Google        </button>      </div>    </div>  `,  host: { class: 'flex w-full justify-center' },  encapsulation: ViewEncapsulation.None,})export class CardUsageDemo {  private readonly model = signal({ email: '', password: '' });  private readonly loginForm = form(    this.model,    (path) => {      required(path.email);      email(path.email);      required(path.password);    },    // Submitted from the footer's Login (form="…"); invalid, the fields are    // marked and the action waits.    { submission: { action: async () => undefined } },  );}

Anatomy

Every part is a directive on your element. The title is the heading you choose (an h3, an h4…), at the level that fits your page.

import {  ScCard, ScCardHeader, ScCardTitle, ScCardDescription,  ScCardAction, ScCardBody, ScCardFooter,} from '@semantic-components/ui';
<div scCard>  <div scCardHeader>    <h3 scCardTitle>…</h3>    <p scCardDescription>…</p>    <div scCardAction>…</div>  </div>  <div scCardBody>…</div>  <div scCardFooter>…</div></div>

Notes

  • The spacing between the sections and the inset of every part is one variable, --card-spacing, set by the style and by size="sm"; change it with a class on the card.
  • An image as the first child sits at the top with no padding above it, in the card's corners.
  • The action goes to the end of the header, beside the title and the description.
  • A footer's look is the style's: a muted band with a line above in nova, a line in lyra, none in the others (add border-t for one).

Examples

Size

Scheduled reports

Weekly snapshots. No more manual exports.

  • Choose a schedule (daily, or weekly).
  • Send to channels or specific teammates.
  • Include charts, tables, and key metrics.
import { Component, ViewEncapsulation } from '@angular/core';import {  ScButton,  ScCard,  ScCardBody,  ScCardDescription,  ScCardFooter,  ScCardHeader,  ScCardTitle,} from '@semantic-components/ui';

Spacing

Weekly digest

A summary of your team's activity, every Monday.

Mentions, merged pull requests and upcoming deadlines, in one email.

import { Component, ViewEncapsulation, computed, signal } from '@angular/core';import {  ScButton,  ScCard,  ScCardBody,  ScCardDescription,  ScCardFooter,  ScCardHeader,  ScCardTitle,  ScToggleGroup,

Edge to Edge

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.

import { Component, ViewEncapsulation } from '@angular/core';import {  ScButton,  ScCard,  ScCardBody,  ScCardDescription,  ScCardFooter,  ScCardHeader,  ScCardTitle,} from '@semantic-components/ui';

Image

Mountains at dawn

Design systems meetup

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

Featured
import { NgOptimizedImage } from '@angular/common';import { Component, ViewEncapsulation } from '@angular/core';import {  ScBadge,  ScButton,  ScCard,  ScCardAction,  ScCardDescription,  ScCardFooter,  ScCardHeader,

RTL

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

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

import { Dir } from '@angular/cdk/bidi';import { Component, LOCALE_ID, ViewEncapsulation, signal } from '@angular/core';import {  FormField,  FormRoot,  email,  form,  required,} from '@angular/forms/signals';import { RouterLink } from '@angular/router';

API reference

Each part takes class, merged over the style (cn: a later class wins).

PartSelectorDescription
ScCarddiv[scCard] The card. Input size: 'default' or 'sm' (less spacing, a smaller title).
ScCardHeaderdiv[scCardHeader] The title and description, the action beside them; with border-b, a line and spacing below.
ScCardTitle[scCardTitle] The title, on a heading of yours.
ScCardDescription[scCardDescription] Muted text under the title.
ScCardActiondiv[scCardAction] A button or badge at the end of the header.
ScCardBodydiv[scCardBody] The content, inset by --card-spacing.
ScCardFooterdiv[scCardFooter] Actions at the bottom: a row; its look from the style (with border-t, a line and spacing above).