Footer — Simple Centred
nswds-ui/footer-simple-centredFreeBlock
Everything centred under the NSW Government logo: the smallest footer that still carries acknowledgement of Country, legal links and ownership.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/digitalnsw/nswds-ui/main/apps/registry/public/r/footer-simple-centred.jsonSource
1import type * as React from 'react'23import {4 Footer,5 FooterAcknowledgement,6 FooterLegalLinks,7 FooterSmallPrint,8} from '@/components/footer'9import { Logo } from '@/components/logo'10import { Separator } from '@/components/separator'1112// ── Sample content — replace with your service's own ────────────────────────13const legalLinksSample = [14 { name: 'Accessibility', href: '#accessibility' },15 { name: 'Privacy', href: '#privacy' },16 { name: 'Copyright', href: '#copyright' },17 { name: 'Contact us', href: '#contact' },18]1920const departmentSample = 'Digital NSW, Department of Customer Service'2122type FooterSimpleCentredProps = Omit<23 React.ComponentProps<typeof Footer>,24 'acknowledgement' | 'children' | 'smallPrint'25>2627/**28 * Everything centred under the NSW Government logo — the smallest footer that29 * still carries acknowledgement of Country, legal links and ownership. Suits a30 * single-purpose service or campaign site with no site map to show.31 *32 * Composes the parts directly inside a bare `Footer` (rather than using its33 * `legalLinks` prop) because the built-in link row left-aligns from `lg` up,34 * and this layout stays centred at every width.35 *36 * `logoType='default'` is correct for any surface that is light in light mode37 * and dark in dark mode — the logo is blue-800 on light, white on dark. On a38 * surface that is dark in BOTH themes (`-600`/`-800` colours) switch to39 * `logoType='mono-white'`, or the mark disappears into the background.40 */41export function FooterSimpleCentred({42 legalLinks = legalLinksSample,43 socialLinks,44 department = departmentSample,45 year,46 ...props47}: FooterSimpleCentredProps) {48 return (49 <Footer {...props} acknowledgement={false} smallPrint={false}>50 <div className='flex justify-center py-4'>51 <Logo className='h-14 w-auto' />52 </div>53 <FooterAcknowledgement className='justify-center'>54 <span className='mx-auto block max-w-2xl text-center'>55 We acknowledge the Traditional Custodians of the land on which we work and live, and pay56 our respects to Elders past, present and emerging.57 </span>58 </FooterAcknowledgement>59 <Separator decorative className='my-4 bg-(--footer-border)' />60 <FooterLegalLinks legalLinks={legalLinks} className='lg:justify-center' />61 <FooterSmallPrint62 department={department}63 socialLinks={socialLinks}64 year={year}65// … truncated
What it pulls in
Other registry items
Files it writes
More from @nswds/ui
All 46 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Footer — Collapsible Site Mapfooter-accordion | @nswds/ui | Blocks | Free | no deps | |
| Footer — Compact Barfooter-compact | @nswds/ui | Blocks | Free | no deps | |
| Footer — Contact Detailsfooter-contact | @nswds/ui | Blocks | Free | no deps | |
| Footer — Call to Actionfooter-cta | @nswds/ui | Blocks | Free | no deps | |
| Footer — Newsletterfooter-newsletter | @nswds/ui | Blocks | Free | no deps | |
| Footer — Site Mapfooter-sitemap | @nswds/ui | Blocks | Free | no deps | |
| Footer — Site Map with Brandfooter-sitemap-brand | @nswds/ui | Blocks | Free | no deps | |
| Forgot Password Formforgot-password-form | @nswds/ui | Blocks | Free | no deps |
