Big Bang Grid
A grid that changes with a bang. When you filter it, the cards that leave fall into an unseen hole in its middle, the new ones burst out of it to their places, and the cards that stay slide over. Every card stays a real element, so links, focus and screen readers work as usual.

Included with membership
Members install Big Bang Grid with one command and get the full source, the usage code and the Framer remix, licensed for client work. One membership covers the whole library and the CLI.
When to use it
Any grid people filter, sort or page through: a work index, a shop's products, a team page, search results. It wraps the grid you already have, so the cards keep their own markup and styles.
- Give every card a key of its own, such as its id. The key is how the grid tells a card that stays from one that leaves.
- Lay the grid out with className, as a CSS grid or a wrapping flex row. The cards keep whatever layout you give them.
- Give images in the cards a size, with a width and an aspect ratio, so each card has its final size before its image loads.
- Serve card images at about the size they are shown. Every card that bursts out is drawn afresh, and full-size photos make that slow on a phone.
Avoid:
- Do not use the array index as the key. Every card would seem to stay, so none would fall in or burst out.
- Do not put a transform or a transition on itemClassName. The grid moves that box with transform and opacity while the cards change.
Props
A grid that changes with a bang. When the cards in it change, the ones that leave fall into an unseen hole, spiralling in as they go, and the new ones burst out of it, fly past their places and settle. Cards that stay slide over to their new cells. The hole sits in the middle of the part of the grid on screen, so the whole change happens in view.
<BigBangGrid />
The grid. Each card is wrapped in a box, and only those boxes move, only while the cards change.
| Prop | Type | Default | Description |
|---|---|---|---|
children* | React.ReactNode | — | The cards, each with its own key. Pass a different set to filter the grid. |
className | string | — | On the grid itself: set its columns and gaps here, as a CSS grid or flex row. |
style | React.CSSProperties | — | Inline styles on the grid. |
itemClassName | string | — | On the box round each card, which is what sits in each cell. |