Swarm Sort
A cloud of small squares that flies into labelled groups on hover, on scroll or on cue.
pixikit.com/docs/effects/swarm-sort
Customize
Trigger
Sorted
Square size12px
Gap5px
Duration850ms
Seed7
Emphasize first
Width640px
Height240px
Props
11| Name | Type | Default | Description |
|---|---|---|---|
groups | (string | SwarmSortGroup)[] | ["Now", "Soon", "Plan", "Later"] | The groups the squares sort into, left to right. A plain label takes its count and colour by position. |
trigger | "hover" | "view" | "manual" | "hover" | What sorts the cloud: hovering or focusing it, scrolling it into view, or the `sorted` prop. |
sorted | boolean | false | Sorted or not, when the trigger is manual. |
squareSize | number | 12 | Each square's size in pixels. |
gap | number | 5 | The space between squares in pixels. |
duration | number | 850 | How long the squares take to fly, in ms. |
seed | number | 7 | Shuffles the cloud; the same seed gives the same cloud. |
emphasizeFirst | boolean | true | The first group's squares are drawn larger, to stand out. |
width | number | 640 | The widest it grows, in pixels; it never overflows a narrower container. |
height | number | 240 | Its minimum height in pixels; the squares sit centred in it. |
className | string | None |