Skip to content

73rd Allestree

Component Library

Live previews, props, and usage notes for every shared UI component.

The persistent four-band page header. Always rendered at the top of every page via NavigationBar.

@73rd/ui
Live preview — see top of page

The SiteHeader rendered above this page is the live component. It has four bands:

  1. Scout Purple stripe — 10px, Tier 1 national identity
  2. White nav bar — Scouts logo, group name, navigation links
  3. Group Red stripe — 20px, Tier 2 group identity
  4. Dynamic breadcrumb bar — Scout Purple on general pages; section colour on section pages
PropTypeDescription
navItemsNavItemConfig[]Navigation links with label, href, and optional current flag.
breadcrumbsBreadcrumbItem[]Breadcrumb trail. Defaults to empty array.

A single navigation link rendered inside the desktop nav list.

@73rd/ui
Default state
current={true} — active page
PropTypeDescription
item.labelstringVisible link text.
item.hrefstringLink destination.
item.currentboolean?Marks this link as the active page. Adds aria-current='page' and purple tint styling.

The coloured bar beneath the Group Red stripe. Background colour changes per section.

@73rd/ui
All five colour variants
PropTypeDescription
itemsBreadcrumbItem[]Array of { label, href } trail items. Last item is rendered as plain text with aria-current='page'.
backgroundColourstringTailwind bg class for the bar. Driven by useSectionTheme() → sectionColour.
data-testidstring?Optional test ID forwarded to the nav element.

MobileMenu

Full-viewport overlay navigation for small screens. Controlled by SiteHeader — open on hamburger click, close on Escape or the close button.

@73rd/ui
Behaviour notes
  • Opens when the hamburger button is tapped (visible below md breakpoint)
  • Focus is trapped within the overlay while open
  • Pressing Esc or clicking the close button dismisses the menu
  • Focus returns to the hamburger trigger on close
  • role="dialog" + aria-modal="true" for screen readers
PropTypeDescription
isOpenbooleanControls visibility of the overlay.
onClose() => voidCalled when the menu should close.
navItemsNavItemConfig[]Same items as the desktop nav.
triggerRefRefObject<HTMLButtonElement>Ref to the hamburger button — focus returns here on close.

SectionProvider + useSectionTheme

React context that broadcasts section and unit theme data down the component tree.

@73rd/ui
Usage
// Wrap a section layout
<SectionProvider section="beavers" unit="mohawks">
  <NavigationBar />
  <main>{children}</main>
</SectionProvider>

// Consume anywhere in the tree
const {
  sectionColour,    // 'bg-beavers'
  sectionColourHex, // '#004F6E'
  unitAccent,       // 'bg-beavers-mohawks'
  unitAccentHex,    // '#0085B2'
  sectionName,      // 'Beavers'
  unitName,         // 'Mohawks'
  isGroupLevel,     // false
} = useSectionTheme()
PropTypeDescription
sectionSectionSlugOne of: squirrels | beavers | cubs | scouts
unitUnitSlug?Optional unit within the section. Unlocks unit-level accent and name.
childrenReactNodeThe subtree that will receive the context.

SectionPage

Shared section index layout: hero in section colour, unit cards, and a join CTA.

apps/web
Used by squirrels, beavers, cubs, scouts page.tsx

A client component that reads useSectionTheme() for the hero background and CTA button colour, and renders the section's two unit cards from SectionConfig.units.

Visit /beavers, /cubs, /squirrels, or /scouts to see it live.

PropTypeDescription
configSectionConfigSection data from getSectionConfig(slug). Provides name, ageRange, unitGroupName, and units array.

A desktop nav item that reveals a dropdown panel of child links on hover or click. Used by SiteHeader when a NavItemConfig has a children array.

@73rd/ui
Default — closed
current child — parent highlights
PropTypeDescription
item.labelstringThe button label shown in the nav bar.
item.childrenNavItemConfig[]Sub-links rendered in the dropdown panel.
item.currentboolean?Highlights the button. Auto-derived from any child with current={true}.

UnitPage

Shared unit detail layout: hero in unit accent colour, about section, what-we-do list, and a join CTA in section colour. Reads all data from useSectionTheme() — no props needed.

@73rd/ui
Live examples — section and unit colour driven by SectionProvider

UnitPage takes no props. It reads unitName, unitAccent, sectionColour, and sectionName from the nearest SectionProvider.

Visit a unit page to see it live:

PropTypeDescription
(none)All data is read from useSectionTheme(). Wrap the page in SectionProvider with both section and unit props.

HomeHero

Full-bleed photo hero for the group homepage. Background image with a Scout Purple-to-Navy gradient overlay, Group Red accent stripe, heading, strapline, and CTA buttons.

apps/web
73rd Allestree Scouts setting off on an adventure
#SkillsForLife

73rd Derby (Allestree)
Scout Group

Woodlands Road, Allestree, Derby, DE22 2HE

Fun and challenging activities, unique experiences, everyday adventure — and the chance to help others. For young people aged 4–14 in Allestree, Derby.

Live preview — image from public/images/group-photo.jpg
PropTypeDescription
imageSrcstring?Path to the background photo. Defaults to /images/group-photo.jpg.

Site-wide footer in Scout Navy. Group identity, address, charity number, social links, and section quick-links. Rendered in every layout.

@73rd/ui
Live preview — social link hrefs are optional props
PropTypeDescription
facebookHrefstring?Facebook profile URL. Defaults to '#'.
twitterHrefstring?X (Twitter) profile URL. Defaults to '#'.
instagramHrefstring?Instagram profile URL. Defaults to '#'.

Brand colour tokens

Tailwind tokens mapped to the three-tier brand hierarchy. Never use raw hex values in components — always reference a token.

@73rd/tokens
  • Scout Purple

    #4D2177

    Tier 1 — National

  • Group Red

    #B31C27

    Tier 2 — Group

  • Squirrels

    #9B1C1C

    Tier 3 — Section

  • Beavers

    #004F6E

    Tier 3 — Section

  • Cubs

    #4A5E06

    Tier 3 — Section

  • Scouts

    #0F3D0F

    Tier 3 — Section