{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "header-transparent-scroll",
  "title": "Header — Transparent Over Hero",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/header-transparent-scroll/header-transparent-scroll.component.ts",
      "content": "// Marketing navbar that starts transparent over the hero and fades in a bordered,\n// blurred surface once the page scrolls, with a nav row, theme-neutral CTA pair,\n// and a mobile sheet. Port of the React block 1:1.\nimport { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit, signal } from '@angular/core'\nimport { Layers, LucideAngularModule, Menu, X } from 'lucide-angular'\nimport { cn } from '@/lib/utils'\nimport { UiButtonComponent } from '@/ui/button/button.component'\nimport { UiSeparatorComponent } from '@/ui/separator/separator.component'\nimport { UiSheetCloseComponent, UiSheetComponent, UiSheetContentComponent } from '@/ui/sheet/sheet.component'\n\nexport interface HeaderTransparentScrollLink {\n  label: string\n  href: string\n}\n\nconst links: HeaderTransparentScrollLink[] = [\n  { label: 'Product', href: '#product' },\n  { label: 'Solutions', href: '#solutions' },\n  { label: 'Pricing', href: '#pricing' },\n  { label: 'Docs', href: '#docs' },\n]\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-header-transparent-scroll, [ui-header-transparent-scroll]',\n  standalone: true,\n  // React renders the root <header> itself: the host stays out of layout and `class` goes to the root.\n  host: { '[attr.class]': '\"contents\"' },\n  imports: [\n    LucideAngularModule,\n    UiButtonComponent,\n    UiSeparatorComponent,\n    UiSheetCloseComponent,\n    UiSheetComponent,\n    UiSheetContentComponent,\n  ],\n  template: `\n    <header data-slot=\"header-transparent-scroll\" [class]=\"rootClass\">\n      <div class=\"mx-auto flex h-16 max-w-6xl items-center gap-6 px-6\">\n        <a href=\"#top\" class=\"flex items-center gap-2 font-semibold tracking-tight\">\n          <lucide-icon [img]=\"Layers\" class=\"text-primary size-5\" />\n          Northwind\n        </a>\n\n        <nav class=\"hidden items-center gap-1 md:flex\" aria-label=\"Primary\">\n          @for (link of navLinks; track link.href) {\n            <a\n              [href]=\"link.href\"\n              class=\"text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:ring-ring rounded-md px-3 py-1.5 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n            >\n              {{ link.label }}\n            </a>\n          }\n        </nav>\n\n        <div class=\"ml-auto hidden items-center gap-2 md:flex\">\n          <button ui-button variant=\"ghost\" size=\"sm\">Sign in</button>\n          <button ui-button size=\"sm\">Start free</button>\n        </div>\n\n        <div ui-sheet [open]=\"mobileOpen()\" (openChange)=\"mobileOpen.set($event)\">\n          <button\n            ui-button\n            variant=\"ghost\"\n            size=\"icon\"\n            class=\"ml-auto md:hidden\"\n            aria-label=\"Open navigation menu\"\n            (click)=\"mobileOpen.set(true)\"\n          >\n            <lucide-icon [img]=\"Menu\" class=\"size-5\" />\n          </button>\n          <div ui-sheet-content side=\"right\" class=\"w-72\">\n            <div class=\"flex h-full flex-col\">\n              <div class=\"flex items-center justify-between border-b px-4 py-3\">\n                <span class=\"text-sm font-semibold\">Menu</span>\n                <button ui-button ui-sheet-close variant=\"ghost\" size=\"icon\" class=\"size-8\" aria-label=\"Close menu\">\n                  <lucide-icon [img]=\"X\" class=\"size-4\" />\n                </button>\n              </div>\n              <nav class=\"flex flex-1 flex-col gap-1 p-4\" aria-label=\"Mobile\">\n                @for (link of navLinks; track link.href) {\n                  <a\n                    [href]=\"link.href\"\n                    class=\"hover:bg-muted rounded-md px-3 py-2 text-sm font-medium transition-colors\"\n                    (click)=\"mobileOpen.set(false)\"\n                  >\n                    {{ link.label }}\n                  </a>\n                }\n              </nav>\n              <div ui-separator class=\"my-5\"></div>\n              <div class=\"flex flex-col gap-2 p-4 pt-0\">\n                <button ui-button variant=\"outline\" class=\"w-full\">Sign in</button>\n                <button ui-button class=\"w-full\">Start free</button>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </header>\n  `,\n})\nexport class UiHeaderTransparentScrollComponent implements OnInit, OnDestroy {\n  protected readonly Layers = Layers\n  protected readonly Menu = Menu\n  protected readonly X = X\n\n  protected readonly navLinks = links\n\n  @Input('class') className?: string\n\n  readonly scrolled = signal(false)\n  readonly mobileOpen = signal(false)\n\n  private readonly onScroll = (): void => {\n    this.scrolled.set(window.scrollY > 24)\n  }\n\n  ngOnInit(): void {\n    // Starts unscrolled so server and first client paint agree; the listener is\n    // the only thing that swaps in the solid surface.\n    if (typeof window === 'undefined') return\n    this.onScroll()\n    window.addEventListener('scroll', this.onScroll, { passive: true })\n  }\n\n  ngOnDestroy(): void {\n    if (typeof window === 'undefined') return\n    window.removeEventListener('scroll', this.onScroll)\n  }\n\n  get rootClass(): string {\n    return cn(\n      'fixed inset-x-0 top-0 z-40 transition-colors duration-200',\n      this.scrolled() ? 'border-border bg-background/85 border-b backdrop-blur' : 'border-b border-transparent',\n      this.className,\n    )\n  }\n\n  closeMobile(): void {\n    this.mobileOpen.set(false)\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/header-transparent-scroll/header-transparent-scroll.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/header-transparent-scroll/index.ts",
      "content": "export {\n  UiHeaderTransparentScrollComponent,\n  type HeaderTransparentScrollLink,\n} from './header-transparent-scroll.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/header-transparent-scroll/index.ts"
    }
  ],
  "dependencies": [
    "lucide-angular"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/angular/button.json",
    "https://uipkge.dev/r/angular/separator.json",
    "https://uipkge.dev/r/angular/sheet.json"
  ],
  "description": "Marketing navbar that starts transparent over the hero and fades in a bordered, blurred surface once the page scrolls, with a nav row, theme-neutral CTA pair, and a mobile sheet.",
  "categories": [
    "marketing"
  ],
  "deprecated": true,
  "replacedBy": "header"
}