Type Block
A cube whose six faces are grids of characters. It turns on its own, springs after the cursor, leans as it travels, spins when dragged and scrambles its characters on a click.
pixikit.com/docs/effects/type-block
Customize
Preset
Fill
Upright
Cube size280px
Density49
Font size18px
Font weight300
Color
Accent color
Background color
Shading0.60
Depth fade0.30
Depth tint0.50
Glow0.35
Perspective700px
Rotation speed1.00
Auto rotate x0.30
Auto rotate y0.30
Breathe0.10
Breathe speed2.0
Follow speed0.08
Roll0.35
Offset x0px
Offset y0px
Draggable
Inertia1.0s
Scramble duration1.1s
Shuffle0
Opacity1.00
Interactive
Intro
Paused
Dpr2.0
Props
42| Name | Type | Default | Description |
|---|---|---|---|
preset | "classic" | "upright" | "letters" | "binary" | "matrix" | "mono" | "neon" | "dots" | None | A named look that sets several props at once. A prop you pass yourself wins over it. |
word | string | "x" | The word or character the faces are set in. |
fill | "word" | "letters" | "random" | "word" | What each cell shows: the whole word, its letters in turn, or random characters. |
charset | string | "abcdefghijklmnopqrstuvwxyz0123456789" | The characters used by random fill, the scramble and the shuffle. |
upright | boolean | false | Keeps the characters upright instead of lying on the faces. |
cubeSize | number | 280 | The edge of the cube, in pixels. |
density | number | 49 | The number of cells on each face. Rounded to a square grid. |
fontSize | number | 18 | The size of the characters, in pixels. |
fontWeight | number | 300 | The font weight. |
fontFamily | string | "inherit" | The font family. |
color | string | "currentColor" | The colour of the characters. |
accentColor | string | "#B19EEF" | The colour far faces and scrambled characters shift toward. |
backgroundColor | string | "transparent" | The colour behind the cube. |
shading | number | 0.6 | How much faces turned away from you dim. |
depthFade | number | 0.3 | How much far characters fade. |
depthTint | number | 0.5 | How much far characters take the accent colour. |
glow | number | 0.35 | The glow around near and scrambled characters. |
perspective | number | 700 | The viewing distance, in pixels. Smaller is more dramatic. |
rotationSpeed | number | 1 | The pace of the automatic rotation. |
autoRotateX | number | 0.3 | The automatic turn around the horizontal axis. |
autoRotateY | number | 0.3 | The automatic turn around the vertical axis. |
breathe | number | 0.1 | How much the cube swells and shrinks. |
breatheSpeed | number | 2 | The pace of the breathing. |
followSpeed | number | 0.08 | How quickly the cube springs after the cursor. 0 keeps it in place. |
roll | number | 0.35 | How much the cube leans as it travels. |
offsetX | number | 0 | The horizontal offset from the cursor, in pixels. |
offsetY | number | 0 | The vertical offset from the cursor, in pixels. |
draggable | boolean | true | Drag to spin the cube. A flick keeps it turning. |
inertia | number | 1 | How long a flick keeps the cube turning, in seconds. |
scrambleDuration | number | 1.1 | The length of the click scramble, in seconds. 0 turns it off. |
shuffle | number | 0 | How many characters change each second on their own. |
opacity | number | 1 | The opacity of the whole cube. |
interactive | boolean | true | Follow, drag and click. Off keeps the cube centred. |
intro | boolean | true | Plays an entrance the first time the cube is in view. |
paused | boolean | false | Freezes the cube. |
dpr | number | 2 | The highest device pixel ratio drawn. |
width | string | number | "100%" | The width of the stage. |
height | string | number | "100%" | The height of the stage. |
children | ReactNode | None | Content shown over the cube. |
className | string | None | |
style | CSSProperties | None | |
ref | Ref<TypeBlockHandle> | None | Gives scramble and spin. |