logo

Aki UI

アキ ウイ

Matrix Text

マトリックステキスト

A wave that runs left to right along a string, knocking each character into a random binary digit and letting it fall back a moment later. Every character owns two absolute timers — one to drop, one to land — rather than a single chained timeout, so a long string does not accumulate drift as it goes. Each cell is fixed at 1ch↗↗ wide with tabular figures, which is what stops the line jittering as letters swap for digits. Hovering runs the sweep again. Adapted from Kokonut UI↗↗ under the MIT licence.

HelloWorld
wake up neo

Installation

Copy and paste the following code into a new component file:1

"use client"

/**
* Adapted for Aki UI from Kokonut UI's Matrix Text.
* Original author: @dorianbaffier — https://kokonutui.com
* Copyright (c) 2025 kokonutUI, MIT License.
* https://github.com/kokonut-labs/kokonutui
*
* Reworked here onto the local palette, with shadcn primitives and
* class-variance-authority removed and motion/react swapped for framer-motion.

How to use it2

"use client"

import { MatrixText } from "@/components/ui/matrix-text"

export default function Page() {
return (
<MatrixText text="HelloWorld" stagger={100} scrambleDuration={500} />
)
}

Props

MatrixText

NameDefaultDescription
text—

string

The string the sweep resolves to

startDelay200

number

Milliseconds before the first character drops

scrambleDuration500

number

Milliseconds a character stays scrambled

stagger100

number

Milliseconds between one character and the next

replayOnHovertrue

boolean

Run the sweep again on pointer enter

darkfalse

boolean

Render the dark palette