Skip to content
PixiKit

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
NameTypeDefaultDescription
preset"glass" | "prism" | "ember" | "serif" | "crystal"NoneA named look that sets several props at once. A prop you pass yourself wins over it.
textstring"Shatter"The headline.
fontFamilystring""The font family. Follows the surrounding text when empty.
fontWeightnumber700The font weight.
fontSizenumber0The font size in pixels. 0 sizes the text to the page.
letterSpacingnumber-0.02The letter spacing, in em.
lineHeightnumber1.05The 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.
accentColorstring"#7B5CFF"The colour of the back of a shard as it tumbles.
shardSizenumber0.09The size of a shard, relative to the font size.
irregularitynumber0.6How uneven the shards are, 0 to 1.
cracknumber0.6The strength of the hairline cracks that open under the cursor, 0 to 1.
crackRadiusnumber0.5The reach of the cracks around the cursor, in em.
healnumber0.9How long cracks take to close, in seconds.
shatterbooleantrueA click or tap shatters the letters it hits.
shatterRadiusnumber0.55The size of the shattered area, in em. Glass just outside it cracks without breaking.
forcenumber1How hard the shards are thrown.
spinnumber1How much the shards tumble.
depthnumber1How far the shards fly toward and away from you.
gravitynumber0How strongly the shards fall.
reassemblenumber1.1How long the shards take to come back, in seconds.
stiffnessnumber0.55How firmly returning shards lock into place, 0 to 1.
glintnumber0.8The flash of light on tumbling and cracked shards.
intro"assemble" | "drop" | "fade" | "none""assemble"The entrance the first time the headline is in view.
introDurationnumber1.6The length of the entrance, in seconds.
autoplaybooleanfalseShatters a random spot every few seconds while the pointer is away.
autoplayIntervalnumber4The time between automatic shatters, in seconds.
interactivebooleantrueResponds to the pointer.
pausedbooleanfalseFreezes the glass.
qualitynumber1The drawing resolution, 0.5 to 1.
refRef<ShardTypeHandle>NoneGives shatter and assemble.
childrenReactNodeNoneContent shown over the headline.
classNamestringNone
styleCSSPropertiesNone

Related