Skip to content

Components / Sections

Notice Band

The notices a regulated practice owes its readers, set where they are read: first, on a panel of its own in the page's ink, what to do in an emergency with the number as a link; then the rest as short notes, each a title, a sentence and a link (the register it is on, how to complain, that the site gives general information and not advice, the access to the building). A band above the footer on every page, or the whole of a notices page. Zero JavaScript.

Live demo

In an emergency

Call the emergency number. Out of hours, the dental helpline tells you where to go.

Call 999
  • Registered

    Every dentist here is on the dental register.

    Check the register
  • Complaints

    Tell us first: we answer within ten working days.

    How to complain
  • Not advice

    This site gives general information. Advice is given in the chair.

Live, from the library itself, at full size: scroll, hover, navigate away and back. The demo is never gated.

Variants · each row writes the attribute the prop writes; the section's own CSS answers

tone
density

Measured

JavaScript of its own

0 B

CSS 10.3 kB raw including the base tokens. Measured from a production build, and again in CI for every change that can move it.

Browser support

Baseline · widely available

every browser. Elsewhere: nothing to fall back from.

Install Pro

The demo above is never gated; the source is. With a key in components.json (see account), the registry serves it like any other item:

terminal
npx shadcn@latest add @moonarc-pro/notice-band
src/pages/index.astro
---
import NoticeBand from '@/components/moonarc/pro/NoticeBand.astro';
---
<NoticeBand
  emergency={{ title: 'In an emergency', text: 'Call the emergency number. Out of hours, the dental helpline answers.', action: { href: 'tel:999', label: 'Call 999' } }}
  notices={[
    { title: 'Registered', text: 'Every dentist here is on the dental register.', href: 'https://example.com/register', label: 'Check the register' },
    { title: 'Complaints', text: 'Tell us first; we answer within ten working days.', href: '/notices/#complaints', label: 'How to complain' },
  ]}
/>

Without a key the registry answers 401 with an upgrade message. Everything this section composes is free: reveal.

Props

PropTypeDefaultDescription
emergency{ title; text; action?: { href; label } }noneWhat to do in an emergency, first in the band, inverted from the page.
notices{ title; text; href?; label? }[]noneThe other notices, each with an optional link (its label, or the title).
headlinestringnoneA heading; without one the band is named by label and its notices take the heading's level.
eyebrowstringnoneA short line above the heading.
labelstring'Notices'The band's accessible name when it has no heading.
level1 | 2 | 32Heading level of the heading.
tone'surface' | 'muted' | 'ink' | 'brand'unset (paints nothing)The section's ground.
density'compact' | 'cozy' | 'roomy''cozy'Block padding ×0.8 / ×1 / ×1.25 through --ma-density.

Theming and overrides

The section reads the theme contract (shadcn's variable names with the base tokens as fallback), so a pasted theme or one --ma-brand recolours it. Its class names are the override surface and stay stable; a named slot replaces the matching prop with your own markup.

Classes

.ma-notices.ma-notices__body.ma-notices__call.ma-notices__eyebrow.ma-notices__head.ma-notices__headline.ma-notices__inner.ma-notices__item.ma-notices__link.ma-notices__list.ma-notices__text.ma-notices__title.ma-notices__urgent.ma-notices__urgent-text.ma-notices__urgent-title

Slots

none

Reduced motion

The emergency panel arrives at once.

With ClientRouter

CSS and Reveal.

Why it is built this way

Replaces: Disclaimer banners. See the migration table.

Questions people actually ask

Short answers. The long ones are in the docs.

Is it really zero JS?

For 83 of 125, yes, measured from a build.

Does it survive View Transitions?

Yes, verified on Astro 5, 6 and 7.

Do I need Tailwind?

No.

FAQ

Pro

A heading and lead beside a native accordion: one question open at a time, heights animated by the browser, keyboard and screen reader handled by <details>.

newly · Chrome 131 · Firefox 143 · Safari 18.4scrollclick

A site footer: brand and blurb, link columns revealed with a stagger, a legal row, and a dot field fading up from the bottom edge.

every browserscroll

A service's own page, top to bottom: its name and what it is in a sentence, then the parts a reader looks for before booking (what it is, who it is for, what happens step by step, what to bring, what comes after), each under its own heading; beside them a card that stays in view while the page scrolls (position: sticky, nothing animated) with the facts (how long, from what price, whether insurance covers it), the two actions and a line of small print.

every browserscroll

Also: view transitions · how costs are measured · browser support · accessibility policy · five-minute setup · MCP for agents · this page as Markdown