[ 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 />
| Prop | Type | Default | Description |
|---|---|---|---|
dot | number | 4 | Grid pitch in px; dots scale with it. |
color | string | - | Text color. |
glow | boolean | false | Soft glow in the text color. |
as | string | 'span' | Element to render. |
dot4numberGrid pitch in px; dots scale with it.
color-stringText color.
glowfalsebooleanSoft glow in the text color.
as'span'stringElement to render.
Accessibility#
- The text stays real text, so it is read and selected normally.