Building blocks for content-driven sites.
Accordion script placeholder
Hidden content here
Hidden content here
Hidden content here
bunx bejamas@latest add footer-01src/components/blocks/footer-01/index.tsCopy
export { default as Footer01 } from "./Footer01.astro";src/components/blocks/footer-01/Footer01.astroCopy
1---2import { Button } from "@/ui/button";3import {4 LinkGroup,5 LinkGroupItem,6 LinkGroupList,7 LinkGroupTitle,8} from "@/ui/link-group";9
10interface FooterLink {11 label: string;12 href: string;13}14
15interface FooterColumn {16 title: string;17 links: FooterLink[];18}19
20interface Props {21 brand?: string;22 tagline?: string;23 ctaTitle?: string;24 ctaLabel?: string;25 ctaHref?: string;26 columns?: FooterColumn[];27 year?: number;28 class?: string;29}30
31const defaultColumns: FooterColumn[] = [32 {33 title: "Resources",34 links: [35 { label: "Blog", href: "#blog" },36 { label: "Documentation", href: "#docs" },37 { label: "Support", href: "#support" },38 ],39 },40 {41 title: "Company",42 links: [43 { label: "About", href: "#about" },44 { label: "Careers", href: "#careers" },45 { label: "Contact", href: "#contact" },46 ],47 },48 {49 title: "Legal",50 links: [51 { label: "Privacy", href: "#privacy" },52 { label: "Terms", href: "#terms" },53 ],54 },55];56
57const {58 brand = "Acme",59 tagline = "Thoughtful tools for teams that care about the details.",60 ctaTitle = "Ready to build something clear and useful?",61 ctaLabel = "Get started",62 ctaHref = "#get-started",63 columns = defaultColumns,64 year = new Date().getFullYear(),65 class: className = "",66} = Astro.props as Props;67---68
69<footer class:list={["w-full border-t bg-muted/30 text-foreground", className]}>70 <div class="mx-auto max-w-6xl px-6">71 <div class="flex flex-col items-center gap-5 border-b py-16 text-center">72 <p73 class="text-sm font-medium uppercase tracking-widest text-muted-foreground"74 >75 Start today76 </p>77 <h2 class="max-w-2xl text-4xl font-medium tracking-tight sm:text-5xl">78 {ctaTitle}79 </h2>80 <Button as="a" href={ctaHref} size="lg">{ctaLabel}</Button>81 </div>82
83 <div class="grid gap-10 py-12 sm:grid-cols-2 lg:grid-cols-4">84 <div>85 <a href="/" class="text-xl font-semibold tracking-tight">{brand}</a>86 <p class="mt-3 max-w-xs text-sm text-muted-foreground">{tagline}</p>87 </div>88 {89 columns.map((column) => (90 <LinkGroup>91 <LinkGroupTitle>{column.title}</LinkGroupTitle>92 <LinkGroupList>93 {column.links.map((link) => (94 <LinkGroupItem>95 <a href={link.href}>{link.label}</a>96 </LinkGroupItem>97 ))}98 </LinkGroupList>99 </LinkGroup>100 ))101 }102 </div>103
104 <div105 class="flex flex-col gap-3 border-t py-6 text-sm text-muted-foreground sm:flex-row sm:items-center sm:justify-between"106 >107 <span>© {year} {brand}. All rights reserved.</span>108 <nav aria-label="Legal" class="flex gap-5">109 <a href="#privacy" class="hover:text-foreground">Privacy</a>110 <a href="#terms" class="hover:text-foreground">Terms</a>111 </nav>112 </div>113 <div114 aria-hidden="true"115 class="overflow-hidden pb-4 text-center text-[clamp(5rem,20vw,14rem)] font-bold leading-[0.8] tracking-tighter text-foreground/10"116 >117 {brand}118 </div>119 </div>120</footer>bunx bejamas@latest add navigation-headers-01src/components/blocks/navigation-headers-01/index.tsCopy
export { default as NavigationHeaders01 } from "./NavigationHeaders01.astro";src/components/blocks/navigation-headers-01/NavigationHeaders01.astroCopy
1---2import { Button } from "@/ui/button";3import {4 DropdownMenu,5 DropdownMenuContent,6 DropdownMenuTrigger,7} from "@/ui/dropdown-menu";8import { StickySurface } from "@/ui/sticky-surface";9
10interface MenuLink {11 label: string;12 description?: string;13 href: string;14}15
16interface Props {17 brand?: string;18 homeHref?: string;19 companyLinks?: MenuLink[];20 class?: string;21}22
23const defaultCompanyLinks: MenuLink[] = [24 {25 label: "About",26 description: "Read more about our company",27 href: "#about",28 },29 { label: "Team", description: "Meet our heroes", href: "#team" },30 { label: "Blog", description: "Read our latest news", href: "#blog" },31 { label: "Careers", description: "Join our team", href: "#careers" },32];33
34const {35 brand = "Acme",36 homeHref = "/",37 companyLinks = defaultCompanyLinks,38 class: className = "",39} = Astro.props as Props;40
41const menuLinkClass =42 "flex w-full flex-col rounded-lg px-3 py-2 text-left hover:bg-accent focus-visible:bg-accent focus-visible:outline-none";43
44const surfaceClass = [45 "top-5 mx-auto h-16 max-w-5xl rounded-2xl px-5 group-[.is-stuck]/surface:max-w-2xl",46 "bg-background/80 backdrop-blur-md transition-[max-width,box-shadow] duration-300 ease-out",47 className,48]49 .filter(Boolean)50 .join(" ");51---52
53<StickySurface54 as="header"55 threshold="1rem"56 observeStuck57 effects={["elevate"]}58 class={surfaceClass}59 style="--stuck-shadow: var(--shadow-sm)"60>61 <nav62 aria-label="Primary"63 class="grid h-full grid-cols-[1fr_auto_1fr] items-center gap-4"64 >65 <a href={homeHref} class="text-lg font-semibold tracking-tight">{brand}</a>66
67 <ul class="hidden items-center gap-1 md:flex">68 <li><Button as="a" href={homeHref} variant="ghost">Home</Button></li>69 <li>70 <DropdownMenu>71 <DropdownMenuTrigger variant="ghost">Company</DropdownMenuTrigger>72 <DropdownMenuContent align="center" class="w-[30rem] p-2">73 <div class="grid grid-cols-12 gap-2">74 <ul class="col-span-5 grid content-start gap-1">75 {76 companyLinks.map((link) => (77 <li>78 <a href={link.href} class={menuLinkClass}>79 <span class="text-sm font-medium">{link.label}</span>80 {link.description && (81 <span class="text-xs text-muted-foreground">82 {link.description}83 </span>84 )}85 </a>86 </li>87 ))88 }89 </ul>90 <a91 href="#company"92 class="col-span-7 flex min-h-40 items-end rounded-lg bg-primary p-4 font-medium text-primary-foreground hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"93 >94 Our company95 </a>96 </div>97 </DropdownMenuContent>98 </DropdownMenu>99 </li>100 <li><Button as="a" href="#contact" variant="ghost">Contact</Button></li>101 </ul>102
103 <div class="ml-auto flex items-center gap-2">104 <DropdownMenu>105 <DropdownMenuTrigger106 variant="outline"107 class="md:hidden"108 aria-label="Open navigation menu">Menu</DropdownMenuTrigger109 >110 <DropdownMenuContent align="end" class="w-56 p-2">111 <ul class="grid gap-1">112 <li><a href={homeHref} class={menuLinkClass}>Home</a></li>113 {114 companyLinks.map((link) => (115 <li>116 <a href={link.href} class={menuLinkClass}>117 {link.label}118 </a>119 </li>120 ))121 }122 <li><a href="#contact" class={menuLinkClass}>Contact</a></li>123 </ul>124 </DropdownMenuContent>125 </DropdownMenu>126 <Button127 as="a"128 href="#login"129 variant="outline"130 class="hidden transition-all duration-300 ease-out sm:inline-flex group-[.is-stuck]/surface:opacity-0 group-[.is-stuck]/surface:blur-sm"131 >Log in</Button132 >133 <Button as="a" href="#contact">Get a demo</Button>134 </div>135 </nav>136</StickySurface>bunx bejamas@latest add navigation-headers-02src/components/blocks/navigation-headers-02/index.tsCopy
export { default as NavigationHeaders02 } from "./NavigationHeaders02.astro";src/components/blocks/navigation-headers-02/NavigationHeaders02.astroCopy
1---2import { Button } from "@/ui/button";3import {4 DropdownMenu,5 DropdownMenuContent,6 DropdownMenuTrigger,7} from "@/ui/dropdown-menu";8import { StickySurface } from "@/ui/sticky-surface";9
10interface NavLink {11 label: string;12 href: string;13}14
15interface Props {16 brand?: string;17 announcement?: string;18 announcementHref?: string;19 announcementLinkLabel?: string;20 homeHref?: string;21 links?: NavLink[];22 class?: string;23}24
25const defaultLinks: NavLink[] = [26 { label: "Home", href: "/" },27 { label: "Company", href: "#company" },28 { label: "Contact", href: "#contact" },29];30
31const {32 brand = "Acme",33 announcement = "New release available!",34 announcementHref = "#changelog",35 announcementLinkLabel = "See the changelog",36 homeHref = "/",37 links = defaultLinks,38 class: className = "",39} = Astro.props as Props;40
41const menuLinkClass =42 "flex w-full rounded-lg px-3 py-2 text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none";43---44
45<div class:list={["w-full", className]}>46 <div class="bg-muted px-4 py-3 text-center text-sm text-muted-foreground">47 {announcement}48 <a49 href={announcementHref}50 class="font-medium text-foreground underline underline-offset-4"51 >{announcementLinkLabel}</a52 >53 </div>54 <StickySurface55 as="header"56 effects={["line"]}57 threshold="1rem"58 observeStuck59 class="bg-background/95 backdrop-blur"60 >61 <nav62 aria-label="Primary"63 class="mx-auto flex h-16 max-w-6xl items-center gap-6 px-6"64 >65 <a href={homeHref} class="mr-auto text-lg font-semibold tracking-tight"66 >{brand}</a67 >68 <ul class="hidden items-center gap-1 md:flex">69 {70 links.map((link) => (71 <li>72 <Button as="a" href={link.href} variant="ghost">73 {link.label}74 </Button>75 </li>76 ))77 }78 </ul>79 <div class="flex items-center gap-2">80 <DropdownMenu>81 <DropdownMenuTrigger82 variant="outline"83 class="md:hidden"84 aria-label="Open navigation menu">Menu</DropdownMenuTrigger85 >86 <DropdownMenuContent align="end" class="w-48 p-2">87 <ul class="grid gap-1">88 {89 links.map((link) => (90 <li>91 <a href={link.href} class={menuLinkClass}>92 {link.label}93 </a>94 </li>95 ))96 }97 <li><a href="#login" class={menuLinkClass}>Log in</a></li>98 </ul>99 </DropdownMenuContent>100 </DropdownMenu>101 <Button102 as="a"103 href="#login"104 variant="outline"105 class="hidden transition-all duration-300 ease-out sm:inline-flex group-[.is-stuck]/surface:opacity-0 group-[.is-stuck]/surface:blur-sm"106 >Log in</Button107 >108 <Button as="a" href="#contact">Get a demo</Button>109 </div>110 </nav>111 </StickySurface>112</div>