awwwards-nav
vengenceui/awwwards-navFreeComponent
vengenceui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by vengenceui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.vengenceui.com/r/awwwards-nav.jsonSource
1"use client";23import * as React from "react";4import { useEffect, useRef, useState } from "react";5import gsap from "gsap";6import { List, X } from "@phosphor-icons/react";7import { cn } from "@/lib/utils";89/**10 * Awwwards Nav11 *12 * A glassmorphic bottom navigation pill with inline links and a "More" button.13 * Tapping "More" expands the bar upward with a smooth `power4.inOut` motion:14 * the inline links fade out, the button grows to full width, its icon flips to15 * an X, and a multi-column mega-menu reveals inside the expanded panel.16 *17 * Ported from the vanilla "CodeGrid Awwwards Nav" (GSAP) into a single,18 * self-contained, prop-driven React component. Positioning is left to the19 * consumer via `className`, so it works fixed to the viewport or absolutely20 * inside a positioned container.21 */2223export interface AwwwardsNavLink {24 label: string;25 href: string;26}2728export interface AwwwardsNavColumn {29 /** Column heading shown above its links. */30 title: string;31 /** Links listed under the heading. */32 links: AwwwardsNavLink[];33}3435export interface AwwwardsNavProps {36 /** Inline links shown in the collapsed bar. Defaults to a sample set. */37 items?: AwwwardsNavLink[];38 /** Columns revealed in the expanded mega-menu. Defaults to a sample set. */39 columns?: AwwwardsNavColumn[];40 /** Label on the expand/collapse button. Defaults to "More". */41 moreLabel?: string;42 /** Called whenever the panel opens (true) or closes (false). */43 onOpenChange?: (open: boolean) => void;44 /**45 * Extra class names for the root nav. Use this to position it —46 * e.g. `fixed bottom-6 left-1/2 -translate-x-1/2` (default) or47 * `absolute` inside a positioned parent.48 */49 className?: string;50}5152const DEFAULT_ITEMS: AwwwardsNavLink[] = [53 { label: "Home", href: "#" },54 { label: "Nominees", href: "#" },55 { label: "Directory", href: "#" },56 { label: "Collections", href: "#" },57];5859const DEFAULT_COLUMNS: AwwwardsNavColumn[] = [60 {61 title: "Awards",62 links: [63 { label: "Winners", href: "#" },64 { label: "Site of the Day", href: "#" },65 { label: "Nominees", href: "#" },66 ],67 },68 {69 title: "Inspiration",70 links: [71 { label: "Collections", href: "#" },72 { label: "Elements", href: "#" },73 { label: "Resources", href: "#" },74 ],75 },76 {77 title: "Directory",78 links: [79 { label: "Professionals", href: "#" },80 { label: "Agencies", href: "#" },81 { label: "Freelancers", href: "#" },82 ],83 },84 {85// … truncated
What it pulls in
npm packages
Files it writes
More from vengenceui
All 131 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | vengenceui | Components | Free | 2 deps | |
| agent-bento-gridagent-bento-grid | vengenceui | Components | Free | 1 dep | |
| alertalert | vengenceui | Components | Free | no deps | |
| animated-buttonanimated-button | vengenceui | Components | Free | 1 dep | |
| animated-footeranimated-footer | vengenceui | Components | Free | 2 deps | |
| animated-numberanimated-number | vengenceui | Components | Free | 1 dep | |
| animated-raysanimated-rays | vengenceui | Components | Free | no deps | |
| animated-tooltipanimated-tooltip | vengenceui | Components | Free | 1 dep |
