ComponentsText effects
Haiku Reveal
Three lines written in turn by an unseen brush, stroke by stroke with the ink heavier where it presses, and a seal pressed at the end.
"use client";
import { RotateCcw } from "lucide-react";
import { useState } from "react";
import { Button } from "@/components/miyuki-ui/button";
import { HaikuReveal } from "@/components/miyuki-ui/haiku-reveal";
export default function HaikuRevealDemo() {
const [run, setRun] = useState(0);
return (
<div className="flex flex-col items-center gap-8">
<HaikuReveal
key={run}
seal="初雪"
lines={["First snow on the pass", "the bus driver turns the heat", "up without a word"]}
className="font-display text-[22px] leading-[1.55] font-semibold tracking-[-0.015em] sm:text-[36px]"
/>
<Button variant="ghost" size="sm" iconStart={<RotateCcw />} onPress={() => setRun((n) => n + 1)}>
Read again
</Button>
</div>
);
}Install
npx shadcn@latest add @miyuki-ui/haiku-revealThis needs the @miyuki-ui registry in your components.json. See Using the shadcn CLI.
Props
HaikuReveal
Prop
Type
Frost Text
Letters that freeze into being: fine branching crystals grow along each outline from a few seeds, then the face fills with sparkling frost.
Ice Crack Text
Lettering made of ice that cracks in branching lines under the pointer and shatters into angular shards that hang, then draw back together.