Skip to content

Showcase panels

Showcase panels · sample rowOpen ↗

Renders ShowcasePanelsBlock from @bison-lab/ui. The layout is designed around three to six panels: fewer and the accordion reads as a mistake, more and each collapsed spine is unreadable. The block opens with three empty panels and the admin field will not remove below that.

A panel without a resolved image is dropped rather than rendered empty. defaultActiveIndex is clamped to the panels that survived.

payload.config.ts / collections
import { ShowcasePanelsBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:
ShowcasePanelsBlock
blocks/registry.ts
import { ShowcasePanelsBlockRenderer } from "@bison-lab/payload-blocks/react";
// In the site's registry:
showcasePanels: ShowcasePanelsBlockRenderer,
FieldTypeNotes
items *array3 to 6 rows. Opens with 3 empty rows; the admin field will not remove below that.
items[].title *text
items[].summary *textareaRevealed when the panel expands.
items[].image *uploadFrom the media collection.
items[].hreftextOptional "read more" destination for this panel.
items[].numeraltextOverrides the spine numeral ("01", "II"). Leave empty to number automatically.
spineVariantselectOne of numbered, volume, minimal. Default "numbered".
watermarktextFaint mark behind the panels, e.g. a brand word.
defaultActiveIndexnumberWhich panel is open on load, counting from 0. At least 0. Default 0.

* required.