Skip to content
PixiKit

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
NameTypeDefaultDescription
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.
sortedbooleanfalseSorted or not, when the trigger is manual.
squareSizenumber12Each square's size in pixels.
gapnumber5The space between squares in pixels.
durationnumber850How long the squares take to fly, in ms.
seednumber7Shuffles the cloud; the same seed gives the same cloud.
emphasizeFirstbooleantrueThe first group's squares are drawn larger, to stand out.
widthnumber640The widest it grows, in pixels; it never overflows a narrower container.
heightnumber240Its minimum height in pixels; the squares sit centred in it.
classNamestringNone

Related