Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Card Stack

    Layered stack of cards. Swipe, arrow keys, or buttons throw the top card away and the next one rises. Loops, with a position indicator.

    We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
    Maya Putri Engineering lead, Jakarta
    Same class names in Blade and React, so our Laravel pages and the React app finally match.
    Daniel Reyes Laravel developer, Surabaya
    Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
    Sari Wijaya CTO, Bandung
    Finally a component library our designers and engineers both enjoy opening on Monday.
    Tom Becker Design engineer, Berlin

    1 of 4

    We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
    Maya PutriEngineering lead, Jakarta
    Same class names in Blade and React, so our Laravel pages and the React app finally match.
    Daniel ReyesLaravel developer, Surabaya
    Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
    Sari WijayaCTO, Bandung
    Finally a component library our designers and engineers both enjoy opening on Monday.
    Tom BeckerDesign engineer, Berlin

    1 of 4

    We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
    Maya PutriEngineering lead, Jakarta
    Same class names in Blade and React, so our Laravel pages and the React app finally match.
    Daniel ReyesLaravel developer, Surabaya
    Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
    Sari WijayaCTO, Bandung
    Finally a component library our designers and engineers both enjoy opening on Monday.
    Tom BeckerDesign engineer, Berlin

    1 of 4

    We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
    Maya Putri Engineering lead, Jakarta
    Same class names in Blade and React, so our Laravel pages and the React app finally match.
    Daniel Reyes Laravel developer, Surabaya
    Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
    Sari Wijaya CTO, Bandung
    Finally a component library our designers and engineers both enjoy opening on Monday.
    Tom Becker Design engineer, Berlin

    1 of 4

    We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
    Maya PutriEngineering lead, Jakarta
    Same class names in Blade and React, so our Laravel pages and the React app finally match.
    Daniel ReyesLaravel developer, Surabaya
    Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
    Sari WijayaCTO, Bandung
    Finally a component library our designers and engineers both enjoy opening on Monday.
    Tom BeckerDesign engineer, Berlin

    1 of 4

    @php
        $card = 'grid h-full content-between gap-6 p-5';
        $quote = 'text-base text-ink';
        $person = 'flex items-center gap-3';
        $avatar = 'inline-flex size-9 items-center justify-center rounded-full bg-primary-soft text-xs font-medium text-ink';
        $meta = 'grid';
        $name = 'text-sm font-medium text-ink';
        $role = 'text-sm text-muted';
    
        $testimonials = [
            ['quote' => 'We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.', 'name' => 'Maya Putri', 'initials' => 'MP', 'role' => 'Engineering lead, Jakarta'],
            ['quote' => 'Same class names in Blade and React, so our Laravel pages and the React app finally match.', 'name' => 'Daniel Reyes', 'initials' => 'DR', 'role' => 'Laravel developer, Surabaya'],
            ['quote' => 'Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.', 'name' => 'Sari Wijaya', 'initials' => 'SW', 'role' => 'CTO, Bandung'],
            ['quote' => 'Finally a component library our designers and engineers both enjoy opening on Monday.', 'name' => 'Tom Becker', 'initials' => 'TB', 'role' => 'Design engineer, Berlin'],
        ];
    @endphp
    
    <x-markas.card-stack label="Customer testimonials">
        @foreach ($testimonials as $index => $item)
            <x-slot :name="'card-'.$index">
                <figure class="{{ $card }}">
                    <blockquote class="{{ $quote }}">{{ $item['quote'] }}</blockquote>
                    <figcaption class="{{ $person }}">
                        <span aria-hidden="true" class="{{ $avatar }}">{{ $item['initials'] }}</span>
                        <span class="{{ $meta }}">
                            <span class="{{ $name }}">{{ $item['name'] }}</span>
                            <span class="{{ $role }}">{{ $item['role'] }}</span>
                        </span>
                    </figcaption>
                </figure>
            </x-slot>
        @endforeach
    </x-markas.card-stack>
    import { CardStack } from "@/components/markas/CardStack";
    
    const card = "grid h-full content-between gap-6 p-5";
    const quote = "text-base text-ink";
    const person = "flex items-center gap-3";
    const avatar =
      "inline-flex size-9 items-center justify-center rounded-full bg-primary-soft text-xs font-medium text-ink";
    const meta = "grid";
    const name = "text-sm font-medium text-ink";
    const role = "text-sm text-muted";
    
    const testimonials = [
      {
        quote:
          "We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.",
        name: "Maya Putri",
        initials: "MP",
        role: "Engineering lead, Jakarta",
      },
      {
        quote:
          "Same class names in Blade and React, so our Laravel pages and the React app finally match.",
        name: "Daniel Reyes",
        initials: "DR",
        role: "Laravel developer, Surabaya",
      },
      {
        quote:
          "Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.",
        name: "Sari Wijaya",
        initials: "SW",
        role: "CTO, Bandung",
      },
      {
        quote:
          "Finally a component library our designers and engineers both enjoy opening on Monday.",
        name: "Tom Becker",
        initials: "TB",
        role: "Design engineer, Berlin",
      },
    ];
    
    export default function CardStackExample() {
      return (
        <CardStack label="Customer testimonials">
          {testimonials.map((item) => (
            <figure key={item.name} className={card}>
              <blockquote className={quote}>{item.quote}</blockquote>
              <figcaption className={person}>
                <span aria-hidden="true" className={avatar}>
                  {item.initials}
                </span>
                <span className={meta}>
                  <span className={name}>{item.name}</span>
                  <span className={role}>{item.role}</span>
                </span>
              </figcaption>
            </figure>
          ))}
        </CardStack>
      );
    }
    <script setup lang="ts">
    import CardStack from "@/components/markas/CardStack.vue";
    
    const card = "grid h-full content-between gap-6 p-5";
    const quote = "text-base text-ink";
    const person = "flex items-center gap-3";
    const avatar =
      "inline-flex size-9 items-center justify-center rounded-full bg-primary-soft text-xs font-medium text-ink";
    const meta = "grid";
    const name = "text-sm font-medium text-ink";
    const role = "text-sm text-muted";
    
    const testimonials = [
      {
        quote:
          "We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.",
        name: "Maya Putri",
        initials: "MP",
        role: "Engineering lead, Jakarta",
      },
      {
        quote:
          "Same class names in Blade and React, so our Laravel pages and the React app finally match.",
        name: "Daniel Reyes",
        initials: "DR",
        role: "Laravel developer, Surabaya",
      },
      {
        quote:
          "Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.",
        name: "Sari Wijaya",
        initials: "SW",
        role: "CTO, Bandung",
      },
      {
        quote:
          "Finally a component library our designers and engineers both enjoy opening on Monday.",
        name: "Tom Becker",
        initials: "TB",
        role: "Design engineer, Berlin",
      },
    ];
    </script>
    
    <template>
      <CardStack label="Customer testimonials">
        <figure v-for="item in testimonials" :key="item.name" :class="card">
          <blockquote :class="quote">{{ item.quote }}</blockquote>
          <figcaption :class="person">
            <span aria-hidden="true" :class="avatar">{{ item.initials }}</span>
            <span :class="meta">
              <span :class="name">{{ item.name }}</span>
              <span :class="role">{{ item.role }}</span>
            </span>
          </figcaption>
        </figure>
      </CardStack>
    </template>
    <script lang="ts">
      import CardStack from "$lib/components/markas/CardStack.svelte";
    
      const cardClass = "grid h-full content-between gap-6 p-5";
      const quote = "text-base text-ink";
      const person = "flex items-center gap-3";
      const avatar =
        "inline-flex size-9 items-center justify-center rounded-full bg-primary-soft text-xs font-medium text-ink";
      const meta = "grid";
      const name = "text-sm font-medium text-ink";
      const role = "text-sm text-muted";
    
      const testimonials = [
        {
          quote:
            "We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.",
          name: "Maya Putri",
          initials: "MP",
          role: "Engineering lead, Jakarta",
        },
        {
          quote:
            "Same class names in Blade and React, so our Laravel pages and the React app finally match.",
          name: "Daniel Reyes",
          initials: "DR",
          role: "Laravel developer, Surabaya",
        },
        {
          quote:
            "Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.",
          name: "Sari Wijaya",
          initials: "SW",
          role: "CTO, Bandung",
        },
        {
          quote:
            "Finally a component library our designers and engineers both enjoy opening on Monday.",
          name: "Tom Becker",
          initials: "TB",
          role: "Design engineer, Berlin",
        },
      ];
    </script>
    
    <CardStack label="Customer testimonials" items={testimonials}>
      {#snippet card(item)}
        <figure class={cardClass}>
          <blockquote class={quote}>{item.quote}</blockquote>
          <figcaption class={person}>
            <span aria-hidden="true" class={avatar}>{item.initials}</span>
            <span class={meta}>
              <span class={name}>{item.name}</span>
              <span class={role}>{item.role}</span>
            </span>
          </figcaption>
        </figure>
      {/snippet}
    </CardStack>
    ---
    import CardStack from "@/components/markas/CardStack.astro";
    
    const card = "grid h-full content-between gap-6 p-5";
    const quote = "text-base text-ink";
    const person = "flex items-center gap-3";
    const avatar =
      "inline-flex size-9 items-center justify-center rounded-full bg-primary-soft text-xs font-medium text-ink";
    const meta = "grid";
    const name = "text-sm font-medium text-ink";
    const role = "text-sm text-muted";
    
    const testimonials = [
      {
        quote:
          "We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.",
        name: "Maya Putri",
        initials: "MP",
        role: "Engineering lead, Jakarta",
      },
      {
        quote:
          "Same class names in Blade and React, so our Laravel pages and the React app finally match.",
        name: "Daniel Reyes",
        initials: "DR",
        role: "Laravel developer, Surabaya",
      },
      {
        quote:
          "Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.",
        name: "Sari Wijaya",
        initials: "SW",
        role: "CTO, Bandung",
      },
      {
        quote:
          "Finally a component library our designers and engineers both enjoy opening on Monday.",
        name: "Tom Becker",
        initials: "TB",
        role: "Design engineer, Berlin",
      },
    ];
    type Testimonial = (typeof testimonials)[number];
    ---
    
    <CardStack label="Customer testimonials" items={testimonials}>
      {
        (item: Testimonial) => (
          <figure class={card}>
            <blockquote class={quote}>{item.quote}</blockquote>
            <figcaption class={person}>
              <span aria-hidden="true" class={avatar}>{item.initials}</span>
              <span class={meta}>
                <span class={name}>{item.name}</span>
                <span class={role}>{item.role}</span>
              </span>
            </figcaption>
          </figure>
        )
      }
    </CardStack>
    import { Component } from "@angular/core";
    import { CardStack } from "./markas/card-stack.component";
    
    @Component({
      selector: "markas-example",
      imports: [CardStack],
      template: `
        <markas-card-stack label="Customer testimonials" [items]="testimonials">
          <ng-template let-item>
            <figure [class]="card">
              <blockquote [class]="quote">{{ item.quote }}</blockquote>
              <figcaption [class]="person">
                <span aria-hidden="true" [class]="avatar">{{ item.initials }}</span>
                <span [class]="meta">
                  <span [class]="name">{{ item.name }}</span>
                  <span [class]="role">{{ item.role }}</span>
                </span>
              </figcaption>
            </figure>
          </ng-template>
        </markas-card-stack>
      `,
    })
    export default class CardStackExample {
      protected readonly card = "grid h-full content-between gap-6 p-5";
      protected readonly quote = "text-base text-ink";
      protected readonly person = "flex items-center gap-3";
      protected readonly avatar =
        "inline-flex size-9 items-center justify-center rounded-full bg-primary-soft text-xs font-medium text-ink";
      protected readonly meta = "grid";
      protected readonly name = "text-sm font-medium text-ink";
      protected readonly role = "text-sm text-muted";
      protected readonly testimonials = [
        {
          quote:
            "We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.",
          name: "Maya Putri",
          initials: "MP",
          role: "Engineering lead, Jakarta",
        },
        {
          quote:
            "Same class names in Blade and React, so our Laravel pages and the React app finally match.",
          name: "Daniel Reyes",
          initials: "DR",
          role: "Laravel developer, Surabaya",
        },
        {
          quote:
            "Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.",
          name: "Sari Wijaya",
          initials: "SW",
          role: "CTO, Bandung",
        },
        {
          quote:
            "Finally a component library our designers and engineers both enjoy opening on Monday.",
          name: "Tom Becker",
          initials: "TB",
          role: "Design engineer, Berlin",
        },
      ];
    }

    Examples

    Feature highlights

    Instant search

    Find any document, comment, or file in milliseconds with typo-tolerant search.

    Offline mode

    Keep working on a plane. Changes sync the moment you are back online.

    Shared inbox

    Route customer emails to the right teammate without forwarding threads.

    Feature 1 of 3

    Instant search

    Find any document, comment, or file in milliseconds with typo-tolerant search.

    Offline mode

    Keep working on a plane. Changes sync the moment you are back online.

    Shared inbox

    Route customer emails to the right teammate without forwarding threads.

    Feature 1 of 3

    Instant search

    Find any document, comment, or file in milliseconds with typo-tolerant search.

    Offline mode

    Keep working on a plane. Changes sync the moment you are back online.

    Shared inbox

    Route customer emails to the right teammate without forwarding threads.

    Feature 1 of 3

    Instant search

    Find any document, comment, or file in milliseconds with typo-tolerant search.

    Offline mode

    Keep working on a plane. Changes sync the moment you are back online.

    Shared inbox

    Route customer emails to the right teammate without forwarding threads.

    Feature 1 of 3

    Instant search

    Find any document, comment, or file in milliseconds with typo-tolerant search.

    Offline mode

    Keep working on a plane. Changes sync the moment you are back online.

    Shared inbox

    Route customer emails to the right teammate without forwarding threads.

    Feature 1 of 3

    Profile cards

    Rina Kusuma

    Product designer in Jakarta

    • Figma
    • Design systems
    • Research

    Liam Carter

    Frontend engineer in Toronto

    • React
    • Accessibility
    • Testing

    Ayu Lestari

    Data analyst in Bandung

    • SQL
    • Python
    • Dashboards

    1 of 3

    Rina Kusuma

    Product designer in Jakarta

    • Figma
    • Design systems
    • Research

    Liam Carter

    Frontend engineer in Toronto

    • React
    • Accessibility
    • Testing

    Ayu Lestari

    Data analyst in Bandung

    • SQL
    • Python
    • Dashboards

    1 of 3

    Rina Kusuma

    Product designer in Jakarta

    • Figma
    • Design systems
    • Research

    Liam Carter

    Frontend engineer in Toronto

    • React
    • Accessibility
    • Testing

    Ayu Lestari

    Data analyst in Bandung

    • SQL
    • Python
    • Dashboards

    1 of 3

    Rina Kusuma

    Product designer in Jakarta

    • Figma
    • Design systems
    • Research

    Liam Carter

    Frontend engineer in Toronto

    • React
    • Accessibility
    • Testing

    Ayu Lestari

    Data analyst in Bandung

    • SQL
    • Python
    • Dashboards

    1 of 3

    Rina Kusuma

    Product designer in Jakarta

    • Figma
    • Design systems
    • Research

    Liam Carter

    Frontend engineer in Toronto

    • React
    • Accessibility
    • Testing

    Ayu Lestari

    Data analyst in Bandung

    • SQL
    • Python
    • Dashboards

    1 of 3

    Tips with links

    Tip 1

    Press K to search

    Jump to any page, project, or teammate without touching the mouse.

    See all shortcuts

    Tip 2

    Drag to reorder

    Grab a task by its handle and drop it where it belongs.

    See all shortcuts

    Tip 3

    Mention with @

    Type @ and a name to notify a teammate right inside a comment.

    See all shortcuts

    Tip 4

    Star what matters

    Starred projects stay pinned at the top of your sidebar.

    See all shortcuts

    Tip 1 of 4

    Tip 1

    Press K to search

    Jump to any page, project, or teammate without touching the mouse.

    See all shortcuts

    Tip 2

    Drag to reorder

    Grab a task by its handle and drop it where it belongs.

    See all shortcuts

    Tip 3

    Mention with @

    Type @ and a name to notify a teammate right inside a comment.

    See all shortcuts

    Tip 4

    Star what matters

    Starred projects stay pinned at the top of your sidebar.

    See all shortcuts

    Tip 1 of 4

    Tip 1

    Press K to search

    Jump to any page, project, or teammate without touching the mouse.

    See all shortcuts

    Tip 2

    Drag to reorder

    Grab a task by its handle and drop it where it belongs.

    See all shortcuts

    Tip 3

    Mention with @

    Type @ and a name to notify a teammate right inside a comment.

    See all shortcuts

    Tip 4

    Star what matters

    Starred projects stay pinned at the top of your sidebar.

    See all shortcuts

    Tip 1 of 4

    Tip 1

    Press K to search

    Jump to any page, project, or teammate without touching the mouse.

    See all shortcuts

    Tip 2

    Drag to reorder

    Grab a task by its handle and drop it where it belongs.

    See all shortcuts

    Tip 3

    Mention with @

    Type @ and a name to notify a teammate right inside a comment.

    See all shortcuts

    Tip 4

    Star what matters

    Starred projects stay pinned at the top of your sidebar.

    See all shortcuts

    Tip 1 of 4

    Tip 1

    Press K to search

    Jump to any page, project, or teammate without touching the mouse.

    See all shortcuts

    Tip 2

    Drag to reorder

    Grab a task by its handle and drop it where it belongs.

    See all shortcuts

    Tip 3

    Mention with @

    Type @ and a name to notify a teammate right inside a comment.

    See all shortcuts

    Tip 4

    Star what matters

    Starred projects stay pinned at the top of your sidebar.

    See all shortcuts

    Tip 1 of 4

    Installation

    npx markasui@latest add card-stack

    Usage

    <x-markas.card-stack label="Customer testimonials">
        <x-slot:maya>
            <figure class="grid gap-6 p-5">
                <blockquote>Onboarding a new hire now takes an afternoon.</blockquote>
                <figcaption class="text-sm text-muted">Maya Putri, Kopiloka</figcaption>
            </figure>
        </x-slot:maya>
        <x-slot:daniel>
            <figure class="grid gap-6 p-5">
                <blockquote>The keyboard shortcuts alone save us hours.</blockquote>
                <figcaption class="text-sm text-muted">Daniel Reyes, Northwind</figcaption>
            </figure>
        </x-slot:daniel>
    </x-markas.card-stack>

    Needs Alpine.js. Every named slot becomes a card, in the order you write them. For a list, use <x-slot :name="'card-'.$index"> inside @foreach.

    import { CardStack } from "@/components/markas/CardStack";
    
    <CardStack label="Customer testimonials">
      {testimonials.map((item) => (
        <figure key={item.name} className="grid gap-6 p-5">
          <blockquote>{item.quote}</blockquote>
          <figcaption className="text-sm text-muted">{item.name}</figcaption>
        </figure>
      ))}
    </CardStack>;
    <template>
      <CardStack label="Customer testimonials">
        <figure
          v-for="item in testimonials"
          :key="item.name"
          class="grid gap-6 p-5"
        >
          <blockquote>{{ item.quote }}</blockquote>
          <figcaption class="text-sm text-muted">{{ item.name }}</figcaption>
        </figure>
      </CardStack>
    </template>
    <script lang="ts">
      import CardStack from "$lib/components/markas/CardStack.svelte";
    </script>
    
    <CardStack label="Customer testimonials" items={testimonials}>
      {#snippet card(item)}
        <figure class="grid gap-6 p-5">
          <blockquote>{item.quote}</blockquote>
          <figcaption class="text-sm text-muted">{item.name}</figcaption>
        </figure>
      {/snippet}
    </CardStack>

    Svelte, Astro, and Angular take the cards as items and draw each one with a snippet, a function child, or an ng-template. Svelte reads {index} in a plain attribute as an expression, so pass label templates in braces: cardLabel={"Tip {index} of {total}"}.

    ---
    import CardStack from "@/components/markas/CardStack.astro";
    ---
    
    <CardStack label="Customer testimonials" items={testimonials}>
      {
        (item: Testimonial) => (
          <figure class="grid gap-6 p-5">
            <blockquote>{item.quote}</blockquote>
            <figcaption class="text-sm text-muted">{item.name}</figcaption>
          </figure>
        )
      }
    </CardStack>

    Each stack is a small custom element, so it keeps working after view transitions.

    import { Component } from "@angular/core";
    import { CardStack } from "./markas/card-stack.component";
    
    @Component({
      selector: "app-testimonials",
      imports: [CardStack],
      template: `
        <markas-card-stack label="Customer testimonials" [items]="testimonials">
          <ng-template let-item let-index="index">
            <figure class="grid gap-6 p-5">
              <blockquote>{{ item.quote }}</blockquote>
              <figcaption class="text-sm text-muted">{{ item.name }}</figcaption>
            </figure>
          </ng-template>
        </markas-card-stack>
      `,
    })
    export class Testimonials {
      testimonials = [{ quote: "Setup took ten minutes.", name: "Sari Wijaya" }];
    }

    Bind cardLabel with a property when it holds {index}: [cardLabel]="tipLabel".

    • The stack provides the card surface (border, background, radius). Add only padding and content inside each card.
    • Next, the Right arrow key, or dragging the top card past a quarter of the width throws it away; it settles at the back. Previous brings the last card back from the left. The stack loops.
    • A short drag springs back. Presses that move less than 4px stay clicks, so links inside the top card keep working.
    • cardLabel accepts {index} and {total}, for example Tip {index} of {total}.
    • With reduced motion the cards swap instantly.

    Props

    NameTypeDefaultDescription
    cardsBlade: named slots · React: children · Vue: default slot-Each named slot (Blade) or each child element (React and Vue) becomes one card, in order. The stack sizes itself to the tallest card.
    labelstringCard stackAccessible name of the stack region. Describe the content, for example Customer testimonials.
    prevLabelstringPrevious cardAccessible name of the previous button.
    nextLabelstringNext cardAccessible name of the next button.
    cardLabelstring{index} of {total}Name of each card and the position text announced after every move. Accepts {index} and {total}.
    idstringautoId of the region. The card list gets the same id with a -cards suffix.
    itemsT[]-Svelte, Astro, and Angular only. One card per entry, drawn by a card snippet (Svelte), a function child (Astro), or an ng-template with let-item and let-index (Angular).

    Accessibility

    • The stack is a region with aria-roledescription carousel and each card is a group named by cardLabel.
    • Left and Right arrow keys move back and forward anywhere inside the stack, and the stack itself is focusable.
    • Cards behind the top one are inert, so Tab never lands inside a hidden card.
    • A polite live region announces the new position after each move.
    • With reduced motion the cards swap instantly without the throw and rise animations.

    Related components

    More markasui components with the same classes in every framework.