Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Stacking Cards

    Kartu yang menempel dan menumpuk saat discroll, sementara kartu yang tertutup mengecil, menyebar, atau buram. Kartu dengan fokus keyboard kembali ke depan.

    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.",
        },
      ];
    }

    Contoh

    Langkah onboarding yang menyebar

    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.

  • Paket harga Rupiah dengan efek buram

    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

    Testimoni dari tim Indonesia

    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

    Instalasi

    npx markasui@latest add stacking-cards

    Pemakaian

    <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">Rencanakan minggumu</article>
            <article class="h-64 rounded-xl border border-line bg-surface p-6">Bagikan ke tim</article>
            <article class="h-64 rounded-xl border border-line bg-surface p-6">Dibayar tepat waktu</article>
        </x-markas.stacking-cards>
    </div>

    Butuh 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">
          Rencanakan minggumu
        </article>
        <article className="h-64 rounded-xl border border-line bg-surface p-6">
          Bagikan ke tim
        </article>
        <article className="h-64 rounded-xl border border-line bg-surface p-6">
          Dibayar tepat waktu
        </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">
            Rencanakan minggumu
          </article>
          <article class="h-64 rounded-xl border border-line bg-surface p-6">
            Bagikan ke tim
          </article>
          <article class="h-64 rounded-xl border border-line bg-surface p-6">
            Dibayar tepat waktu
          </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>

    Satu script kecil yang dibundel mengukur setiap tumpukan lewat elemen markas-stacking-cards.

    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 {}
    • Setiap anak langsung adalah kartu. Kartu menempel di top ditambah offset per kartu, sehingga kartu sebelumnya terlihat di atas kartu berikutnya.
    • --stack-depth pada tiap kartu menyatakan seberapa jauh kartu berikutnya sudah menutupinya. scale mengecil dan meredup, fan miring kiri dan kanan, blur buram dan meredup.
    • Listener scroll bersifat pasif, digabung dalam satu requestAnimationFrame, dan hanya terpasang selama tumpukan terlihat. Bekerja di halaman maupun di dalam kontainer scroll mana pun.
    • Kartu yang memegang fokus keyboard melompat ke depan dalam ukuran penuh. Dengan reduced motion kartu tetap menempel tetapi tidak berubah. Atribut dan class jatuh ke tumpukan.

    Props

    NamaTipeDefaultKeterangan
    variant"scale" | "fan" | "blur""scale"Apa yang terjadi pada kartu yang tertutup. scale: mengecil dan meredup. fan: miring kiri dan kanan seperti tumpukan kartu. blur: buram dan meredup.
    topnumber16Posisi sticky kartu pertama dalam px, diukur dari atas area scroll.
    offsetnumber16Tambahan px tiap kartu berikutnya menempel di bawah kartu sebelumnya, sehingga tepi kartu sebelumnya terlihat. 0 menumpuk tepat.
    children / slotReactNode / slot-Kartu-kartunya. Setiap anak langsung adalah satu kartu; beri masing-masing latar sendiri agar menutupi kartu di bawahnya.

    Aksesibilitas

    • Kartu tetap dalam urutan baca normal; tumpukan hanya visual.
    • Kartu yang memegang fokus keyboard melompat ke depan dalam ukuran penuh, sehingga fokus tidak pernah tersembunyi di balik kartu berikutnya.
    • Dengan reduced motion kartu tetap menempel tetapi tidak mengecil, miring, atau buram.

    Komponen terkait

    Komponen markasui lain dengan class yang sama di setiap framework.