[ Effects ]

DotText

Cuts text into a grid of round dots, like an airport board or LED display. Pure CSS mask, so any font and color work.

1 examplesDark modeAccessible

Import#

import { DotText } from 'reusify-ui';

When to use#

  • Big display text in widgets and heroes: codes, scores, countdowns. Use bold, large text; small text loses legibility.

Examples#

Basic#

YYZ → HND12:45
<DotText dot={4} style={{ fontSize: 56 }}>YYZ → HND</DotText>
<DotText dot={3} color="#a3e635" glow style={{ fontSize: 40 }}>12:45</DotText>

Used in designs#

DotText in real layouts: this design uses it. Open one to try it and copy the code.

API reference#

<DotText />

dot4
number

Grid pitch in px; dots scale with it.

color-
string

Text color.

glowfalse
boolean

Soft glow in the text color.

as'span'
string

Element to render.

Accessibility#

  • The text stays real text, so it is read and selected normally.