Skip to content

GhostWord

An oversized outlined word that fills with accent when hovered — built for footers and chapter markers.

Live — this one is real

Hover the word — it fills

Usage

tsx
import { GhostWord } from "mizu-ui";

export function Footer() {
  return <GhostWord text="MIZU." />;
}

Source & setup

Add this component to your project with the shadcn CLI. The command copies its source into your configured UI directory, with its source module’s stylesheet and base.css, Mizu’s tokens. In a project without a components.json, run npx shadcn@latest init 0xuser64bit/mizu/preset first: plain init installs shadcn’s theme into your global CSS. Then load the fonts.

sh
npx shadcn@latest add 0xuser64bit/mizu/ghost-word

Every component imports from its own path, its name in kebab case.

tsx
import { GhostWord } from "@/components/ui/mizu/ghost-word";

For npm imports, import mizu-ui/styles.css once. Fonts are optional via mizu-ui/fonts.css. Override --mizu-* tokens or use className for local styling. Uses native React and CSS; install the package peers for root imports. A Server Component: it renders on the server, with no client JavaScript of its own.

Inspect type/GhostWord.tsx

Source is included in the npm package under src/type/GhostWord.tsx.

Open full source ↗

Props

PropTypeDefaultDescription
textstring—The word.
fill"accent" | "paper""accent"Hover fill color.

Accessibility

aria-hidden — pair with an sr-only heading for the same text.

Motion

500ms fill and stroke-color transition with expo letter-spacing settle.

Works alongside