Levitating Plan Cards
Three plan slabs that lift off a lit floor as the section arrives, each over its own soft shadow; the featured one rises highest and the pointer raises any slab higher.
DOM + CSS0 deps1 file · 19 KB TSXreduced-motion aware
Props
"use client";
import { useEffect, useRef, useState } from "react";
import type { CSSProperties, RefObject } from "react";
/**
* LevitatingPlanCards — three plan slabs that lift off a lit floor, each over its own shadow.
*
* As the section arrives the slabs leave the floor in order and settle at
* different heights (the featured one highest), so they rise instead of
* landing. Each slab's shadow on its spot of floor light is its own
* element: blur, size, opacity and offset follow the slab's height, from a
* crisp contact shadow on the floor to a wide soft one in the air. Settled,
* each slab breathes on its own period; the pointer raises a slab 14px more
* and tilts it toward the pointer, and its shadow answers. Prices and
* lines are props, and every link goes through a safe-href check. On a
* phone the slabs stack with the featured one first. mode "auto" lifts and
* settles on a loop for previews; progress holds one moment; reduced
// ---------------------------------------------------------------
// Full source available with a viberdy Pro subscription.
// https://viberdy.dev/pricing
// ---------------------------------------------------------------
}Details
About this section
Pricing cards usually land. These leave. As the section comes into view the three plan slabs rise off a lit floor one after another and settle at different heights, the featured plan highest, each above its own spot of light and its own shadow. The shadows do the work: on the floor they are crisp contact lines, in the air they spread, soften and fade. Settled, each slab breathes on its own slow period. Move the pointer over one and it rises further and tilts toward you, and its shadow answers. On a phone the slabs stack with the featured plan first.
Curator’s note
Pro: every slab's shadow is its own element whose blur, size, opacity and offset are derived from the slab's height each frame, so the rise reads physically, from a crisp contact shadow on the floor to a wide soft one in the air. The lift follows the scroll through an eased chase, with springs for the pointer, all written through refs. Cut byte for byte from the Attention kit's one site (AttentionSite), so it reads as one system with the kit's rooms: one subject, one motivated light, one broken rule.


