Optional Peers
AuraGlass keeps advanced dependencies optional by feature family, including charts, Radix controls, 3D, AI, and media surfaces.
#Peer Matrix
Install peers for the components you import. Do not add 3D, AI, chart, realtime, or media dependencies to apps that only use cards, buttons, navigation, and layout surfaces.
When an import fails at runtime, first identify the feature family. A missing chart peer should not lead to installing Three.js. A command palette needing icons should not lead to installing AI SDKs.
#Install Commands by Family
Use these commands only when the selected component family needs them. Keep the core install separate from feature installs so dependency review is understandable in pull requests.
Some advanced features also need application configuration: API keys, realtime URLs, media permissions, or server routes. The peer package only provides the client capability; it does not replace app-level infrastructure.
# Core
npm install aura-glass
# Charts
npm install chart.js react-chartjs-2
# Forms
npm install react-hook-form
# 3D / spatial
npm install three @react-three/fiber @react-three/drei
# Icons / command surfaces
npm install lucide-react#Failure Symptoms
A missing optional peer usually appears as a module resolution error during build or route load. An unconfigured service usually appears as an empty state, auth error, or network error inside the app. Treat those differently.
If a docs example renders without styles, that is not an optional peer issue. It means `aura-glass/styles` is missing or loaded in the wrong place.
#Agent Rule
AI agents should not install optional peers preemptively. They should name the component family, list the required peers, add only those packages, and report why each dependency was added.
For recipes, keep the peer list beside the code block. A copied recipe should make the dependency cost visible before the developer pastes it into an app.