0Views
0Copies

API Reference
Props for <ASCIIDonut />
| Prop | Type | Default | Description |
|---|---|---|---|
| backgroundColor | string | "#080808" | The surface behind the donut; a transparent color lets your own background show. |
| color | string | "#6b7bff" | The characters. |
| accentColor | string | "#ff6a1f" | The characters in the brightest light. |
| Prop | Type | Default | Description |
|---|---|---|---|
| word | string | "NORA" | Spelled left to right across the bright areas; empty repeats the last of the characters there. |
| characters | string | ":-+*oö@W" | One character per step of brightness below the word, faint to dense. |
| font | FontValue | {"fontFamily":"JetBrains Mono","fontWeight":500} | The characters' typeface; a monospaced one keeps the columns even. Load it in your own app. |
| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | 85 | Outer diameter, as a share of the shorter side; past about 95% the turning donut meets the edges. |
| thickness | number | 0.42 | How thick the donut is, from a thin hoop to a hole almost closed; its outer diameter stays the same. |
| characterSize | number | 11 | Height of a character; boxes under 440px draw them smaller, down to 73% of it. |
| speed | number | 0.1 | How fast it turns on its own; 0 is still, negative turns backwards. |
| follow | number | 2.5 | How far it turns with the pointer anywhere in the window; 0 ignores it. |
| angle | number | 0 | Where the turn starts; 0 faces the viewer. |
| lightAngle | number | 45 | Where the light comes from, counter-clockwise from the right. |
| buildDuration | number | 1250 | How long it takes to assemble out of random characters when it first comes into view; 0 skips it. |
| Prop | Type | Default | Description |
|---|---|---|---|
| accentThreshold | number | 0.6 | Brightness above which a character takes the highlight color; lower means more of it. |
| wordSteps | number | 5 | How many of the brightest steps spell the word; more spreads it further. |
| minOpacity | number | 0.5 | Opacity of the faintest characters. |
Motion score
Compositor-only
- Category
- 3D Elements
- Framework
- React
- Published
- Nov 27, 2026
- Dependencies
- Variants
ASCII Donut: a spinning ASCII donut for React
A 3D donut drawn entirely in text characters on a dark background, shaded in blue with flashes of orange. It's the classic spinning ASCII donut, rebuilt as a React component.
Use ASCII Donut as a playful centerpiece for a developer tool, a terminal product or a retro-styled page. It's a Pro React component for Next.js, Vite and Astro with Tailwind CSS v4. More in this category.
What is ASCII Donut?#
ASCII Donut is a React take on the spinning ASCII donut, the famous 3D torus drawn with nothing but text characters. Lighter and darker characters stand in for light and shadow, so a flat grid of letters reads as a solid, turning 3D shape.
How ASCII Donut works#
The donut is made of characters arranged on a grid, with each character chosen by how much light falls on that point of the shape. Blue characters shape the body of the ring, and orange ones pick out the highlights as it turns, so it reads as a real 3D object.
Customization options#
Change the character colors and the background in the Customize panel, save a look as a variant, then install. The source is yours after install, so you can edit the character set or shading in code.
Use cases#
- Developer tools and terminals, where text-based art fits the product.
- 404 and easter-egg pages that reward curious visitors.
- Hero sections for brands with a retro computing feel.
FAQs#
It's a famous piece of code art: a 3D donut drawn and spun using only text characters, first shared as a short C program called donut.c. ASCII Donut brings that effect to React.
Yes. Change the character and background colors in the Customize panel before you install, or edit them in the source.
No. It's a Pro component, included in every paid plan. Anything you install stays yours after a plan ends.
React in Next.js, Vite and Astro, styled with Tailwind CSS v4. In a JavaScript project, the CLI converts it to
.jsx as it installs.