NavigationNew
Glass Header
A floating glass capsule with a brand, navigation links and actions.
pnpm dlx shadcn@4.14.1 add @glassyui/glass-headerPreview
Demos ready. Update 0.
Installation
First add the exact @glassyui mapping to components.json as shown in Getting Started. Then run the pinned item command:
pnpm dlx shadcn@4.14.1 add @glassyui/glass-headerWhat this installs11 files, 1 package
Direct registry declarations
These values belong to @glassyui/glass-header itself in registry.json.
Package dependencies
clsx
Registry dependencies
@glassyui/glass-surface
File targets
components/glassyui/glass-header.tsxcomponents/glassyui/styles/header.css
Complete installed closure
This follows every namespaced registry dependency recursively and de-duplicates the packages and target files installed with this item.
Package dependencies
clsx
Installed files
components/glassyui/glass-header.tsxcomponents/glassyui/styles/header.csscomponents/glassyui/glass-surface.tsxcomponents/glassyui/lib/merge-refs.tscomponents/glassyui/lib/refraction-map.tscomponents/glassyui/lib/use-refraction-filter.tsxcomponents/glassyui/lib/scene-context.tscomponents/glassyui/glass-provider.tsxcomponents/glassyui/liquid-filters.tsxcomponents/glassyui/lib/preferences.tscomponents/glassyui/styles/liquid.css
Usage
import { GlassHeader } from "@/components/glassyui/glass-header";
import { GlassButton } from "@/components/glassyui/glass-button";
export function Header() {
return (
<GlassHeader
brand={<a href="/">Acme</a>}
actions={
<GlassButton asChild size="sm" variant="prominent">
<a href="/start">Get started</a>
</GlassButton>
}
>
<a href="/features">Features</a>
<a href="/pricing">Pricing</a>
<a href="/docs">Docs</a>
</GlassHeader>
);
}Examples
<GlassHeader brand={<a href="/">Acme</a>} position="static">
<a href="/features">Features</a>
<a href="/pricing" aria-current="page">Pricing</a>
</GlassHeader>API
GlassHeaderA semantic header with a ref to its header element.
GlassHeaderPropsNative header attributes plus brand, actions and placement.
brandA logo or wordmark, usually linked to the home page.
childrenNavigation links. The same links appear in the mobile menu.
actionsButtons or links on the right, visible at every width.
position"fixed" (default) floats 14px from the top; "static" stays in the surrounding layout.
navigationLabelAccessible name for the navigation, "Primary" by default.
Notes
The action button
Actions can be any buttons or links. The usage example uses Glass Button; install it with `pnpm dlx shadcn@4.14.1 add @glassyui/glass-button`.
Make room for the header
The fixed capsule is 56px tall and up to 920px wide. Leave at least 84px above your page content.
A menu when space is tight
Below 760px of available width, the links move into a Menu disclosure. Escape closes the menu and returns focus; choosing a link also closes it. Supply links as children, with unique navigationLabel values when a page contains multiple headers.
Shared glass preferences
The header follows GlassProvider theme, thickness and reduced transparency preferences. Its glass uses the existing surface renderer.
Accessibility
Keep the Radix-backed semantics intact and preserve visible labels, focus states, and keyboard operation when copying the source.
Performance
Use provider quality preferences for dense app screens. Reserve strong refraction for hero or showcase surfaces.