Unify Logo Footer.svg
Unify Applications
Logo
Flippable Card

Flippable Card

Logo

4 mins READ

Overview

The FlippableCard block is a two-face container: a front slot and a back slot, each of which can contain any combination of nested blocks (text, images, buttons, forms, charts). Only one face is visible at a time. When flipped, the card rotates on a configurable axis with a CSS 3D perspective animation.

Flippable Card is well-suited for interactions where you want to reveal additional content on demand without navigating away — flashcard learning, product detail reveals, price/plan comparison toggles, and interactive data explorations.

Properties Reference

PropertyTypeDefaultDescription
flipAxisenum: horizontal | verticalhorizontalThe axis of the flip rotation. Horizontal: flips left-to-right (like turning a book page). Vertical: flips top-to-bottom (like flipping a page upward).
flipDurationnumber (ms)400Duration of the flip animation in milliseconds. Increase for a dramatic slow flip; decrease for a snappy toggle. 200–600ms is the usable range; values above 800ms feel sluggish.
flipTriggerenum: onClick | onHover | programmaticonClickWhat user interaction triggers the flip. onClick: flips on tap/click anywhere on the card. onHover: flips on mouse enter; flips back on mouse leave. programmatic: card only flips via the Control Block action — no built-in user trigger.
defaultFaceenum: front | backfrontWhich face is visible on initial render.
frontSlotslot (nested blocks)Container for the front face content. Drop any blocks inside — images, text, icons, buttons, etc.
backSlotslot (nested blocks)Container for the back face content. Can be a completely different layout from the front face.
equalHeightbooleantrueWhen true, the card height is the taller of the two faces. When false, the card resizes when flipping if the two faces have different heights — can cause layout shift.
perspectivenumber (px)1000CSS perspective depth in pixels. Lower values (e.g. 400) create a more dramatic 3D effect; higher values (e.g. 2000) flatten the perspective.
onFlipaction chainFires each time the card flips. Event payload: { face: "front" | "back" } — the face now visible after the flip.

Programmatic Flip

When flipTrigger = programmatic (or even alongside an existing trigger), flip the card from any action chain using the Control Block action:

  1. Add a Control Block action to any event chain

  2. Set Block ID to the Flippable Card's ID

  3. Set Operation to flip

The flip operation toggles to whichever face is not currently shown. To force a specific face, use showFront or showBack operations instead.

Tip: Place a "Go back" button inside the back slot and wire its onClick to a Control Block action targeting the same Flippable Card with operation flip. This gives users an explicit navigation control on the back face — important for accessibility when flipTrigger = programmatic and there is no other user gesture.

Exposed State

BindingTypeDescription
{{ id.currentFace }}string"front" or "back" — the currently visible face.
{{ id.isFlipped }}booleantrue when the back face is showing. Alias for currentFace === "back".

Setting Up a Flashcard

  1. Drop the block: Drag FlippableCard onto the canvas. Set Flip Trigger = onClick and Flip Duration = 400ms.

  2. Design the front face: Click into the Front Slot in the canvas. Add a Typography block with the question text bound to a Repeatable's current item: {{ item.question }}. Add a small "Tap to reveal" hint text in a muted style at the bottom.

  3. Design the back face: Click into the Back Slot. Add a Typography block with {{ item.answer }}. Add a Tag block showing the difficulty level. Add a Button labeled "Next card" with an action that advances the Repeatable index.

  4. Wrap in a Repeatable: Place the FlippableCard inside a Repeatable bound to a flashcard data source. Each card iteration binds to a different question/answer pair. Reset defaultFace = front so each card starts showing the question when the Repeatable iterates.

Examples

Example: Product detail reveal

Front face: product image, name, and price. Back face: full description, specifications table, and "Add to cart" button. Set Flip Trigger = onClick. The flip reveals product detail without a page navigation — keeping the user in context of the product grid.

Example: Pricing plan toggle

Front face: monthly pricing. Back face: annual pricing with savings callout. Use a toggle button outside the card that fires a Control Block action with operation: flip on the card. Set flipTrigger = programmatic so only the external toggle controls it. Bind the toggle label to {{ card.isFlipped ? "View Monthly" : "View Annual" }}.

PageRelationship
Drawer & ModalAlternative to the flip for revealing detail content — use when the detail is larger than a card
StoriesSequential reveal pattern — use for step-by-step content rather than two-face toggle
RepeatableWrap FlippableCard in a Repeatable to create a deck of flashcards