Footers JS behaviour

Minimal footer

One quiet line: © and the name, a pulsing green “all systems operational” dot, three text links and a small theme switch that flips the page on the spot — all riding a hairline rule.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

Even barer

The same line with the switch dropped, and a start-aligned spread that carries status on one flank and links on the other.

without the switch
start-aligned spread

Important props

Important props
Prop Type Default What it does
status string 'operational' The green dot pulses on a 2.2s loop; under reduced motion the pulse stops and only the colour remains.
hairline length '1px' The hairline above the row; the lighter the rule, the more minimal the footer reads.
themeSwitch boolean true The small switch flips data-theme on html between light and dark, reading its initial state from there too.
links array '3' Three plain text links, no buttons, no icons — Docs, API reference, Privacy.

Snippet

<footer class="mnf-bar">
<small>© 2026 Meridian</small>
<a class="mnf-status" href="#status"><i aria-hidden="true"></i>All systems operational</a>
<nav class="mnf-links" aria-label="Footer">
<a href="#docs">Docs</a><a href="#api">API reference</a><a href="#privacy">Privacy</a>
</nav>
<button type="button" class="mnf-switch" role="switch" aria-label="Dark mode"
        x-data="{ on: document.documentElement.dataset.theme === 'dark' }"
        x-bind:aria-checked="on"
        x-on:click="on = !on; document.documentElement.dataset.theme = on ? 'dark' : 'light'">
<span aria-hidden="true"></span>
</button>
</footer>

<style>
.mnf-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: center;
           padding: 1rem 1.5rem; background: #FAFAF9; color: #57534E;
           border-block-start: 1px solid #E7E5E4; font-family: 'Inter', sans-serif; }
.mnf-bar a { color: #57534E; font-size: .8rem; text-decoration: none; }
.mnf-bar a:hover { color: #1C1917; text-decoration: underline; }
.mnf-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; }
.mnf-status i { inline-size: .45rem; aspect-ratio: 1; border-radius: 50%; background: #10B981;
animation: mnf-pulse 2.2s ease-in-out infinite; }
.mnf-links { display: flex; gap: 1rem; }
.mnf-switch { position: relative; inline-size: 2.1rem; block-size: 1.15rem; cursor: pointer;
background: #E7E5E4; border: none; border-radius: 999px; transition: background .2s ease; }
.mnf-switch span { position: absolute; inset-block-start: .15rem; inset-inline-start: .15rem;
inline-size: .85rem; block-size: .85rem; border-radius: 50%; background: #fff;
transition: inset-inline-start .2s ease; }
.mnf-switch[aria-checked='true'] { background: #10B981; }
.mnf-switch[aria-checked='true'] span { inset-inline-start: 1.1rem; }
@keyframes mnf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
.mnf-status i { animation: none; }
.mnf-switch, .mnf-switch span { transition-duration: .01ms; }
}
</style>
// app/Pages/Home.jsx — Inertia (React) page; renders the React snippet
// below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import MinimalFooter from '@/components/MinimalFooter';

export default function Home() {
  return (
    <NabuXUIProvider locale="en" linkComponent={Link}>
      <main className="nx-page">
        <MinimalFooter />
      </main>
    </NabuXUIProvider>
  );
}
// MinimalFooter.jsx — one quiet line with a live theme switch
import { useState } from 'react';
import '@nabuxai/ui-core/css';

export default function MinimalFooter() {
  const [dark, setDark] = useState(
    () => document.documentElement.dataset.theme === 'dark',
  );

  const toggle = () => {
    const on = !dark;
    setDark(on);
    document.documentElement.dataset.theme = on ? 'dark' : 'light';
  };

  return (
    <>
      <style>{`
        .mnf-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: center;
                    padding: 1rem 1.5rem; background: #FAFAF9; color: #57534E;
                    border-block-start: 1px solid #E7E5E4; font-family: 'Inter', sans-serif; }
        .mnf-bar a { color: #57534E; font-size: .8rem; text-decoration: none; }
        .mnf-bar a:hover { color: #1C1917; text-decoration: underline; }
        .mnf-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; }
        .mnf-status i { inline-size: .45rem; aspect-ratio: 1; border-radius: 50%; background: #10B981;
                    animation: mnf-pulse 2.2s ease-in-out infinite; }
        .mnf-links { display: flex; gap: 1rem; }
        .mnf-switch { position: relative; inline-size: 2.1rem; block-size: 1.15rem; cursor: pointer;
                    background: #E7E5E4; border: none; border-radius: 999px; transition: background .2s ease; }
        .mnf-switch span { position: absolute; inset-block-start: .15rem; inset-inline-start: .15rem;
                    inline-size: .85rem; block-size: .85rem; border-radius: 50%; background: #fff;
                    transition: inset-inline-start .2s ease; }
        .mnf-switch[aria-checked='true'] { background: #10B981; }
        .mnf-switch[aria-checked='true'] span { inset-inline-start: 1.1rem; }
        @keyframes mnf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
        @media (prefers-reduced-motion: reduce) {
          .mnf-status i { animation: none; }
          .mnf-switch, .mnf-switch span { transition-duration: .01ms; }
        }
      `}</style>
      <footer className="mnf-bar">
        <small>© 2026 Meridian</small>
        <a className="mnf-status" href="#status"><i aria-hidden="true"></i>All systems operational</a>
        <nav className="mnf-links" aria-label="Footer">
          <a href="#docs">Docs</a><a href="#api">API reference</a><a href="#privacy">Privacy</a>
        </nav>
        {/* Flips the real page theme; state is read from html on mount. */}
        <button type="button" className="mnf-switch" role="switch" aria-label="Dark mode"
                aria-checked={dark} onClick={toggle}>
          <span aria-hidden="true"></span>
        </button>
      </footer>
    </>
  );
}
<!-- MinimalFooter.vue — one quiet line with a live theme switch -->
<script setup lang="ts">
import { ref } from 'vue';
import '@nabuxai/ui-core/css';

const dark = ref(document.documentElement.dataset.theme === 'dark');

function toggle() {
  dark.value = !dark.value;
  document.documentElement.dataset.theme = dark.value ? 'dark' : 'light';
}
</script>

<template>
  <footer class="mnf-bar">
    <small>© 2026 Meridian</small>
    <a class="mnf-status" href="#status"><i aria-hidden="true"></i>All systems operational</a>
    <nav class="mnf-links" aria-label="Footer">
      <a href="#docs">Docs</a><a href="#api">API reference</a><a href="#privacy">Privacy</a>
    </nav>
    <!-- Flips the real page theme; state is read from html on mount. -->
    <button type="button" class="mnf-switch" role="switch" aria-label="Dark mode"
            :aria-checked="dark" @click="toggle">
      <span aria-hidden="true"></span>
    </button>
  </footer>
</template>

<style scoped>
.mnf-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: center;
            padding: 1rem 1.5rem; background: #FAFAF9; color: #57534E;
            border-block-start: 1px solid #E7E5E4; font-family: 'Inter', sans-serif; }
.mnf-bar a { color: #57534E; font-size: .8rem; text-decoration: none; }
.mnf-bar a:hover { color: #1C1917; text-decoration: underline; }
.mnf-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; }
.mnf-status i { inline-size: .45rem; aspect-ratio: 1; border-radius: 50%; background: #10B981;
            animation: mnf-pulse 2.2s ease-in-out infinite; }
.mnf-links { display: flex; gap: 1rem; }
.mnf-switch { position: relative; inline-size: 2.1rem; block-size: 1.15rem; cursor: pointer;
            background: #E7E5E4; border: none; border-radius: 999px; transition: background .2s ease; }
.mnf-switch span { position: absolute; inset-block-start: .15rem; inset-inline-start: .15rem;
            inline-size: .85rem; block-size: .85rem; border-radius: 50%; background: #fff;
            transition: inset-inline-start .2s ease; }
.mnf-switch[aria-checked='true'] { background: #10B981; }
.mnf-switch[aria-checked='true'] span { inset-inline-start: 1.1rem; }
@keyframes mnf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .mnf-status i { animation: none; }
  .mnf-switch, .mnf-switch span { transition-duration: .01ms; }
}
</style>
<!-- MinimalFooter.svelte — one quiet line with a live theme switch -->
<script lang="ts">
  import '@nabuxai/ui-core/css';

  let dark = $state(document.documentElement.dataset.theme === 'dark');

  function toggle() {
    dark = !dark;
    document.documentElement.dataset.theme = dark ? 'dark' : 'light';
  }
</script>

<footer class="mnf-bar">
  <small>© 2026 Meridian</small>
  <a class="mnf-status" href="#status"><i aria-hidden="true"></i>All systems operational</a>
  <nav class="mnf-links" aria-label="Footer">
    <a href="#docs">Docs</a><a href="#api">API reference</a><a href="#privacy">Privacy</a>
  </nav>
  <!-- Flips the real page theme; state is read from html on mount. -->
  <button type="button" class="mnf-switch" role="switch" aria-label="Dark mode"
          aria-checked={dark} onclick={toggle}>
    <span aria-hidden="true"></span>
  </button>
</footer>

<style>
.mnf-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: center;
            padding: 1rem 1.5rem; background: #FAFAF9; color: #57534E;
            border-block-start: 1px solid #E7E5E4; font-family: 'Inter', sans-serif; }
.mnf-bar a { color: #57534E; font-size: .8rem; text-decoration: none; }
.mnf-bar a:hover { color: #1C1917; text-decoration: underline; }
.mnf-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; }
.mnf-status i { inline-size: .45rem; aspect-ratio: 1; border-radius: 50%; background: #10B981;
            animation: mnf-pulse 2.2s ease-in-out infinite; }
.mnf-links { display: flex; gap: 1rem; }
.mnf-switch { position: relative; inline-size: 2.1rem; block-size: 1.15rem; cursor: pointer;
            background: #E7E5E4; border: none; border-radius: 999px; transition: background .2s ease; }
.mnf-switch span { position: absolute; inset-block-start: .15rem; inset-inline-start: .15rem;
            inline-size: .85rem; block-size: .85rem; border-radius: 50%; background: #fff;
            transition: inset-inline-start .2s ease; }
.mnf-switch[aria-checked='true'] { background: #10B981; }
.mnf-switch[aria-checked='true'] span { inset-inline-start: 1.1rem; }
@keyframes mnf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .mnf-status i { animation: none; }
  .mnf-switch, .mnf-switch span { transition-duration: .01ms; }
}
</style>