Skip to main content

Flip Box

A card with two faces that flips on hover or click — a feature on the front, the detail on the back.

The block renders through the flip_box element — the same PHP that runs in the page builder, so the front end is identical either way.

What the sidebar exposes

OptionWhat it does
front_iconIcon on the front face
front_titleFront heading
front_title_tagIts heading level
front_textFront body copy
front_button_labelA label on the front, if you want one
back_iconIcon on the back face
back_titleBack heading
back_title_tagIts heading level
back_textBack body copy
button_labelButton on the back
button_urlWhere it goes
button_targetOpen in a new tab
design_settingsDesign family, and the settings it needs
flip_directionWhich way it turns
triggerHover or click
parallaxSlight parallax as it turns
flip_speedHow fast
flip_easingThe easing curve
heightCard height
roundedCorner rounding
box_styleBox / border preset
icon_badge_presetBadge behind an icon
front_bg / back_bgFace backgrounds
front_image / back_imageFace background images
front_color / back_colorFace text colours
button_styleButton preset
button_sizeButton size
font_size_presetText size preset

Anything not listed stays available in the page builder, and round-trips untouched.

caution
Set height — both faces share one box

The card is a single box showing one face at a time, so it is as tall as its longer face. Leave the height unset and a short front sits in a card sized by the back, with a gap under the text that appears for no visible reason.

The canvas shows the front, and does not flip

With trigger set to hover, a live preview would flip every time the pointer crossed the block on its way to something else — and the back would be showing exactly when you clicked to select it.

Both faces are edited in the sidebar regardless of which one the canvas shows.

note
design_settings is a popover

It is a popover: its inner options are rendered inline here rather than in a floating panel, and stored exactly as the page builder stores them.

Margin and padding come from Gutenberg

The block declares core spacing support, so use the Dimensions panel at the top of the sidebar.