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.
Same class names in Blade and React, so our Laravel pages and the React app finally match.
Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
Finally a component library our designers and engineers both enjoy opening on Monday.
1 of 4
We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
Same class names in Blade and React, so our Laravel pages and the React app finally match.
Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
Finally a component library our designers and engineers both enjoy opening on Monday.
1 of 4
We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
Same class names in Blade and React, so our Laravel pages and the React app finally match.
Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
Finally a component library our designers and engineers both enjoy opening on Monday.
1 of 4
We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
Same class names in Blade and React, so our Laravel pages and the React app finally match.
Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
Finally a component library our designers and engineers both enjoy opening on Monday.
1 of 4
We replaced three internal UI kits with MarkasUI. New hires ship their first screen in an afternoon.
Same class names in Blade and React, so our Laravel pages and the React app finally match.
Copy, paste, adjust the tokens. Setup took ten minutes and the docs answered the rest.
Finally a component library our designers and engineers both enjoy opening on Monday.
1 of 4
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.
Tip 2
Drag to reorder
Grab a task by its handle and drop it where it belongs.
Tip 3
Mention with @
Type @ and a name to notify a teammate right inside a comment.
Tip 4
Star what matters
Starred projects stay pinned at the top of your sidebar.
Tip 1 of 4
Tip 1
Press K to search
Jump to any page, project, or teammate without touching the mouse.
Tip 2
Drag to reorder
Grab a task by its handle and drop it where it belongs.
Tip 3
Mention with @
Type @ and a name to notify a teammate right inside a comment.
Tip 4
Star what matters
Starred projects stay pinned at the top of your sidebar.
Tip 1 of 4
Tip 1
Press K to search
Jump to any page, project, or teammate without touching the mouse.
Tip 2
Drag to reorder
Grab a task by its handle and drop it where it belongs.
Tip 3
Mention with @
Type @ and a name to notify a teammate right inside a comment.
Tip 4
Star what matters
Starred projects stay pinned at the top of your sidebar.
Tip 1 of 4
Tip 1
Press K to search
Jump to any page, project, or teammate without touching the mouse.
Tip 2
Drag to reorder
Grab a task by its handle and drop it where it belongs.
Tip 3
Mention with @
Type @ and a name to notify a teammate right inside a comment.
Tip 4
Star what matters
Starred projects stay pinned at the top of your sidebar.
Tip 1 of 4
Tip 1
Press K to search
Jump to any page, project, or teammate without touching the mouse.
Tip 2
Drag to reorder
Grab a task by its handle and drop it where it belongs.
Tip 3
Mention with @
Type @ and a name to notify a teammate right inside a comment.
Tip 4
Star what matters
Starred projects stay pinned at the top of your sidebar.
Tip 1 of 4
Installation
npx markasui@latest add card-stackpnpm dlx markasui@latest add card-stackyarn dlx markasui@latest add card-stackbunx --bun markasui@latest add card-stack- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Install the dependency:
npm install alpinejs - Copy the component source below to
resources/views/components/markas/card-stack.blade.php.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/CardStack.tsx.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/CardStack.vue.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/lib/components/markas/CardStack.svelte.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/CardStack.astro.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/app/markas/card-stack.component.ts.
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.
cardLabelaccepts{index}and{total}, for exampleTip {index} of {total}.- With reduced motion the cards swap instantly.
Props
| Name | Type | Default | Description |
|---|---|---|---|
cards | Blade: 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. |
label | string | Card stack | Accessible name of the stack region. Describe the content, for example Customer testimonials. |
prevLabel | string | Previous card | Accessible name of the previous button. |
nextLabel | string | Next card | Accessible name of the next button. |
cardLabel | string | {index} of {total} | Name of each card and the position text announced after every move. Accepts {index} and {total}. |
id | string | auto | Id of the region. The card list gets the same id with a -cards suffix. |
items | T[] | - | 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.
- Bottom NavigationMobile app style bottom bar. A pill glides to the selected item, its label rises in, and the bar can shrink to icons while content scrolls.
- Chat MessageMessage in an AI conversation. User bubbles on the right, assistant replies with an avatar, hover actions, a typing indicator, and optional token streaming.
- Currency InputMoney field that formats as you type (Rp 12.500.000), keeps the caret in place, and posts the plain number. Optional quick amount chips.
- DockmacOS style dock. Icons grow smoothly toward the pointer or focus, show a label above, mark open items with a dot, and bounce on launch.
- Drag ElementsArea of cards or stickers you can drag around with light momentum, kept inside its bounds. Arrow keys move a focused item, Escape puts it back.
- Dynamic IslandBlack pill inspired by the iPhone Dynamic Island. It morphs smoothly between idle, compact, and expanded states while its content crossfades.