header-5
fulldev-ui/header-5FreeBlock
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-5.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 { Separator } from "@/components/ui/separator"20import {21 Sheet,22 SheetClose,23 SheetContent,24 SheetDescription,25 SheetHeader,26 SheetTitle,27 SheetTrigger,28} from "@/components/ui/sheet"2930type Props = {31 class?: string32 logo: {33 label: string34 href: string35 src?: any36 srcLight?: any37 srcDark?: any38 alt?: string39 }40 navigation: {41 label: string42 href: string43 description?: string44 active?: boolean45 image?: {46 src: ImageMetadata47 alt: string48 }49 links?: {50 label: string51 href: string52 description?: string53 icon?: string54 active?: boolean55 }[]56 }[]57 buttons: {58 label: string59 href: string60 icon?: string61 variant?: "default" | "outline" | "secondary" | "ghost"62 }[]63}6465const { class: className, logo, navigation, buttons } = Astro.props66---6768<Header class={cn("flex-col items-stretch gap-0 border-b py-0", className)}>69 <HeaderContainer class="min-h-14 justify-between">70 <HeaderGroup>71 <Logo href={logo.href}>72 <LogoImage73 src={logo.src}74 srcLight={logo.srcLight}75 srcDark={logo.srcDark}76 alt={logo.alt}77 />78 {logo.label && <LogoText>{logo.label}</LogoText>}79 </Logo>80 </HeaderGroup>81 <HeaderGroup class="ml-auto hidden justify-end lg:flex">82 <slot />83 {84 buttons.map(({ label, icon, ...button }) => (85 <Button86 as="a"87 size={icon && !label ? "icon-sm" : "sm"}88 aria-label={label}89 target={button.href.startsWith("http") ? "_blank" : undefined}90 rel={button.href.startsWith("http") ? "noreferrer" : undefined}91 {...button}92 >93 {icon && <Icon name={icon} />}94 {label}95 </Button>96 ))97 }98 </HeaderGroup>99 <Sheet class="lg:hidden">100 <SheetTrigger101 variant="ghost"102// … 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 |
