Toggle Sidebar B
AppearanceLight & dark mode D

Pixel Transition

Pixel dissolve transition for content reveal on hover.

Default

Hover or focus the card to dissolve into the second content through a grid of pixels, on touch screens tap it instead. Grid size, duration and pixel color are wired to the controls underneath.

Light previewReplay previewOpen in new tab
Default

Psst, hover the card!

Customize

Grid Size8
Animation Duration0.4s
Pixel Color

API Reference

PixelTransition

PropTypeDefaultDescription
gridSizenumber7Number of rows/columns in the pixel grid.
pixelColorstringcurrentColorBackground color used for each pixel block.
animationStepDurationnumber0.3Length of the pixel reveal/hide in seconds.
aspectRatiostring"100%"Sets the padding-top of the container, which gives it its height.
oncebooleanfalseIf true, the transition will not revert on mouse leave or subsequent clicks.
SlotDescription
first-contentContent to show by default (e.g., an img or text).
second-contentContent revealed upon hover or click.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
TabFocuses the card, which plays the transition. Moving focus away reverts it.
  • The hidden layer is marked aria-hidden, so only the visible content is announced.