Logo
Renders static text or caller-provided ASCII art without loading figlet from the default component export.
Installation
dgadd is not public on npm yet. Until the first release, pack @diffgazer/add from the repository and install that tarball into this app, which is what puts dgadd on pnpm exec.
The hosted registry is not public yet because r.b4r7.dev does not resolve. Use this source checkout or a local registry preview until the endpoint returns 200.
Diffgazer packages are not yet published to npm. Until the first release, pack @diffgazer/ui and @diffgazer/keys from the repository and install those tarballs.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS once packages are available.
The base Logo item stays figlet-free. Package consumers can import the
optional helper from @diffgazer/ui/components/logo/figlet. Copy, dgadd,
and direct registry consumers install the separate ui/logo-figlet item
(dgadd add ui/logo-figlet) to get the helper source.
Usage
Figlet integration
The optional getFigletText helper generates ASCII art at runtime using the
figlet library. It is available at
@diffgazer/ui/components/logo/figlet in package mode. Copy, dgadd, and
direct registry consumers add ui/logo-figlet and import from the copied
@/components/ui/logo/figlet module. The helper supports two fonts: "Big"
and "Small".
figlet is an optional peer dependency. Install it with
npm install figlet @types/figlet before using getFigletText.
ASCII art has a fixed column count, so it does not reflow. Scale the font size
from the container width instead of setting a fixed text-* class — for
example clamp(), a container query, or the measured container width divided by
the art's column count. Logo clips accidental overflow inside itself
(max-w-full overflow-hidden) so it never scrolls the page horizontally.
Examples
ASCII Text
Styled
Figlet Integration
API Reference
Logo
Accessibility
Notes
ASCII Text
Precompute ASCII art and pass it through asciiText. The Logo component itself never imports figlet, so consumers stay in control of the ASCII source.
Optional figlet helper
The Logo component stays figlet-free by default. Package consumers can import the optional helper from @diffgazer/ui/components/logo/figlet. Copy, dgadd, and direct registry consumers can add the separate ui/logo-figlet item; it installs the helper source and declares figlet as an optional runtime dependency.
Sizing
ASCII output can be large. Use small text sizes (text-[6px] to text-2xs) and responsive sizing to fit it in your layout.
Source
Install via CLI: pnpm exec dgadd add ui/logo.
Highlighted source loads after this disclosure opens. Browse the source repository.