Lays a Flipbook page out as a spread, one panel filling it or two either side of the spine
Tags: flipbook magazine catalog spread layout
FlipSpread renders one page from paginate inside a Flipbook. A single panel fills the page. Two panels sit side by side, split exactly at the spine, so each half of a horizontal fold is one panel. A bookend (align) puts its one panel on that side and leaves the other half empty, the way a closed magazine shows its cover.
Import
<script>
import { FlipSpread } from '@classic-homes/flipbook-svelte';
</script>Basic Usage
<Flipbook items={pages} label="Catalog" pageAlign={(p) => p.align}>
{#snippet page(p)}
<FlipSpread panels={p.panels} align={p.align}>
{#snippet panel(item, side)}
<div class="h-full p-6" data-side={side}>{item.key}</div>
{/snippet}
</FlipSpread>
{/snippet}
</Flipbook>Props
| Prop | Type | Default | Description |
|---|---|---|---|
panels |
P[] |
required | One panel (fills the page) or two (left, right of the spine) |
panel |
Snippet<[P, 'left' | 'right' | 'full']> |
required | Renders a panel with its side |
align |
'left' | 'right' |
- | A bookend: its one panel on that side, the other half left empty |
Related
- Flipbook: the book itself,
paginateandflowPages