Navigation
SiteFooter
Footer with the mark, email, links and “Made in KSA”. Optional slots for other brands: brand (logo), contact, groups (link columns), social (icon links), notice, badges (null hides “Made in KSA”) and children (a full-width row). width: content width like Container (default full; borders stay full width).
import { SiteFooter, type FooterGroup, type SocialLink } from "@percentsa/ui";Examples
Code
export function SiteFooterExample() {
const t = useT();
return (
<div className="w-full overflow-hidden rounded-card border border-line">
<SiteFooter
homeHref="#"
email="[email protected]"
links={useLinks()}
legal={[{ href: "#privacy", label: t("Privacy", "الخصوصية") }]}
copyright={t("Percent. All rights reserved.", "برسنت. جميع الحقوق محفوظة.")}
/>
</div>
);
}
/** Another brand: its own logo, link groups, icon links, a notice and no "Made in KSA". */Code
export function SiteFooterSlotsExample() {
const t = useT();
return (
<div className="w-full overflow-hidden rounded-card border border-line">
<SiteFooter
homeHref="#"
brand={<span lang="en" className="text-2xl font-semibold">Acme</span>}
contact={<Text tone="muted">{t("Questions? Write to us any day.", "لديك أسئلة؟ راسلنا في أي يوم.")}</Text>}
groups={[
{ title: t("Product", "المنتج"), links: [{ href: "#features", label: t("Features", "المزايا") }, { href: "#pricing", label: t("Pricing", "الأسعار") }] },
{ title: t("Company", "الشركة"), links: [{ href: "#about", label: t("About", "من نحن") }, { href: "#jobs", label: t("Jobs", "الوظائف") }] },
{ title: t("Legal", "قانوني"), links: [{ href: "#privacy", label: t("Privacy", "الخصوصية") }, { href: "#terms", label: t("Terms", "الشروط") }] },
]}
social={[
{ href: "https://example.com", label: t("Website", "الموقع"), icon: <Globe aria-hidden /> },
{ href: "https://example.com/feed", label: t("News feed", "موجز الأخبار"), icon: <Rss aria-hidden /> },
]}
notice={t("© Acme. All rights reserved.", "© أكمي. جميع الحقوق محفوظة.")}
badges={null}
/>
</div>
);
}
const HEAD = `import { THEME_SCRIPT } from "@percentsa/ui";
// app/root.tsx: no attribute = dark; the script applies the stored choice before first paint.
<html lang="en" data-theme="dark" suppressHydrationWarning>
<head>
<script dangerouslySetInnerHTML={{ __html: THEME_SCRIPT }} />
</head>`;