header-1
fulldev-ui/header-1FreeBlock
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-1.jsonSource
1---2import { cn } from "@/lib/utils"3import { Button } from "@/components/ui/button"4import { Header, HeaderContainer, HeaderGroup } from "@/components/ui/header"5import { Icon } from "@/components/ui/icon"6import { Logo, LogoImage, LogoText } from "@/components/ui/logo"7import {8 NavigationMenu,9 NavigationMenuItem,10 NavigationMenuLink,11 NavigationMenuList,12} from "@/components/ui/navigation-menu"13import {14 Sheet,15 SheetClose,16 SheetContent,17 SheetDescription,18 SheetHeader,19 SheetTitle,20 SheetTrigger,21} from "@/components/ui/sheet"2223type Props = {24 class?: string25 logo: {26 label: string27 href: string28 src?: any29 srcLight?: any30 srcDark?: any31 alt?: string32 }33 navigation: {34 label: string35 href: string36 active?: boolean37 links?: {38 label: string39 href: string40 }[]41 }[]42 buttons: {43 label: string44 href: string45 icon?: string46 variant?: "default" | "outline" | "secondary" | "ghost"47 }[]48}4950const { class: className, logo, navigation, buttons } = Astro.props51---5253<Header class={cn("", className)}>54 <HeaderContainer class="items-center justify-between gap-4">55 <HeaderGroup>56 <Logo href={logo.href}>57 <LogoImage58 src={logo.src}59 srcLight={logo.srcLight}60 srcDark={logo.srcDark}61 alt={logo.alt}62 />63 {logo.label && <LogoText>{logo.label}</LogoText>}64 </Logo>65 </HeaderGroup>66 <NavigationMenu class="hidden flex-none justify-start lg:flex">67 <NavigationMenuList class="justify-start">68 {69 navigation.map((item, index) => (70 <NavigationMenuItem value={`nav-${index}`}>71 <NavigationMenuLink href={item.href} active={item.active}>72 {item.label}73 </NavigationMenuLink>74 </NavigationMenuItem>75 ))76 }77 </NavigationMenuList>78 </NavigationMenu>79 <HeaderGroup class="ml-auto hidden flex-1 justify-end lg:flex">80 <slot />81 {82 buttons.map(({ label, icon, ...button }) => (83 <Button84 as="a"85 size={icon && !label ? "icon-sm" : "sm"}86 aria-label={label}87 target={button.href.startsWith("http") ? "_blank" : undefined}88 rel={button.href.startsWith("http") ? "noreferrer" : undefined}89 {...button}90 >91 {icon && <Icon name={icon} />}92 {label}93 </Button>94 ))95 }96 </HeaderGroup>97// … 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 |
