Getting Started
Scroll Animations
Text Animations
Hover & Cursor
Sliders & Carousels
Galleries & Grids
Menus & Navigation
Preloaders & Intros
Page Transitions
3D & WebGL
import { ShrinkPageMenu } from "@/registry/tween/shrink-page-menu"
export function ShrinkPageMenuDemo() {
return (
<div className="w-full">
<ShrinkPageMenu />
</div>
)
}
import { ShrinkPageMenu } from "@/components/ui/shrink-page-menu"<ShrinkPageMenu
logo="Ostrand Yard"
links={[{ label: "Hulls" }, { label: "Refits" }, { label: "Charter" }]}
secondaryLinks={[{ label: "Visit" }, { label: "Privacy" }]}
content={[
{
type: "text",
text: "Every hull starts on the loft floor, drawn in chalk.",
},
{
type: "image",
src: "https://images.unsplash.com/photo-1567703956367-a0ec1fcb883e?q=80&w=1920&h=1080&fit=crop&crop=center&auto=format",
alt: "Varnished planking along a wooden hull",
},
]}
/>clip-path from the full rectangle to a single point at the centre while it scales to 0.5, so the page collapses inward.z: 350 inside a perspective: 1000px parent, blurred and transparent. It moves back to z: 0, un-blurs and fades in, starting 0.2s after the page begins to shrink.prefers-reduced-motion: reduce the menu jumps straight open or closed and the hover roll is off.| Prop | Type | Default | Description |
|---|---|---|---|
logo | string | "Ostrand Yard" | Wordmark top-left. |
links | ShrinkPageMenuLink[] | 3 links | Large serif links. Each is { label, href? }. |
secondaryLinks | ShrinkPageMenuLink[] | 3 links | Small serif links under the main ones. |
footer | object | default texts | { left?, centerCaption?, centerMark?, right? }. |
content | ShrinkPageMenuBlock[] | 4 texts, 2 images | Page blocks: { type: "text", text } or { type: "image", src, alt? }. |
menuColor | string | "#102a3c" | Menu background color. |
pageColor | string | "#12100e" | Page background color. |
className | string | — | Extra classes on the outer container. |