Footer — Call to Action
nswds-ui/footer-ctaFreeBlock
A call-to-action band above the site map, tinted with the footer ink so it works on every surface colour.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/digitalnsw/nswds-ui/main/apps/registry/public/r/footer-cta.jsonSource
1import type * as React from 'react'23import { ButtonLink } from '@/components/button'4import { Footer, FooterNav, FooterNavColumn } from '@/components/footer'5import { IconArrowForward } from '@/icons/arrow-forward'67// ── Sample content — replace with your service's own ────────────────────────8const ctaSample = {9 heading: 'Need help with your application?',10 description: 'Our team can talk you through the steps and check what you need before you start.',11 action: { label: 'Contact us', href: '#contact' },12}1314const columnsSample = [15 {16 heading: 'Services',17 links: [18 { name: 'Apply for a licence', href: '#licence' },19 { name: 'Pay a fine', href: '#fine' },20 { name: 'Book an appointment', href: '#appointment' },21 ],22 },23 {24 heading: 'About',25 links: [26 { name: 'Who we are', href: '#about' },27 { name: 'Our strategy', href: '#strategy' },28 { name: 'Careers', href: '#careers' },29 ],30 },31 {32 heading: 'Help',33 links: [34 { name: 'Accessibility help', href: '#accessibility-help' },35 { name: 'Give feedback', href: '#feedback' },36 { name: 'Report a problem', href: '#report' },37 ],38 },39]4041const legalLinksSample = [42 { name: 'Accessibility', href: '#accessibility' },43 { name: 'Privacy', href: '#privacy' },44 { name: 'Copyright', href: '#copyright' },45]4647const departmentSample = 'Digital NSW, Department of Customer Service'4849/**50 * Repoints the button's colour tokens at the footer's ink, so the action reads51 * correctly on all thirteen surfaces and in both themes. `outline` rather than52 * `solid` because a solid button needs an inverse text colour, and the footer53 * exposes its ink but not its surface — outline needs only the one token. It is54 * also the right emphasis: the page's primary action belongs above the footer,55 * not in it.56 */57const ctaActionClassName = [58 // The `dark:` repeat is load-bearing — see the note on59 // `footerSocialLinkClassName` in footer.tsx.60 '[--btn-bg:var(--footer-ink)] dark:[--btn-bg:var(--footer-ink)]',61 '[--btn-icon:var(--footer-ink)]',62 '[--btn-hover-overlay:var(--footer-halo)]',63 '[--btn-active-overlay:var(--footer-halo-active)]',64].join(' ')6566type FooterCtaProps = Omit<React.ComponentProps<typeof Footer>, 'children'> & {67 columns?: typeof columnsSample68 cta?: typeof ctaSample69}7071/**72 * A call-to-action band above the site map, for the one thing you most want73// … 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 — Newsletterfooter-newsletter | @nswds/ui | Blocks | Free | no deps | |
| Footer — Simple Centredfooter-simple-centred | @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 |
