Brand and blurb, link columns, a newsletter form, socials, a status line, a theme switch and the legal row. Columns fold into accordions on phones.
Used for
- Marketing site footer
- Docs footer links
- Status line in footer
- Newsletter sign-up
Examples
Installation
npx knowns-ui@latest add site-footerFor Claude Code, Cursor or Codex: installs it and wires the props to your own data.
Paste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install prompt
Install Site footer from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/site-footer
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add site-footer
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- components/ui/knowns/accordion.tsx
- components/ui/knowns/spinner.tsx
- components/ui/knowns/button.tsx
- lib/knowns/motion.tsx
- lib/knowns/motion-utils.ts
- lib/knowns/home.ts
- lib/knowns/home-utils.ts
- components/ui/knowns/kbd.tsx
- components/ui/knowns/field-class.ts
- components/ui/knowns/textarea.tsx
- components/ui/knowns/chat-composer/use-autosize.ts
- components/ui/knowns/use-floating.ts
- components/ui/knowns/tooltip.tsx
- components/ui/knowns/tooltip-utils.ts
- components/ui/knowns/input.tsx
- components/ui/knowns/segmented-control.tsx
- lib/knowns/social.tsx
- components/ui/knowns/blocks/site/site-footer.tsx
- components/ui/knowns/blocks/site/site-utils.ts
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0, class-variance-authority@^0.7.1.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/site-footer, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "site-footer" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- brand / blurb
ReactNode- Top left, above the newsletter.
- columns
{ title, links }[]- 3 to 5 columns from 640px; accordions below.
- newsletter
{ onSubscribe, title?, description?, placeholder?, button?, thanks? }- Checks the address shape, shows a spinner while onSubscribe runs, then the thanks line; a thrown message shows under the field.
- socials
{ href, kind?, label?, icon? }[]- Default
[] - Icon links opened in a new tab. kind is optional: the platform (Discord, X, GitHub, LinkedIn, YouTube and more) is detected from the URL and names the link. kind, label and icon override.
- status
{ state?: "operational" | "degraded" | "outage", label?, href? }- A dot and a line such as All systems normal, linked to your status page.
- theme
{ value: "light" | "dark" | "system", onChange }- A Segmented Control.
- copyright / legal
ReactNode / NavLink[]- The bottom row.
- onNavigate
(href, event) => void- Every internal link click.
| Prop | Type | Default | Description |
|---|---|---|---|
| brand / blurb | ReactNode | - | Top left, above the newsletter. |
| columns | { title, links }[] | - | 3 to 5 columns from 640px; accordions below. |
| newsletter | { onSubscribe, title?, description?, placeholder?, button?, thanks? } | - | Checks the address shape, shows a spinner while onSubscribe runs, then the thanks line; a thrown message shows under the field. |
| socials | { href, kind?, label?, icon? }[] | [] | Icon links opened in a new tab. kind is optional: the platform (Discord, X, GitHub, LinkedIn, YouTube and more) is detected from the URL and names the link. kind, label and icon override. |
| status | { state?: "operational" | "degraded" | "outage", label?, href? } | - | A dot and a line such as All systems normal, linked to your status page. |
| theme | { value: "light" | "dark" | "system", onChange } | - | A Segmented Control. |
| copyright / legal | ReactNode / NavLink[] | - | The bottom row. |
| onNavigate | (href, event) => void | - | Every internal link click. |
What it handles
- 01Sets the brand and a blurb on the left and 3 to 5 link columns on the right, with the grid adapting to the number of columns.
- 02Folds the columns into multiple-open accordions below 640px, with taller rows for touch.
- 03Includes a newsletter mini-form: onSubscribe resolves to show the thanks line and a thrown message shows as an alert under the field.
- 04Checks the address with looksLikeEmail before calling onSubscribe, and keeps a reserved line for the error so the layout does not jump.
- 05Shows a status line from operational, degraded or outage with a still coloured dot, optionally linked to your status page.
- 06Detects the platform of each social link from its URL, adds a Light, Dark or System switch through theme, and ends with a copyright and a legal row.
States
- First render
- Nothing. The footer paints as it is
- none
- Link hover or focus
- The link colour changes
- 120ms, ease out
- Column accordion on a phone
- The column's links open or close
- 180ms, ease out
- Subscribing
- The button shows its loading state
- none
- Subscribed or failed
- The form is replaced by the thanks line, or the error appears in the reserved line
- none, at once
- Status dot
- The dot stays still for every state
- none
- Reduced motion
- The accordion opens at once
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | Nothing. The footer paints as it is | none |
| Link hover or focus | The link colour changes | 120ms, ease out |
| Column accordion on a phone | The column's links open or close | 180ms, ease out |
| Subscribing | The button shows its loading state | none |
| Subscribed or failed | The form is replaced by the thanks line, or the error appears in the reserved line | none, at once |
| Status dot | The dot stays still for every state | none |
| Reduced motion | The accordion opens at once | 0ms |
Works with
- Segmented controlInstalled with it. The theme prop renders it as the Light, Dark and System switch.
- AccordionInstalled with it. Each link column becomes an item on small screens.
- NewsletterPairs with it: use the full block on a page and keep the footer's mini-form for the quiet ask.
- Social linksInstalled with it. The socials list picks its icon and label from the shared social helper.
When to use
When to use
- The bottom of a marketing site: link columns, a newsletter sign-up, socials, a status line and the legal row.
- Docs and product sites that need the same links on phones without a long scroll: columns fold into accordions.
When not to use
- Footers inside app screens: keep those to a line of help links.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Site Footer to my app and wire it to my own data.
- I need the bottom of a marketing site: link columns, a newsletter sign-up, socials, a status line and the legal row. Set that up with the Knowns UI Site Footer.
- Which Site Footer props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "site-footer" }) and search_docs({ query: "site footer" }).