Footer
A responsive footer component with multiple layout variants for site-wide navigation and information sections.
Installation
npx vayu-ui-cli@latest add footerUsage
Default Variant
Centered Variant
Minimal Variant
With CTA Button
Anatomy
import { Footer } from 'vayu-ui';
<Footer variant="default">
<Footer.Container>
<Footer.Grid>
<Footer.Section title="Section">
<Footer.Logo href="/">Logo</Footer.Logo>
<Footer.Social>
<Footer.SocialLink href="#" aria-label="Social">
{/* Icon */}
</Footer.SocialLink>
</Footer.Social>
<Footer.Link href="#">Link</Footer.Link>
<Footer.Link href="#" external>
External
</Footer.Link>
</Footer.Section>
</Footer.Grid>
<Divider />
<Footer.Bottom>
<Footer.Copyright>© 2026</Footer.Copyright>
</Footer.Bottom>
</Footer.Container>
</Footer>;- Footer — Root element. Renders a
<footer>landmark withrole="contentinfo". Accepts avariantprop that controls layout across all children. - Footer.Container — Constrained width wrapper with responsive horizontal padding.
- Footer.Grid — Responsive grid layout. Column count adapts based on the parent variant.
- Footer.Section — Content group with an optional
titleheading. Contains a<nav>witharia-labelfor link collections. - Footer.Logo — Logo wrapper. Renders an
<a>link whenhrefis provided, or a plain<div>otherwise. - Footer.Link — Navigation link with hover underline. Supports
externalto open in a new tab with an auto-generatedaria-label. - Footer.Social — Container for social icon links. Uses
role="list"to avoid nested navigation landmarks. - Footer.SocialLink — Circular icon link with hover background. Always opens externally. Requires
aria-labelfor accessibility. - Footer.Copyright — Styled text wrapper for copyright content.
- Footer.Divider — Horizontal separator with
role="separator". - Footer.Bottom — Bottom bar layout. Alignment adapts to the parent variant (row for default/minimal, centered column for centered).
Accessibility
- Keyboard Support:
- All interactive elements are native
<a>tags, fully keyboard navigable. Tab— Moves focus between links and social icons in document order.Enter/Space— Activates the focused link.
- All interactive elements are native
- ARIA Attributes:
role="contentinfo"on the root<footer>landmark.aria-label="{title} links"on<nav>elements insideFooter.Section.aria-labelauto-generated as"{text} (opens in new tab)"for externalFooter.Linkwith string children.role="list"andaria-label="Social media links"onFooter.Social.role="separator"andaria-orientation="horizontal"onFooter.Divider.- External link icon marked
aria-hidden="true".
- Focus Behavior:
- Visible focus ring (
ring-2 ring-focus ring-offset-2 ring-offset-canvas) on all interactive elements. - Social links have minimum 44px touch targets (
min-w-11 min-h-11).
- Visible focus ring (
Screen reader behavior
When a screen reader encounters the footer, it announces the "contentinfo" landmark. Each section with a title renders an <h3> heading followed by a navigation region labeled "{title} links" (e.g., "Product links"). Links within sections are listed as standard navigation items. External links are announced with "(opens in new tab)" appended to the link text. Social links are announced within a list context, so each social icon's aria-label is read as a list item. The divider is announced as a separator. The footer landmark provides a quick navigation target for assistive technology users to skip to the site footer.
Component Folder Structure
Footer/
├── Footer.tsx # Main composition file, wires all subcomponents via Object.assign
├── FooterRoot.tsx # Root <footer> element with variant and group styling
├── FooterLayout.tsx # Container, Grid, and Bottom layout primitives
├── FooterContent.tsx # Section, Link, and Logo content elements
├── FooterSocial.tsx # Social container and SocialLink icon buttons
├── FooterUtilities.tsx # Copyright text and Divider separator
├── types.ts # TypeScript type definitions
├── index.ts # Re-exports Footer component and types
└── README.md # Component usage referenceProps
Footer (Root)
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "minimal" | "centered" | "default" | Layout variant controlling grid columns and alignment. |
children | ReactNode | — | Footer content. |
className | string | — | Additional CSS classes. |
Footer.Container
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Container content. |
className | string | — | Additional CSS classes. |
Footer.Grid
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Grid sections. |
className | string | — | Additional CSS classes. |
Footer.Section
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Optional section heading. Sets aria-label on the inner <nav>. |
children | ReactNode | — | Section content, typically Footer.Link elements. |
className | string | — | Additional CSS classes. |
Footer.Link
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | — | Link destination. |
external | boolean | false | Open in a new tab with target="_blank". Auto-generates aria-label. |
children | ReactNode | — | Link text or content. |
className | string | — | Additional CSS classes. |
Footer.Logo
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | "/" | Logo link destination. Omit to render a non-interactive wrapper. |
children | ReactNode | — | Logo content. |
className | string | — | Additional CSS classes. |
Footer.Social
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Footer.SocialLink elements. |
className | string | — | Additional CSS classes. |
Footer.SocialLink
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | — | Social profile URL. Opens externally. |
aria-label | string | — | Accessible label for screen readers. Required for icon-only links. |
children | ReactNode | — | Icon content. |
className | string | — | Additional CSS classes. |
Footer.Copyright
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Copyright text. |
className | string | — | Additional CSS classes. |
Footer.Divider
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes. |
Footer.Bottom
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Bottom bar content. |
className | string | — | Additional CSS classes. |