Back to Components

Dot Text

Renders any string as free particles sampled from real font glyphs. The pointer parts nearby dots with radial and directional forces; they coast, then reform the word.

Preview

Installation

Install the component using the CLI.

terminal
npx shadcn@latest add https://www.nkcbuilds.com/r/dot-text.json

Usage

Import the component:

import
import { DotText } from "@/components/ui/dot-text"

Use it in your code:

example.tsx
<DotText text="nkcbuilds" className="min-h-[200px] w-full" />

Props

PropertyTypeDefaultDescription
text*stringText to render as dots. Use \n for multiple lines.
classNamestringWrapper classes (set min-height / width for layout).
fontFamilystringsystem sansAny loaded web font — glyphs are sampled from canvas text.
colorstringLetter color. Falls back to CSS --dot, then #a1a1aa.
brightnessnumber1Opacity scale for drawn dots (0–1).
influenceRadiusnumber20Pointer hit radius in px (~10 dots with gap 4).
interactivebooleantruePointer physics. Off when prefers-reduced-motion.
mode"text" | "field""text"text = letters only. field = ambient grid + letters.