App. App loads the component styles and provides focus navigation, overlays, and the other runtime services that toolkit components rely on.| Requirement | Detail |
|---|---|
react | ^19.2.7 peer dependency (React 19.2.7 or a later 19.x release). |
react-dom | ^19.2.7 peer dependency (React DOM 19.2.7 or a later 19.x release). |
react-router-dom | ^7.17.0. Optional peer dependency, required only if you use the @wearables-ui-toolkit/mrbd/react-router subpath. |
Module format | ECMAScript modules only. The package has no CommonJS build. Use a bundler or runtime that supports ECMAScript modules. |
Node | Version 18 or later for package tooling. |
npm install @wearables-ui-toolkit/mrbd react@^19.2.7 react-dom@^19.2.7
npm install react-router-dom@^7.17.0
npm install @wearables-ui-toolkit/icons
npm install @wearables-ui-toolkit/foundation react@^19.2.7 react-dom@^19.2.7
| Package | Use it for | npm |
|---|---|---|
@wearables-ui-toolkit/mrbd | The app shell and component catalog for Meta Ray-Ban Display glasses. Install this package for most applications. | |
@wearables-ui-toolkit/foundation | Lower-level primitives, materials, motion, focus navigation, and utilities. The main package installs and re-exports it. | |
@wearables-ui-toolkit/icons | Optional named icon exports, individual assets, and searchable icon metadata. | |
@wearables-ui-toolkit/androidx-shapes | Smooth-shape geometry installed transitively by Foundation. Most applications should not install it separately. |
App loads the text font at runtime as described in Render a first screen.App loads that stylesheet automatically. An application should not import a toolkit-wide CSS file manually.App when equal-specificity application rules must win.App fills its parent. Paint the document and mount root with the window-background semantic token so overscroll and other areas outside the app root match App. Use the token rather than a literal color.html,
body,
#root {
height: 100%;
background-color: var(--uit-color-background-window);
}
App. It loads styles and provides the runtime services required by toolkit components: fonts, focus navigation, overlays, and toast presentation.import { createRoot } from 'react-dom/client';
import { App, ListItem, Page, VerticalList } from '@wearables-ui-toolkit/mrbd';
function Inbox({ onOpenThread }: { onOpenThread: (id: string) => void }) {
return (
<Page headerText="Inbox" headerMetadata="2 new">
<VerticalList insetForHeader ariaLabel="Inbox">
<ListItem
title="Sam Rivera"
subtitle="On my way"
onClick={() => onOpenThread('sam')}
/>
<ListItem
title="Field Ops"
subtitle="Route updated"
onClick={() => onOpenThread('ops')}
/>
</VerticalList>
</Page>
);
}
createRoot(document.getElementById('root')!).render(
<App>
<Inbox onOpenThread={id => console.log('open', id)} />
</App>,
);
App reference for its props and runtime services, and the Page reference for route layout and header behavior.import {Button} from '@wearables-ui-toolkit/mrbd';
import {ListItem} from '@wearables-ui-toolkit/mrbd/ListItem';
App at its root when using component subpaths. Router-aware helpers use a separate subpath and require the optional react-router-dom peer dependency:import {
ReactRouterNavigationProvider,
ReactRouterPageTransition,
ReactRouterPreloadLink,
} from '@wearables-ui-toolkit/mrbd/react-router';
| Import specifier | Public contents |
|---|---|
@wearables-ui-toolkit/mrbd | The complete component API for Meta Ray-Ban Display glasses plus the re-exported Foundation API. |
@wearables-ui-toolkit/mrbd/styles.css | Compatibility stylesheet bundle. Ordinary applications should let App load styles automatically. |
@wearables-ui-toolkit/mrbd/react-router | Optional React Router integration. This is the only entry point that requires react-router-dom. |
@wearables-ui-toolkit/mrbd/<Component> | Supported component subpaths such as @wearables-ui-toolkit/mrbd/Button. |
@wearables-ui-toolkit/foundation | Lower-level primitives, hooks, materials, motion APIs, and types. The main package re-exports this interface. |
@wearables-ui-toolkit/foundation/components/<Component> | Supported Foundation component subpaths such as @wearables-ui-toolkit/foundation/components/Container. |
@wearables-ui-toolkit/icons | Optional named icon exports and documented asset subpaths. |
exports map are public. Do not import from dist internals. Standalone hooks, enums, motion constants, material APIs, and other exports without a documented subpath come from the package root.CardAboveScrim comes from @wearables-ui-toolkit/foundation/components/Card.@types package is needed. Because the toolkit ships only ECMAScript modules, use a module-resolution mode that understands the exports map, such as "bundler", "node16", or "nodenext".