npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@molecule/app-footer-react

v4.3.1

Published

App-shell footer with About link, Privacy/Terms modals (i18n-loaded HTML), language picker, and version display

Readme

@molecule/app-footer-react

App-shell footer — About link, Privacy/Terms surfaces (in-place modals or route links), language-picker modal, and version display.

Reproduces the Footer pattern that appears in 9 flagship apps with one line of variation (external WEBSITE_URL vs internal /about — handled here by detecting http/https schemes in aboutHref).

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { AppFooter } from '@molecule/app-footer-react'

function Shell() {
  const loadContent = async (key: 'privacyPolicy' | 'termsOfService') => {
    // lazy-load the legal HTML into the i18n catalog before the modal opens
  }
  return <AppFooter appName="Bearing" aboutHref="https://example.com" loadContent={loadContent} />
}

Type

feature

Installation

npm install @molecule/app-footer-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
npm install -D @types/react

API

Interfaces

AppFooterProps

Props for the AppFooter component.

interface AppFooterProps {
  /** Display name interpolated into the "About {{appName}}" link. */
  appName: string
  /**
   * URL or path for the About link. URLs starting with `http`/`https` are
   * rendered as `<a target="_blank">`; other values are rendered as a
   * `<Link>` from `@molecule/app-react/link`.
   */
  aboutHref: string
  /**
   * How privacy/terms surfaces are presented:
   * - `'modal'` (default) — buttons that open in-place modals with HTML pulled
   *   from the bonded i18n catalog (`content.privacyPolicy` / `content.termsOfService`).
   *   Pass `loadContent` to lazy-load the catalog body before opening.
   * - `'route'` — `<Link to="/privacy">` / `<Link to="/terms">` for apps that
   *   render the legal pages on their own routes.
   */
  legalMode?: 'modal' | 'route'
  /**
   * Optional preloader called immediately before the privacy/terms modals
   * open. Only used when `legalMode === 'modal'`. Apps that lazy-load their
   * legal HTML pass `loadContent` from their config; apps that ship the
   * content statically can omit this.
   */
  loadContent?: AppFooterLoadContent
  /** Path for the Privacy Policy route. Only used when `legalMode === 'route'`. Default: `/privacy`. */
  privacyTo?: string
  /** Path for the Terms of Service route. Only used when `legalMode === 'route'`. Default: `/terms`. */
  termsTo?: string
  /** Extra className on the outer `<footer>` (composed with `cm.footerBar`). */
  className?: string
  /** `data-mol-id` for AI-agent selectors. */
  dataMolId?: string
}

Types

AppFooterLoadContent

The preloader loadContent takes: called immediately before the privacy/terms modals open, so an app can lazy-load its legal HTML into the i18n catalog. Only used when legalMode === 'modal'.

type AppFooterLoadContent = (key: 'privacyPolicy' | 'termsOfService') => Promise<void> | void

Functions

AppFooter(props)

App-shell footer — About link, Privacy/Terms modals, language picker, version.

Reproduces the Footer pattern that appears in 9 flagship apps with one line of variation (external WEBSITE_URL vs internal /about). Privacy/Terms HTML is loaded lazily through the loadContent callback when supplied, then rendered from the bonded i18n catalog (content.privacyPolicy, content.termsOfService). Those keys are EMPTY by default (the app supplies its real legal HTML); until it does, the modal shows a clear footer.legalNotConfigured placeholder rather than a silently-blank modal.

function AppFooter({
  appName,
  aboutHref,
  legalMode = 'modal',
  loadContent,
  privacyTo = '/privacy',
  termsTo = '/terms',
  className,
  dataMolId,
}: AppFooterProps): React.JSX.Element

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-react ^4.15.0 || ^5.0.0
  • @molecule/app-ui ^1.8.0
  • @molecule/app-ui-react ^4.7.0
  • react ^18.0.0 || ^19.0.0

Runtime Dependencies

  • @molecule/app-react

  • @molecule/app-ui

  • @molecule/app-ui-react

  • react

  • The modal bodies read rich catalog text. The five portable tags render as elements, with appName inserted as literal text. Custom HTML uses the web compatibility renderer.

  • Internal About and legal links require the app's router. Translations use the nearest I18nProvider or the bonded i18n provider. getClassMap() needs a bonded ClassMap (e.g. @molecule/app-ui-tailwind); version display works unbonded (the version core falls back to a web provider).

  • The privacy/terms modals render whatever HTML the i18n catalog holds under content.privacyPolicy / content.termsOfService. The companion @molecule/app-locales-footer bond ships those keys EMPTY BY DESIGN — a generic default policy would be legally wrong to present as an app's own — so the app MUST register its real legal HTML: add it to the app's locale catalog (scaffolded apps lazy-load it via loadContent from config.ts), wire the generic-template @molecule/app-locales-legal-default bond, or use legalMode="route" and render your own /privacy and /terms pages. Until content is registered the modal shows a clear footer.legalNotConfigured placeholder ("…the app owner must provide it.") instead of a blank modal — no fabricated legal text is ever shipped.

  • The language picker lists every locale registered on the i18n provider — wire i18n with @molecule/app-i18n-default-react's setupI18nDefault() (or prune manually) so only locales your app translated appear.

Translations

Translation strings are provided by @molecule/app-locales-footer.