Scroll-driven card that splits into 3 panels and flips to reveal content.
$ npx shadcn-vue@latest add "https://nxui.geoql.in/r/scroll-split-card.json"Keep in mind
This component is inspired by various open-source projects and patterns. Please verify licenses and implementation details before using in production.
<script setup lang="ts">
import ScrollSplitCard from '~/components/ui/scroll-split-card/ScrollSplitCard.vue';
</script>
<template>
<ScrollSplitCard
image-src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1200"
start-hint="Scroll down"
end-hint="So cool, right?"
:cards="cards"
>
<template #icon-0>
<Icon name="lucide:image" class="size-8 text-white/70" />
</template>
<template #icon-1>
<Icon name="lucide:globe" class="size-8 text-white/70" />
</template>
<template #icon-2>
<Icon name="lucide:calendar" class="size-8 text-white/70" />
</template>
</ScrollSplitCard>
</template>
| Prop | Type | Default | Description |
|---|---|---|---|
imageSrc | string | — | URL of the hero image to split |
cards | ScrollSplitCardItem[] | — | Array of card content (max 3) |
startHint | string | 'Scroll down' | Text shown at scroll start |
endHint | string | 'So cool, right?' | Text shown at scroll end |
class | string | — | Additional CSS classes |
| Prop | Type | Description |
|---|---|---|
title | string | Card back-side heading |
description | string | Card back-side description text |
bgColor | string | CSS background color for back side |
textColor | string | CSS text color for back side |
| Slot | Props | Description |
|---|---|---|
icon-{i} | { index } | Icon slot for card back (i=0-2) |
The component unfolds in three scroll-driven stages:
The component uses a spring-physics smoothing on scroll progress for fluid animation.