דילוג לתוכן הראשי
Components

Footer

A footer is designed by hand for each site. What is shared: one pattern and four classes.

BETA - זה לא לשימוש ולא ברף של האתר

  • UkFooterCol: a link column that folds into an accordion row on a phone.
  • uk-footer-eyebrow a column title, uk-footer-fineprint the small print, uk-footer-links the links, uk-footer-grid the gaps.
The real classes and UkFooterCol on a dark ground; under 768px the columns are accordion rows.

Code

import Link from 'next/link'
import UkFooterCol from '@/components/uikit/UkFooterCol'
import UkEmailNote from '@/app/demos/_shared/UkEmailNote'

<footer className="uk-section uk-section-small my-footer">
  <div className="uk-container">
    <div className="grid grid-cols-1 *:min-w-0 gap-(--uk-grid-gutter) max-uk-s:gap-[var(--uk-grid-gutter-mobile,20px)] uk-m:grid-cols-3 uk-footer-grid">
      <UkFooterCol title="ניווט" className="uk-footer-links">
        <ul>{nav.map((l) => <li key={l.href}><Link href={l.href}>{l.label}</Link></li>)}</ul>
      </UkFooterCol>
      <UkFooterCol title="טיפולים" className="uk-footer-links">
        <ul>{treatments.map((t) => <li key={t.slug}><Link href={treatmentPath(root, t.slug)}>{t.title}</Link></li>)}</ul>
      </UkFooterCol>
      <div className="my-footer__contact">
        <p className="uk-footer-eyebrow">צור קשר</p>
        <ul><li>{s.address}</li><li><UkEmailNote /></li></ul>
      </div>
    </div>
    <div className="uk-spacer-v-48" />
    <p className="uk-footer-fineprint">© {year} {s.siteName}. אתר הדגמה.</p>
  </div>
</footer>

/* my-brand.css: UkFooterCol inside a uk-footer-grid (agency.css does the same) */
@media (max-width: 767px) {
  .my-footer .grid.uk-footer-grid { row-gap: 0; }
  .my-footer .uk-footer-grid > .uk-fcol { grid-column: 1 / -1; }
  .my-footer__contact { margin-top: 2.5rem; }
}

/* a plain column instead (no accordion), the shape of the other 20 demo footers */
<div className="uk-footer-links">
  <p className="uk-footer-eyebrow">ניווט</p>
  <ul>…</ul>
</div>

UkFooterCol props

  • titleReactNoderequired
    The column's title: a uk-footer-eyebrow above the breakpoint, the accordion's <button> (with aria-expanded) under it.
  • childrenReactNoderequired
    The column's list.
  • collapseBelow'sm' | 'md' | 'lg'default 'md'
    Under this width (640 / 768 / 1024) the column is an accordion row.
  • defaultOpenbooleandefault false
    The row starts open on a phone.
  • classNamestring
    Added to .uk-fcol, e.g. uk-footer-links inside a uk-footer-grid.

Build it on a <footer> element: the footer colour and the whole-row links key on it.

UkFooterCol in a uk-footer-grid needs the two CSS lines in the code above, under 768.