@molecule/app-footer-solid
Feature · footer · App (browser) · v1.2.1 · Apache-2.0
App-shell footer with About link, Privacy/Terms modals (i18n-loaded HTML), language picker, and version display
npm install @molecule/app-footer-solidHow it works
@molecule/app-footer-solid is a ready-made footer feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
import { AppFooter } from '@molecule/app-footer-solid'
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} />
}Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid
Reference
App-shell footer — About link, Privacy/Terms surfaces (in-place modals or route links), language-picker modal, and version display.
The Solid counterpart of @molecule/app-footer-react — the same props,
i18n keys and DOM for the same input, with internal links wired to the
@molecule/app-solid router instead of react-router.
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.tsJSDoc, not this file.
Quick Start
import { AppFooter } from '@molecule/app-footer-solid'
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-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js
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 an
* in-app router 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'` — in-app links to `/privacy` / `/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.
This is the Solid counterpart of @molecule/app-footer-react: the same
props (React names), the same ClassMap tokens, the same i18n keys and
English defaults, and the same DOM for the same input.
function AppFooter(props: AppFooterProps): JSX.Element
props— Component props (seeAppFooterProps).
Returns: The rendered footer and its modals.
Injection Notes
Requirements
Peer dependencies:
@molecule/app-solid^3.6.0 || ^4.0.0@molecule/app-ui^1.0.1@molecule/app-ui-solid^1.1.0solid-js^1.8.0
Runtime Dependencies
@molecule/app-solid@molecule/app-ui@molecule/app-ui-solidsolid-js
The appName interpolated into the Privacy/Terms modal HTML is
HTML-escaped first — the modal bodies render via innerHTML, so a
markup-carrying app name must arrive as inert entities.
- Must render inside a
MoleculeProviderwhose config wires BOTHrouter(the About link andlegalMode="route"links navigate through it and throw outside it) andi18n—useTranslation()THROWS without i18n.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-footerbond 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 vialoadContentfromconfig.ts), wire the generic-template@molecule/app-locales-legal-defaultbond, or uselegalMode="route"and render your own /privacy and /terms pages. Until content is registered the modal shows a clearfooter.legalNotConfiguredplaceholder ("…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 only the locales your app translated (or prune manually) so the picker shows what your app actually offers.
Translations
Translation strings are provided by @molecule/app-locales-footer.