Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Card

    Card that groups content with an optional title, description, body, and footer.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.

    Pro plan

    For small teams that are growing.

    Includes 10 team members, 50 GB of storage, and monthly reports.
    <x-markas.card title="Pro plan" description="For small teams that are growing.">
        Includes 10 team members, 50 GB of storage, and monthly reports.
    
        <x-slot:footer>
            <x-markas.button size="sm">Choose plan</x-markas.button>
            <x-markas.button variant="ghost" size="sm">Compare</x-markas.button>
        </x-slot:footer>
    </x-markas.card>
    import { Button } from "@/components/markas/Button";
    import { Card } from "@/components/markas/Card";
    
    export default function CardExample() {
      return (
        <Card
          title="Pro plan"
          description="For small teams that are growing."
          footer={
            <>
              <Button size="sm">Choose plan</Button>
              <Button variant="ghost" size="sm">
                Compare
              </Button>
            </>
          }
        >
          Includes 10 team members, 50 GB of storage, and monthly reports.
        </Card>
      );
    }
    <script setup lang="ts">
    import Button from "@/components/markas/Button.vue";
    import Card from "@/components/markas/Card.vue";
    </script>
    
    <template>
      <Card title="Pro plan" description="For small teams that are growing.">
        Includes 10 team members, 50 GB of storage, and monthly reports.
    
        <template #footer>
          <Button size="sm">Choose plan</Button>
          <Button variant="ghost" size="sm">Compare</Button>
        </template>
      </Card>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Card from "$lib/components/markas/Card.svelte";
    </script>
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members, 50 GB of storage, and monthly reports.
    
      {#snippet footer()}
        <Button size="sm">Choose plan</Button>
        <Button variant="ghost" size="sm">Compare</Button>
      {/snippet}
    </Card>
    ---
    import Button from "@/components/markas/Button.astro";
    import Card from "@/components/markas/Card.astro";
    ---
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members, 50 GB of storage, and monthly reports.
    
      <Fragment slot="footer">
        <Button size="sm">Choose plan</Button>
        <Button variant="ghost" size="sm">Compare</Button>
      </Fragment>
    </Card>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { Card } from "./markas/card.component";
    
    @Component({
      selector: "markas-example",
      imports: [Button, Card],
      template: `
        <article
          markas-card
          title="Pro plan"
          description="For small teams that are growing."
        >
          Includes 10 team members, 50 GB of storage, and monthly reports.
          <ng-container footer>
            <button markas-button size="sm">Choose plan</button>
            <button markas-button variant="ghost" size="sm">Compare</button>
          </ng-container>
        </article>
      `,
    })
    export default class CardExample {}

    Examples

    Statistics

    Total revenue

    $48,250

    +12.5% vs last month

    Active users

    1,284

    -3.2% vs last month

    Total revenue

    $48,250

    +12.5%vs last month

    Active users

    1,284

    -3.2%vs last month

    Total revenue

    $48,250

    +12.5%vs last month

    Active users

    1,284

    -3.2%vs last month

    Total revenue

    $48,250

    +12.5% vs last month

    Active users

    1,284

    -3.2% vs last month

    Total revenue

    $48,250

    +12.5%vs last month

    Active users

    1,284

    -3.2%vs last month

    Product

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Linen tote bag

    Natural, 38 x 42 cm

    $32.00

    In stock

    Profile

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Sarah Miller

    Product designer at MarkasUI

    Designs onboarding flows and keeps the component library tidy.

    Footer actions

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Delete project

    This removes the project, its files, and all deployments. This cannot be undone.

    Project: marketing-site

    Installation

    npx markasui@latest add card

    Usage

    <x-markas.card title="Pro plan" description="For small teams that are growing.">
        Includes 10 team members and 50 GB of storage.
    
        <x-slot:footer>
            <x-markas.button size="sm">Choose plan</x-markas.button>
        </x-slot:footer>
    </x-markas.card>
    import { Button } from "@/components/markas/Button";
    import { Card } from "@/components/markas/Card";
    
    <Card
      title="Pro plan"
      description="For small teams that are growing."
      footer={<Button size="sm">Choose plan</Button>}
    >
      Includes 10 team members and 50 GB of storage.
    </Card>;
    <template>
      <Card title="Pro plan" description="For small teams that are growing.">
        Includes 10 team members and 50 GB of storage.
    
        <template #footer>
          <Button size="sm">Choose plan</Button>
        </template>
      </Card>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Card from "$lib/components/markas/Card.svelte";
    </script>
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members and 50 GB of storage.
    
      {#snippet footer()}
        <Button size="sm">Choose plan</Button>
      {/snippet}
    </Card>
    ---
    import Button from "@/components/markas/Button.astro";
    import Card from "@/components/markas/Card.astro";
    ---
    
    <Card title="Pro plan" description="For small teams that are growing.">
      Includes 10 team members and 50 GB of storage.
    
      <Button slot="footer" size="sm">Choose plan</Button>
    </Card>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { Card } from "./markas/card.component";
    
    @Component({
      selector: "app-example",
      imports: [Button, Card],
      template: `
        <article
          markas-card
          title="Pro plan"
          description="For small teams that are growing."
        >
          Includes 10 team members and 50 GB of storage.
          <button markas-button footer size="sm">Choose plan</button>
        </article>
      `,
    })
    export class Example {}

    Angular uses an attribute selector on a native article. Elements with the footer attribute (an ng-container works) fill the footer.

    • Every part is optional. Empty parts are not rendered, so the spacing stays even.
    • Extra classes (such as max-w-sm) are merged last and land on the <article> element.
    • Card has no built-in text. All text comes from your props and slots, so it works in any language as is.

    Props

    NameTypeDefaultDescription
    titlestring / ReactNode-Card title, rendered as an h3.
    descriptionstring / ReactNode-Short text below the title.
    footerslot / ReactNode / snippet-Action area at the bottom of the card, such as buttons. Angular: an element with the footer attribute.

    Accessibility

    • Uses the article element, so the card reads as one self-contained piece of content.
    • The title is an h3. Adjust the page heading structure if the card sits directly under an h1.
    • No JavaScript and no built-in interactive elements.

    Related components

    More data components with the same classes in every framework.