Firefox moz-* web components, extracted and transformed for use outside Firefox.
Registers all components at once:
import 'acorn-web';import 'acorn-web/components/moz-button';Components render with English strings by default — no setup required:
<moz-button label="Click me"></moz-button>
<moz-checkbox label="Enable feature" checked></moz-checkbox>
<moz-toggle label="Dark mode"></moz-toggle>
<moz-message-bar type="warning" message="This action cannot be undone."></moz-message-bar>
<moz-card>
<span slot="header">Card title</span>
Card body content.
</moz-card>Import shared Firefox design-system styles (tokens, resets, typography):
import 'acorn-web/styles/common-shared.css';- English (default): Components work out of the box — aria-labels, titles, and alt text are all present.
- Fluent (optional): Install
@fluent/bundleand@fluent/dom, then callinitFluent(). Alldata-l10n-idelements translate automatically. FTL files ship atdist/locales/en-US/. - Custom i18n: Set up your own
document.l10nimplementation, or set attributes (title,aria-label,alt) directly on component host elements.
No special configuration required — acorn-web ships ES modules. Assets (icons, images) are at dist/assets/ and referenced via relative URLs inside the package.
- Rust (for the transformation tool)
- Node.js >= 18 (for Storybook)
- A local Firefox source checkout
export FIREFOX_ROOT=/path/to/firefox
npm run buildOr run directly:
cargo run --release -- /path/to/firefox ./dist ./config.tomlnpm install
npm run storybookStorybook runs at http://localhost:6006.
cargo test