header-4
fulldev-ui/header-4FreeBlock
fulldev/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by fulldev/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.full.dev/r/header-4.jsonSource
1---2import type { ImageMetadata } from "astro"3import { Image } from "astro:assets"45import { cn } from "@/lib/utils"6import { Button } from "@/components/ui/button"7import { Header, HeaderContainer, HeaderGroup } from "@/components/ui/header"8import { Icon } from "@/components/ui/icon"9import { Logo, LogoImage, LogoText } from "@/components/ui/logo"10import {11 NavigationMenu,12 NavigationMenuContent,13 NavigationMenuItem,14 NavigationMenuLink,15 NavigationMenuList,16 NavigationMenuTrigger,17 navigationMenuTriggerStyle,18} from "@/components/ui/navigation-menu"19import {20 Sheet,21 SheetClose,22 SheetContent,23 SheetDescription,24 SheetHeader,25 SheetTitle,26 SheetTrigger,27} from "@/components/ui/sheet"2829type Props = {30 class?: string31 logo: {32 label: string33 href: string34 src?: any35 srcLight?: any36 srcDark?: any37 alt?: string38 }39 navigation: {40 label: string41 href: string42 description?: string43 active?: boolean44 image?: {45 src: ImageMetadata46 alt: string47 }48 links?: {49 label: string50 href: string51 description?: string52 icon?: string53 active?: boolean54 }[]55 }[]56 buttons: {57 label: string58 href: string59 icon?: string60 variant?: "default" | "outline" | "secondary" | "ghost"61 }[]62}6364const { class: className, logo, navigation, buttons } = Astro.props65---6667<Header class={cn("border-b", className)}>68 <HeaderContainer class="justify-between">69 <HeaderGroup>70 <Logo href={logo.href}>71 <LogoImage72 src={logo.src}73 srcLight={logo.srcLight}74 srcDark={logo.srcDark}75 alt={logo.alt}76 />77 {logo.label && <LogoText>{logo.label}</LogoText>}78 </Logo>79 </HeaderGroup>80 <NavigationMenu81 class="absolute left-1/2 hidden max-w-none -translate-x-1/2 lg:flex"82 align="center"83 >84 <NavigationMenuList>85 {86 navigation.map((item, index) =>87 item.links?.length ? (88 <NavigationMenuItem value={`nav-${index}`}>89 <NavigationMenuTrigger>{item.label}</NavigationMenuTrigger>90 <NavigationMenuContent>91 <div class="grid w-[min(46rem,calc(100vw-2rem))] gap-2 p-1 lg:grid-cols-[1fr_1.1fr]">92 <NavigationMenuLink93 href={item.href}94 active={item.active}95// … truncated
What it pulls in
Other registry items
Files it writes
More from fulldev/ui
All 144 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| article-1article-1 | fulldev/ui | Blocks | Free | no deps | |
| article-2article-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-1articles-1 | fulldev/ui | Blocks | Free | no deps | |
| articles-2articles-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-3articles-3 | fulldev/ui | Blocks | Free | no deps | |
| articles-4articles-4 | fulldev/ui | Blocks | Free | no deps | |
| banner-1banner-1 | fulldev/ui | Blocks | Free | no deps | |
| banner-2banner-2 | fulldev/ui | Blocks | Free | no deps |
