Shard Type
A headline cut into glass shards. They fly together on entrance, hairline cracks open under the cursor, a click bursts the letters it hits into tumbling pieces, and the pieces fly back and lock into place.
pixikit.com/docs/effects/shard-type
Customize
Preset
Font weight700
Font size0px
Letter spacing-0.02em
Line height1.05
Align
Colors2 of 10
Accent color
Shard size0.090
Irregularity0.60
Crack0.60
Crack radius0.50em
Heal0.90s
Shatter
Shatter radius0.55em
Force1.00
Spin1.00
Depth1.00
Gravity0.00
Reassemble1.10s
Stiffness0.55
Glint0.80
Intro
Intro duration1.6s
Autoplay
Autoplay interval4.0s
Interactive
Paused
Quality1.00
Props
35| Name | Type | Default | Description |
|---|---|---|---|
preset | "glass" | "prism" | "ember" | "serif" | "crystal" | None | A named look that sets several props at once. A prop you pass yourself wins over it. |
text | string | "Shatter" | The headline. |
fontFamily | string | "" | The font family. Follows the surrounding text when empty. |
fontWeight | number | 700 | The font weight. |
fontSize | number | 0 | The font size in pixels. 0 sizes the text to the page. |
letterSpacing | number | -0.02 | The letter spacing, in em. |
lineHeight | number | 1.05 | The line height. |
align | "left" | "center" | "right" | "center" | How the text aligns in its box. |
colors | [string, string] | ["currentColor", "currentColor"] | Two colours the face of the glass runs between, left to right. |
accentColor | string | "#7B5CFF" | The colour of the back of a shard as it tumbles. |
shardSize | number | 0.09 | The size of a shard, relative to the font size. |
irregularity | number | 0.6 | How uneven the shards are, 0 to 1. |
crack | number | 0.6 | The strength of the hairline cracks that open under the cursor, 0 to 1. |
crackRadius | number | 0.5 | The reach of the cracks around the cursor, in em. |
heal | number | 0.9 | How long cracks take to close, in seconds. |
shatter | boolean | true | A click or tap shatters the letters it hits. |
shatterRadius | number | 0.55 | The size of the shattered area, in em. Glass just outside it cracks without breaking. |
force | number | 1 | How hard the shards are thrown. |
spin | number | 1 | How much the shards tumble. |
depth | number | 1 | How far the shards fly toward and away from you. |
gravity | number | 0 | How strongly the shards fall. |
reassemble | number | 1.1 | How long the shards take to come back, in seconds. |
stiffness | number | 0.55 | How firmly returning shards lock into place, 0 to 1. |
glint | number | 0.8 | The flash of light on tumbling and cracked shards. |
intro | "assemble" | "drop" | "fade" | "none" | "assemble" | The entrance the first time the headline is in view. |
introDuration | number | 1.6 | The length of the entrance, in seconds. |
autoplay | boolean | false | Shatters a random spot every few seconds while the pointer is away. |
autoplayInterval | number | 4 | The time between automatic shatters, in seconds. |
interactive | boolean | true | Responds to the pointer. |
paused | boolean | false | Freezes the glass. |
quality | number | 1 | The drawing resolution, 0.5 to 1. |
ref | Ref<ShardTypeHandle> | None | Gives shatter and assemble. |
children | ReactNode | None | Content shown over the headline. |
className | string | None | |
style | CSSProperties | None |