Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Stacking Cards

    Cards that stick and pile up as you scroll, while the covered ones shrink, fan out, or blur. A card with keyboard focus comes back to the front.

    Why teams pick Markas

    Scroll to stack the cards

    1

    Copy, paste, own it

    Every component lands in your codebase as plain files you can read and change.

    2

    Blade, React, and Vue

    The same classes and props in all three, so teams can share one design.

    3

    Tokens only

    Colors come from one theme file, so dark mode and rebrands take minutes.

    4

    Accessible by default

    Native elements, keyboard support, and reduced motion are built in.

    Why teams pick Markas

    Scroll to stack the cards

    1

    Copy, paste, own it

    Every component lands in your codebase as plain files you can read and change.

    2

    Blade, React, and Vue

    The same classes and props in all three, so teams can share one design.

    3

    Tokens only

    Colors come from one theme file, so dark mode and rebrands take minutes.

    4

    Accessible by default

    Native elements, keyboard support, and reduced motion are built in.

    Why teams pick Markas

    Scroll to stack the cards

    1

    Copy, paste, own it

    Every component lands in your codebase as plain files you can read and change.

    2

    Blade, React, and Vue

    The same classes and props in all three, so teams can share one design.

    3

    Tokens only

    Colors come from one theme file, so dark mode and rebrands take minutes.

    4

    Accessible by default

    Native elements, keyboard support, and reduced motion are built in.

    Why teams pick Markas

    Scroll to stack the cards

    1

    Copy, paste, own it

    Every component lands in your codebase as plain files you can read and change.

    2

    Blade, React, and Vue

    The same classes and props in all three, so teams can share one design.

    3

    Tokens only

    Colors come from one theme file, so dark mode and rebrands take minutes.

    4

    Accessible by default

    Native elements, keyboard support, and reduced motion are built in.

    Why teams pick Markas

    Scroll to stack the cards

    1

    Copy, paste, own it

    Every component lands in your codebase as plain files you can read and change.

    2

    Blade, React, and Vue

    The same classes and props in all three, so teams can share one design.

    3

    Tokens only

    Colors come from one theme file, so dark mode and rebrands take minutes.

    4

    Accessible by default

    Native elements, keyboard support, and reduced motion are built in.

    @php
        $scroller = 'h-96 overflow-y-auto rounded-xl border border-line bg-subtle px-4 pb-48 focus-visible:outline-2 focus-visible:outline-primary';
        $intro = 'py-6';
        $title = 'text-lg font-semibold text-ink';
        $hint = 'mt-1 text-sm text-muted';
        $stack = 'gap-4';
        $card = 'grid h-48 content-start gap-3 rounded-xl border border-line bg-surface p-5';
        $badge = 'grid size-9 place-items-center rounded-lg bg-primary-soft text-sm font-semibold text-primary';
        $cardTitle = 'text-base font-semibold text-ink';
        $cardText = 'text-sm text-muted';
        $features = [
            ['title' => 'Copy, paste, own it', 'text' => 'Every component lands in your codebase as plain files you can read and change.'],
            ['title' => 'Blade, React, and Vue', 'text' => 'The same classes and props in all three, so teams can share one design.'],
            ['title' => 'Tokens only', 'text' => 'Colors come from one theme file, so dark mode and rebrands take minutes.'],
            ['title' => 'Accessible by default', 'text' => 'Native elements, keyboard support, and reduced motion are built in.'],
        ];
    @endphp
    
    <section tabindex="0" aria-label="Product features" class="{{ $scroller }}">
        <div class="{{ $intro }}">
            <h3 class="{{ $title }}">Why teams pick Markas</h3>
            <p class="{{ $hint }}">Scroll to stack the cards</p>
        </div>
        <x-markas.stacking-cards :class="$stack">
            @foreach ($features as $index => $feature)
                <article class="{{ $card }}">
                    <span class="{{ $badge }}">{{ $index + 1 }}</span>
                    <h4 class="{{ $cardTitle }}">{{ $feature['title'] }}</h4>
                    <p class="{{ $cardText }}">{{ $feature['text'] }}</p>
                </article>
            @endforeach
        </x-markas.stacking-cards>
    </section>
    import { StackingCards } from "@/components/markas/StackingCards";
    
    const scroller =
      "h-96 overflow-y-auto rounded-xl border border-line bg-subtle px-4 pb-48 focus-visible:outline-2 focus-visible:outline-primary";
    const intro = "py-6";
    const title = "text-lg font-semibold text-ink";
    const hint = "mt-1 text-sm text-muted";
    const stack = "gap-4";
    const card =
      "grid h-48 content-start gap-3 rounded-xl border border-line bg-surface p-5";
    const badge =
      "grid size-9 place-items-center rounded-lg bg-primary-soft text-sm font-semibold text-primary";
    const cardTitle = "text-base font-semibold text-ink";
    const cardText = "text-sm text-muted";
    const features = [
      {
        title: "Copy, paste, own it",
        text: "Every component lands in your codebase as plain files you can read and change.",
      },
      {
        title: "Blade, React, and Vue",
        text: "The same classes and props in all three, so teams can share one design.",
      },
      {
        title: "Tokens only",
        text: "Colors come from one theme file, so dark mode and rebrands take minutes.",
      },
      {
        title: "Accessible by default",
        text: "Native elements, keyboard support, and reduced motion are built in.",
      },
    ];
    
    export default function StackingCardsExample() {
      return (
        <section tabIndex={0} aria-label="Product features" className={scroller}>
          <div className={intro}>
            <h3 className={title}>Why teams pick Markas</h3>
            <p className={hint}>Scroll to stack the cards</p>
          </div>
          <StackingCards className={stack}>
            {features.map((feature, index) => (
              <article key={feature.title} className={card}>
                <span className={badge}>{index + 1}</span>
                <h4 className={cardTitle}>{feature.title}</h4>
                <p className={cardText}>{feature.text}</p>
              </article>
            ))}
          </StackingCards>
        </section>
      );
    }
    <script setup lang="ts">
    import StackingCards from "@/components/markas/StackingCards.vue";
    
    const scroller =
      "h-96 overflow-y-auto rounded-xl border border-line bg-subtle px-4 pb-48 focus-visible:outline-2 focus-visible:outline-primary";
    const intro = "py-6";
    const title = "text-lg font-semibold text-ink";
    const hint = "mt-1 text-sm text-muted";
    const stack = "gap-4";
    const card =
      "grid h-48 content-start gap-3 rounded-xl border border-line bg-surface p-5";
    const badge =
      "grid size-9 place-items-center rounded-lg bg-primary-soft text-sm font-semibold text-primary";
    const cardTitle = "text-base font-semibold text-ink";
    const cardText = "text-sm text-muted";
    const features = [
      {
        title: "Copy, paste, own it",
        text: "Every component lands in your codebase as plain files you can read and change.",
      },
      {
        title: "Blade, React, and Vue",
        text: "The same classes and props in all three, so teams can share one design.",
      },
      {
        title: "Tokens only",
        text: "Colors come from one theme file, so dark mode and rebrands take minutes.",
      },
      {
        title: "Accessible by default",
        text: "Native elements, keyboard support, and reduced motion are built in.",
      },
    ];
    </script>
    
    <template>
      <section tabindex="0" aria-label="Product features" :class="scroller">
        <div :class="intro">
          <h3 :class="title">Why teams pick Markas</h3>
          <p :class="hint">Scroll to stack the cards</p>
        </div>
        <StackingCards :class="stack">
          <article
            v-for="(feature, index) in features"
            :key="feature.title"
            :class="card"
          >
            <span :class="badge">{{ index + 1 }}</span>
            <h4 :class="cardTitle">{{ feature.title }}</h4>
            <p :class="cardText">{{ feature.text }}</p>
          </article>
        </StackingCards>
      </section>
    </template>
    <script lang="ts">
      import StackingCards from "$lib/components/markas/StackingCards.svelte";
    
      const scroller =
        "h-96 overflow-y-auto rounded-xl border border-line bg-subtle px-4 pb-48 focus-visible:outline-2 focus-visible:outline-primary";
      const intro = "py-6";
      const title = "text-lg font-semibold text-ink";
      const hint = "mt-1 text-sm text-muted";
      const stack = "gap-4";
      const card =
        "grid h-48 content-start gap-3 rounded-xl border border-line bg-surface p-5";
      const badge =
        "grid size-9 place-items-center rounded-lg bg-primary-soft text-sm font-semibold text-primary";
      const cardTitle = "text-base font-semibold text-ink";
      const cardText = "text-sm text-muted";
      const features = [
        {
          title: "Copy, paste, own it",
          text: "Every component lands in your codebase as plain files you can read and change.",
        },
        {
          title: "Blade, React, and Vue",
          text: "The same classes and props in all three, so teams can share one design.",
        },
        {
          title: "Tokens only",
          text: "Colors come from one theme file, so dark mode and rebrands take minutes.",
        },
        {
          title: "Accessible by default",
          text: "Native elements, keyboard support, and reduced motion are built in.",
        },
      ];
    </script>
    
    <!-- svelte-ignore a11y_no_noninteractive_tabindex -->
    <section tabindex="0" aria-label="Product features" class={scroller}>
      <div class={intro}>
        <h3 class={title}>Why teams pick Markas</h3>
        <p class={hint}>Scroll to stack the cards</p>
      </div>
      <StackingCards class={stack}>
        {#each features as feature, index (feature.title)}<article class={card}>
            <span class={badge}>{index + 1}</span>
            <h4 class={cardTitle}>{feature.title}</h4>
            <p class={cardText}>{feature.text}</p>
          </article>{/each}
      </StackingCards>
    </section>
    ---
    import StackingCards from "@/components/markas/StackingCards.astro";
    
    const scroller =
      "h-96 overflow-y-auto rounded-xl border border-line bg-subtle px-4 pb-48 focus-visible:outline-2 focus-visible:outline-primary";
    const intro = "py-6";
    const title = "text-lg font-semibold text-ink";
    const hint = "mt-1 text-sm text-muted";
    const stack = "gap-4";
    const card =
      "grid h-48 content-start gap-3 rounded-xl border border-line bg-surface p-5";
    const badge =
      "grid size-9 place-items-center rounded-lg bg-primary-soft text-sm font-semibold text-primary";
    const cardTitle = "text-base font-semibold text-ink";
    const cardText = "text-sm text-muted";
    const features = [
      {
        title: "Copy, paste, own it",
        text: "Every component lands in your codebase as plain files you can read and change.",
      },
      {
        title: "Blade, React, and Vue",
        text: "The same classes and props in all three, so teams can share one design.",
      },
      {
        title: "Tokens only",
        text: "Colors come from one theme file, so dark mode and rebrands take minutes.",
      },
      {
        title: "Accessible by default",
        text: "Native elements, keyboard support, and reduced motion are built in.",
      },
    ];
    ---
    
      <section tabindex="0" aria-label="Product features" class={scroller}>
        <div class={intro}>
          <h3 class={title}>Why teams pick Markas</h3>
          <p class={hint}>Scroll to stack the cards</p>
        </div>
        <StackingCards class={stack}>
          {features.map((feature, index) => (<article class={card}>
            <span class={badge}>{index + 1}</span>
            <h4 class={cardTitle}>{feature.title}</h4>
            <p class={cardText}>{feature.text}</p>
          </article>))}
        </StackingCards>
      </section>
    import { Component } from "@angular/core";
    import { StackingCards } from "./markas/stacking-cards.component";
    
    @Component({
      selector: "markas-example",
      imports: [StackingCards],
      template: `
        <section tabindex="0" aria-label="Product features" [class]="scroller">
          <div [class]="intro">
            <h3 [class]="title">Why teams pick Markas</h3>
            <p [class]="hint">Scroll to stack the cards</p>
          </div>
          <markas-stacking-cards [class]="stack">
            @for (feature of features; track feature.title; let index = $index) {
              <article [class]="card">
                <span [class]="badge">{{ index + 1 }}</span>
                <h4 [class]="cardTitle">{{ feature.title }}</h4>
                <p [class]="cardText">{{ feature.text }}</p>
              </article>
            }
          </markas-stacking-cards>
        </section>
      `,
    })
    export default class StackingCardsExample {
      protected readonly scroller =
        "h-96 overflow-y-auto rounded-xl border border-line bg-subtle px-4 pb-48 focus-visible:outline-2 focus-visible:outline-primary";
      protected readonly intro = "py-6";
      protected readonly title = "text-lg font-semibold text-ink";
      protected readonly hint = "mt-1 text-sm text-muted";
      protected readonly stack = "gap-4";
      protected readonly card =
        "grid h-48 content-start gap-3 rounded-xl border border-line bg-surface p-5";
      protected readonly badge =
        "grid size-9 place-items-center rounded-lg bg-primary-soft text-sm font-semibold text-primary";
      protected readonly cardTitle = "text-base font-semibold text-ink";
      protected readonly cardText = "text-sm text-muted";
      protected readonly features = [
        {
          title: "Copy, paste, own it",
          text: "Every component lands in your codebase as plain files you can read and change.",
        },
        {
          title: "Blade, React, and Vue",
          text: "The same classes and props in all three, so teams can share one design.",
        },
        {
          title: "Tokens only",
          text: "Colors come from one theme file, so dark mode and rebrands take minutes.",
        },
        {
          title: "Accessible by default",
          text: "Native elements, keyboard support, and reduced motion are built in.",
        },
      ];
    }

    Examples

    Onboarding steps that fan out

    Get started in four steps

    About ten minutes in total

  • Step 1 of 4

    Create your workspace

    Pick a name and a currency. Rupiah is ready from the start.

  • Step 2 of 4

    Invite your team

    Add Rania from finance and Dimas from sales in one go.

  • Step 3 of 4

    Connect your bank

    Link a business account to match payments automatically.

  • Step 4 of 4

    Send your first invoice

    Customers pay by transfer or QRIS and you get notified.

  • Get started in four steps

    About ten minutes in total

  • Step 1 of 4

    Create your workspace

    Pick a name and a currency. Rupiah is ready from the start.

  • Step 2 of 4

    Invite your team

    Add Rania from finance and Dimas from sales in one go.

  • Step 3 of 4

    Connect your bank

    Link a business account to match payments automatically.

  • Step 4 of 4

    Send your first invoice

    Customers pay by transfer or QRIS and you get notified.

  • Get started in four steps

    About ten minutes in total

  • Step 1 of 4

    Create your workspace

    Pick a name and a currency. Rupiah is ready from the start.

  • Step 2 of 4

    Invite your team

    Add Rania from finance and Dimas from sales in one go.

  • Step 3 of 4

    Connect your bank

    Link a business account to match payments automatically.

  • Step 4 of 4

    Send your first invoice

    Customers pay by transfer or QRIS and you get notified.

  • Get started in four steps

    About ten minutes in total

  • Step 1 of 4

    Create your workspace

    Pick a name and a currency. Rupiah is ready from the start.

  • Step 2 of 4

    Invite your team

    Add Rania from finance and Dimas from sales in one go.

  • Step 3 of 4

    Connect your bank

    Link a business account to match payments automatically.

  • Step 4 of 4

    Send your first invoice

    Customers pay by transfer or QRIS and you get notified.

  • Get started in four steps

    About ten minutes in total

  • Step 1 of 4

    Create your workspace

    Pick a name and a currency. Rupiah is ready from the start.

  • Step 2 of 4

    Invite your team

    Add Rania from finance and Dimas from sales in one go.

  • Step 3 of 4

    Connect your bank

    Link a business account to match payments automatically.

  • Step 4 of 4

    Send your first invoice

    Customers pay by transfer or QRIS and you get notified.

  • Pricing plans in Rupiah with blur

    Simple pricing in Rupiah

    Prices per month, tax included

    Starter

    For solo makers

    Rp 0per month

    1 project, community help

    Team

    For small studios

    Rp 149.000per month

    10 projects, chat support

    Business

    For growing companies

    Rp 499.000per month

    Unlimited, priority support

    Simple pricing in Rupiah

    Prices per month, tax included

    Starter

    For solo makers

    Rp 0per month

    1 project, community help

    Team

    For small studios

    Rp 149.000per month

    10 projects, chat support

    Business

    For growing companies

    Rp 499.000per month

    Unlimited, priority support

    Simple pricing in Rupiah

    Prices per month, tax included

    Starter

    For solo makers

    Rp 0per month

    1 project, community help

    Team

    For small studios

    Rp 149.000per month

    10 projects, chat support

    Business

    For growing companies

    Rp 499.000per month

    Unlimited, priority support

    Simple pricing in Rupiah

    Prices per month, tax included

    Starter

    For solo makers

    Rp 0per month

    1 project, community help

    Team

    For small studios

    Rp 149.000per month

    10 projects, chat support

    Business

    For growing companies

    Rp 499.000per month

    Unlimited, priority support

    Simple pricing in Rupiah

    Prices per month, tax included

    Starter

    For solo makers

    Rp 0per month

    1 project, community help

    Team

    For small studios

    Rp 149.000per month

    10 projects, chat support

    Business

    For growing companies

    Rp 499.000per month

    Unlimited, priority support

    Testimonials from Indonesian teams

    Loved by teams across Indonesia

    We shipped our checkout in Blade and the admin in Vue with the same buttons. Nobody noticed the seams.
    Rania Putri, Founder, Bandung
    Dark mode took one afternoon because every color is a token.
    Dimas Pratama, CTO, Jakarta
    Keyboard support was already there, so our audit came back clean.
    Sekar Ayu, Designer, Yogyakarta

    Loved by teams across Indonesia

    We shipped our checkout in Blade and the admin in Vue with the same buttons. Nobody noticed the seams.
    Rania Putri, Founder, Bandung
    Dark mode took one afternoon because every color is a token.
    Dimas Pratama, CTO, Jakarta
    Keyboard support was already there, so our audit came back clean.
    Sekar Ayu, Designer, Yogyakarta

    Loved by teams across Indonesia

    We shipped our checkout in Blade and the admin in Vue with the same buttons. Nobody noticed the seams.
    Rania Putri, Founder, Bandung
    Dark mode took one afternoon because every color is a token.
    Dimas Pratama, CTO, Jakarta
    Keyboard support was already there, so our audit came back clean.
    Sekar Ayu, Designer, Yogyakarta

    Loved by teams across Indonesia

    We shipped our checkout in Blade and the admin in Vue with the same buttons. Nobody noticed the seams.
    Rania Putri, Founder, Bandung
    Dark mode took one afternoon because every color is a token.
    Dimas Pratama, CTO, Jakarta
    Keyboard support was already there, so our audit came back clean.
    Sekar Ayu, Designer, Yogyakarta

    Loved by teams across Indonesia

    We shipped our checkout in Blade and the admin in Vue with the same buttons. Nobody noticed the seams.
    Rania Putri, Founder, Bandung
    Dark mode took one afternoon because every color is a token.
    Dimas Pratama, CTO, Jakarta
    Keyboard support was already there, so our audit came back clean.
    Sekar Ayu, Designer, Yogyakarta

    Installation

    npx markasui@latest add stacking-cards

    Usage

    <div class="pb-64">
        <x-markas.stacking-cards variant="fan" :top="96" :offset="12" class="gap-6">
            <article class="h-64 rounded-xl border border-line bg-surface p-6">Plan your week</article>
            <article class="h-64 rounded-xl border border-line bg-surface p-6">Share with your team</article>
            <article class="h-64 rounded-xl border border-line bg-surface p-6">Get paid on time</article>
        </x-markas.stacking-cards>
    </div>

    Needs Alpine.js.

    import { StackingCards } from "@/components/markas/StackingCards";
    
    <div className="pb-64">
      <StackingCards variant="fan" top={96} offset={12} className="gap-6">
        <article className="h-64 rounded-xl border border-line bg-surface p-6">
          Plan your week
        </article>
        <article className="h-64 rounded-xl border border-line bg-surface p-6">
          Share with your team
        </article>
        <article className="h-64 rounded-xl border border-line bg-surface p-6">
          Get paid on time
        </article>
      </StackingCards>
    </div>;
    <template>
      <div class="pb-64">
        <StackingCards variant="fan" :top="96" :offset="12" class="gap-6">
          <article class="h-64 rounded-xl border border-line bg-surface p-6">
            Plan your week
          </article>
          <article class="h-64 rounded-xl border border-line bg-surface p-6">
            Share with your team
          </article>
          <article class="h-64 rounded-xl border border-line bg-surface p-6">
            Get paid on time
          </article>
        </StackingCards>
      </div>
    </template>
    <script lang="ts">
      import StackingCards from "$lib/components/markas/StackingCards.svelte";
    </script>
    
    <StackingCards variant="fan" class="gap-4">
      <article class="h-48 rounded-xl border border-line bg-surface p-5">
        One
      </article>
      <article class="h-48 rounded-xl border border-line bg-surface p-5">
        Two
      </article>
    </StackingCards>
    ---
    import StackingCards from "@/components/markas/StackingCards.astro";
    ---
    
    <StackingCards variant="fan" class="gap-4">
      <article class="h-48 rounded-xl border border-line bg-surface p-5">One</article>
      <article class="h-48 rounded-xl border border-line bg-surface p-5">Two</article>
    </StackingCards>

    A small bundled script measures each stack through the markas-stacking-cards element.

    import { Component } from "@angular/core";
    import { StackingCards } from "./markas/stacking-cards.component";
    
    @Component({
      selector: "app-features",
      imports: [StackingCards],
      template: `
        <markas-stacking-cards variant="fan" class="gap-4">
          <article class="h-48 rounded-xl border border-line bg-surface p-5">
            One
          </article>
          <article class="h-48 rounded-xl border border-line bg-surface p-5">
            Two
          </article>
        </markas-stacking-cards>
      `,
    })
    export class Features {}
    • Every direct child is a card. Cards stick at top plus offset per card, so earlier cards peek out above the later ones.
    • --stack-depth on each card says how much the later cards already cover it. scale shrinks and dims, fan tilts left and right, blur blurs and dims.
    • The scroll listener is passive, batched into one requestAnimationFrame, and only attached while the stack is on screen. It works in the page and inside any scrolling container.
    • A card holding keyboard focus jumps to the front at full size. With reduced motion the cards still stick but never change. Attributes and class go to the stack.

    Props

    NameTypeDefaultDescription
    variant"scale" | "fan" | "blur""scale"What happens to covered cards. scale: shrink and dim. fan: tilt left and right like a deck. blur: blur and dim.
    topnumber16Sticky top of the first card in px, measured from the top of the scrolling area.
    offsetnumber16Extra px each later card sticks below the one before, so the edges of earlier cards peek out. 0 stacks them exactly.
    children / slotReactNode / slot-The cards. Every direct child is one card; give each its own background so it covers the ones below.

    Accessibility

    • Cards stay in normal reading order; the stacking is only visual.
    • A card that holds keyboard focus jumps to the front at full size, so focus is never hidden behind later cards.
    • With reduced motion the cards still stick but never shrink, tilt, or blur.

    Related components

    More markasui components with the same classes in every framework.