Footers
JS behaviour
Footer with CTA banner
A gradient CTA card floats over the footer’s edge (title, two buttons, trial badge), rising in as you scroll it into view — with a replay control — above the link rows and the closing line.
Real scenarios
The component as it is used in a product — not a specimen grid.
The banner that closes the pitch
Scroll the footer into view and the gradient card rises over its edge — badge, title, two buttons — then stays put. Replay resets the reveal to watch it land again.
Release 2026.10 — the page keeps going
Every rollout lands with a guarded flag, a dashboard that never sleeps and a rollback that takes one click. Below this line, the page hands over to its footer.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| reveal | event | 'intersect · threshold .35' | An IntersectionObserver raises the card when it enters view; it runs once and the replay button resets it. |
| --ctf-grad | gradient | '135deg · #6366F1 → #8B5CF6 → #EC4899' | The card gradient; white text stays ≥ 4.5 even on the faintest stop, with a violet-tinted shadow. |
| overlap | length | '-3.5rem' | The negative margin seating the card over the footer’s top edge; the “floating” feel lives here. |
| badge | string | '14-day trial · no card' | The glassy badge riding the card; the product promise that kills hesitation before the click. |
| reducedMotion | media | 'instant' | Under prefers-reduced-motion the rise is instant — the card never stays hidden. |
Snippet
<footer class="ctf-foot">
<div class="ctf-card" x-data="{ seen: false }"
x-init="obs = new IntersectionObserver(es => es.forEach(e => { if (e.isIntersecting) seen = true }),
{ threshold: .35 }); obs.observe($el)"
x-bind:data-seen="seen">
<span class="ctf-badge">14-day trial · no card</span>
<h3>Start shipping calmly, today</h3>
<div class="ctf-actions">
<a class="ctf-btn" href="#">Start free</a>
<a class="ctf-btn ctf-ghost" href="#">Talk to sales</a>
</div>
</div>
<nav class="ctf-links" aria-label="Footer">
<a href="#">Feature flags</a><a href="#">Pricing</a><a href="#">Docs</a><a href="#">Status</a>
</nav>
<p class="ctf-base">© 2026 Meridian — Frankfurt · Dublin · Singapore</p>
</footer>
<style>
.ctf-foot { padding: 5.5rem 1.5rem 1.5rem; background: #FAFAF9; }
.ctf-card { inline-size: min(100%, 44rem); margin-block-start: -3.5rem; margin-inline: auto; text-align: center;
padding: 2.5rem 1.5rem; color: #fff; border-radius: 1.25rem;
background: linear-gradient(135deg, #6366F1, #8B5CF6 45%, #EC4899);
box-shadow: 0 24px 48px -16px rgba(139, 92, 246, .55);
opacity: 0; translate: 0 1.5rem; transition: opacity .6s ease, translate .6s ease; }
.ctf-card[data-seen='true'] { opacity: 1; translate: 0 0; }
.ctf-badge { font-size: .72rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px;
background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.ctf-card h3 { margin: 1rem 0 1.25rem; font: 800 clamp(1.5rem, 3.5vw, 2.25rem)/1.2 'Inter', sans-serif; }
.ctf-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.ctf-btn { block-size: 2.75rem; display: grid; place-items: center; padding-inline: 1.5rem;
border-radius: .8rem; background: #fff; color: #4F46E5; font-weight: 700; text-decoration: none; }
.ctf-btn.ctf-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.ctf-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center;
margin-block-start: 2.5rem; }
.ctf-links a { color: #57534E; font-size: .875rem; text-decoration: none; }
.ctf-links a:hover { color: #4F46E5; text-decoration: underline; }
.ctf-base { margin: 1.25rem 0 0; text-align: center; font-size: .75rem; color: #78716C; }
@media (prefers-reduced-motion: reduce) { .ctf-card { 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 CtaFooter from '@/components/CtaFooter';
export default function Home() {
return (
<NabuXUIProvider locale="en" linkComponent={Link}>
<main className="nx-page">
<CtaFooter />
</main>
</NabuXUIProvider>
);
}
// CtaFooter.jsx — gradient CTA card that rises in on scroll
import { useEffect, useRef, useState } from 'react';
import '@nabuxai/ui-core/css';
export default function CtaFooter() {
const card = useRef(null);
const [seen, setSeen] = useState(false);
useEffect(() => {
const obs = new IntersectionObserver(
(entries) => entries.forEach((e) => e.isIntersecting && setSeen(true)),
{ threshold: 0.35 },
);
obs.observe(card.current);
return () => obs.disconnect();
}, []);
return (
<>
<style>{`
.ctf-foot { padding: 5.5rem 1.5rem 1.5rem; background: #FAFAF9; }
.ctf-card { inline-size: min(100%, 44rem); margin-block-start: -3.5rem; margin-inline: auto; text-align: center;
padding: 2.5rem 1.5rem; color: #fff; border-radius: 1.25rem;
background: linear-gradient(135deg, #6366F1, #8B5CF6 45%, #EC4899);
box-shadow: 0 24px 48px -16px rgba(139, 92, 246, .55);
opacity: 0; translate: 0 1.5rem; transition: opacity .6s ease, translate .6s ease; }
.ctf-card[data-seen='true'] { opacity: 1; translate: 0 0; }
.ctf-badge { font-size: .72rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px;
background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.ctf-card h3 { margin: 1rem 0 1.25rem; font: 800 clamp(1.5rem, 3.5vw, 2.25rem)/1.2 'Inter', sans-serif; }
.ctf-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.ctf-btn { block-size: 2.75rem; display: grid; place-items: center; padding-inline: 1.5rem;
border-radius: .8rem; background: #fff; color: #4F46E5; font-weight: 700; text-decoration: none; }
.ctf-btn.ctf-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.ctf-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; margin-block-start: 2.5rem; }
.ctf-links a { color: #57534E; font-size: .875rem; text-decoration: none; }
.ctf-links a:hover { color: #4F46E5; text-decoration: underline; }
.ctf-base { margin: 1.25rem 0 0; text-align: center; font-size: .75rem; color: #78716C; }
@media (prefers-reduced-motion: reduce) { .ctf-card { transition-duration: .01ms; } }
`}</style>
<footer className="ctf-foot">
{/* Rises in once the card is 35% visible; the observer fires on mount if it already is. */}
<div className="ctf-card" ref={card} data-seen={seen}>
<span className="ctf-badge">14-day trial · no card</span>
<h3>Start shipping calmly, today</h3>
<div className="ctf-actions">
<a className="ctf-btn" href="#">Start free</a>
<a className="ctf-btn ctf-ghost" href="#">Talk to sales</a>
</div>
</div>
<nav className="ctf-links" aria-label="Footer">
<a href="#">Feature flags</a><a href="#">Pricing</a><a href="#">Docs</a><a href="#">Status</a>
</nav>
<p className="ctf-base">© 2026 Meridian — Frankfurt · Dublin · Singapore</p>
</footer>
</>
);
}
<!-- CtaFooter.vue — gradient CTA card that rises in on scroll -->
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import '@nabuxai/ui-core/css';
const card = ref<HTMLElement | null>(null);
const seen = ref(false);
onMounted(() => {
const obs = new IntersectionObserver(
(entries) => entries.forEach((e) => { if (e.isIntersecting) seen.value = true; }),
{ threshold: 0.35 },
);
if (card.value) obs.observe(card.value);
});
</script>
<template>
<footer class="ctf-foot">
<!-- Rises in once the card is 35% visible; the observer fires on mount if it already is. -->
<div ref="card" class="ctf-card" :data-seen="seen">
<span class="ctf-badge">14-day trial · no card</span>
<h3>Start shipping calmly, today</h3>
<div class="ctf-actions">
<a class="ctf-btn" href="#">Start free</a>
<a class="ctf-btn ctf-ghost" href="#">Talk to sales</a>
</div>
</div>
<nav class="ctf-links" aria-label="Footer">
<a href="#">Feature flags</a><a href="#">Pricing</a><a href="#">Docs</a><a href="#">Status</a>
</nav>
<p class="ctf-base">© 2026 Meridian — Frankfurt · Dublin · Singapore</p>
</footer>
</template>
<style scoped>
.ctf-foot { padding: 5.5rem 1.5rem 1.5rem; background: #FAFAF9; }
.ctf-card { inline-size: min(100%, 44rem); margin-block-start: -3.5rem; margin-inline: auto; text-align: center;
padding: 2.5rem 1.5rem; color: #fff; border-radius: 1.25rem;
background: linear-gradient(135deg, #6366F1, #8B5CF6 45%, #EC4899);
box-shadow: 0 24px 48px -16px rgba(139, 92, 246, .55);
opacity: 0; translate: 0 1.5rem; transition: opacity .6s ease, translate .6s ease; }
.ctf-card[data-seen='true'] { opacity: 1; translate: 0 0; }
.ctf-badge { font-size: .72rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px;
background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.ctf-card h3 { margin: 1rem 0 1.25rem; font: 800 clamp(1.5rem, 3.5vw, 2.25rem)/1.2 'Inter', sans-serif; }
.ctf-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.ctf-btn { block-size: 2.75rem; display: grid; place-items: center; padding-inline: 1.5rem;
border-radius: .8rem; background: #fff; color: #4F46E5; font-weight: 700; text-decoration: none; }
.ctf-btn.ctf-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.ctf-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; margin-block-start: 2.5rem; }
.ctf-links a { color: #57534E; font-size: .875rem; text-decoration: none; }
.ctf-links a:hover { color: #4F46E5; text-decoration: underline; }
.ctf-base { margin: 1.25rem 0 0; text-align: center; font-size: .75rem; color: #78716C; }
@media (prefers-reduced-motion: reduce) { .ctf-card { transition-duration: .01ms; } }
</style>
<!-- CtaFooter.svelte — gradient CTA card that rises in on scroll -->
<script lang="ts">
import { onMount } from 'svelte';
import '@nabuxai/ui-core/css';
let card: HTMLElement;
let seen = $state(false);
onMount(() => {
const obs = new IntersectionObserver(
(entries) => entries.forEach((e) => { if (e.isIntersecting) seen = true; }),
{ threshold: 0.35 },
);
obs.observe(card);
return () => obs.disconnect();
});
</script>
<footer class="ctf-foot">
<!-- Rises in once the card is 35% visible; the observer fires on mount if it already is. -->
<div bind:this={card} class="ctf-card" data-seen={seen}>
<span class="ctf-badge">14-day trial · no card</span>
<h3>Start shipping calmly, today</h3>
<div class="ctf-actions">
<a class="ctf-btn" href="#">Start free</a>
<a class="ctf-btn ctf-ghost" href="#">Talk to sales</a>
</div>
</div>
<nav class="ctf-links" aria-label="Footer">
<a href="#">Feature flags</a><a href="#">Pricing</a><a href="#">Docs</a><a href="#">Status</a>
</nav>
<p class="ctf-base">© 2026 Meridian — Frankfurt · Dublin · Singapore</p>
</footer>
<style>
.ctf-foot { padding: 5.5rem 1.5rem 1.5rem; background: #FAFAF9; }
.ctf-card { inline-size: min(100%, 44rem); margin-block-start: -3.5rem; margin-inline: auto; text-align: center;
padding: 2.5rem 1.5rem; color: #fff; border-radius: 1.25rem;
background: linear-gradient(135deg, #6366F1, #8B5CF6 45%, #EC4899);
box-shadow: 0 24px 48px -16px rgba(139, 92, 246, .55);
opacity: 0; translate: 0 1.5rem; transition: opacity .6s ease, translate .6s ease; }
.ctf-card[data-seen='true'] { opacity: 1; translate: 0 0; }
.ctf-badge { font-size: .72rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px;
background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.ctf-card h3 { margin: 1rem 0 1.25rem; font: 800 clamp(1.5rem, 3.5vw, 2.25rem)/1.2 'Inter', sans-serif; }
.ctf-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.ctf-btn { block-size: 2.75rem; display: grid; place-items: center; padding-inline: 1.5rem;
border-radius: .8rem; background: #fff; color: #4F46E5; font-weight: 700; text-decoration: none; }
.ctf-btn.ctf-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.ctf-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; margin-block-start: 2.5rem; }
.ctf-links a { color: #57534E; font-size: .875rem; text-decoration: none; }
.ctf-links a:hover { color: #4F46E5; text-decoration: underline; }
.ctf-base { margin: 1.25rem 0 0; text-align: center; font-size: .75rem; color: #78716C; }
@media (prefers-reduced-motion: reduce) { .ctf-card { transition-duration: .01ms; } }
</style>