Skip to content
Cards Fancy Stable

Book

.md

3D book component with cover, spine, and back face that opens on hover

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { Book } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
	import { Book, BookHeader, BookTitle, BookDescription } from "fancy-ui-svelte";
</script>

<Book>
	<BookHeader>
		<span class="rounded bg-white/20 px-2 py-0.5 text-xs">Fiction</span>
	</BookHeader>
	<BookTitle>The Great Gatsby</BookTitle>
	<BookDescription>
		A story of the mysteriously wealthy Jay Gatsby and his love for Daisy Buchanan.
	</BookDescription>
</Book>

Examples

Basic Usage

Color Variants

Sizes

Different book sizes.

Props

PropTypeDefaultDescription
duration number1000Hover animation duration in ms
color BookColor"zinc"Color theme for the book cover gradient
isStatic booleanfalseShow book in open position without hover animation
size BookSize"md"Size variant of the book
radius BookRadius"md"Border radius variant
shadowSize BookShadowSize"lg"Drop shadow size variant

Slots

SlotDescription
children Content rendered on the book cover (front face)