import { FooterBar } from "@pixxl-tools/components";
// In Server Components:
import { FooterBar } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
actions | ReactNode | — | Actions such as a "Cookie settings" button (after the links). |
author | { href?: string; name: ReactNode } | — | "Designed and built by {author}." with an optional link. |
license | { href?: string; name: ReactNode } | — | "Released under the {license} license." with an optional link. |
links | readonly FooterBarLink[] | — | Footer links (a named <nav> when linksLabel is set). |
source | FooterBarSource | readonly FooterBarSource[] | — | Source-code link(s), listed first among links: one object (label "Source code" from the catalog) or several with labels, e.g. "Library source" and "Website source". |
brand | ReactNode | — | Logo or site name at the start of the footer. |
contact | FooterBarContact | — | — |
controls | ReactNode | — | Theme / locale switchers (end of the first row). |
copyright | false | { owner?: ReactNode; year?: number | string } | — | "© {year} {owner}." — defaults to the author and the current year when author is set; false hides it. Pass year from the server whenever the footer renders in a client component or a statically generated page: the default is the year at render time, which differs between the build and the visitor after 1 January (hydration mismatch, stale year). |
linksLabel | string | — | — |
actionsReactNode
Actions such as a "Cookie settings" button (after the links).
author{ href?: string; name: ReactNode }
"Designed and built by {author}." with an optional link.
license{ href?: string; name: ReactNode }
"Released under the {license} license." with an optional link.
linksreadonly FooterBarLink[]
Footer links (a named <nav> when linksLabel is set).
sourceFooterBarSource | readonly FooterBarSource[]
Source-code link(s), listed first among links: one object (label "Source code" from the catalog) or several with labels, e.g. "Library source" and "Website source".
brandReactNode
Logo or site name at the start of the footer.
contactFooterBarContact
controlsReactNode
Theme / locale switchers (end of the first row).
copyrightfalse | { owner?: ReactNode; year?: number | string }
"© {year} {owner}." — defaults to the author and the current year when author is set; false hides it. Pass year from the server whenever the footer renders in a client component or a statically generated page: the default is the year at render time, which differs between the build and the visitor after 1 January (hydration mismatch, stale year).
linksLabelstring
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
// The family credits recipe: the same props on every site.
<FooterBar
author={{ name: "Bartosz Gryta", href: "https://gtktsc.com" }} // same tab
license={{ name: "MIT", href: "https://opensource.org/license/mit" }} // or the LICENSE of a public repo
source={{ href: "https://github.com/your-name/your-site" }} // "Source code": public repos only
links={[{ href: "/privacy", label: "Privacy" }]}
actions={<ConsentSettingsButton />}
/>