src/ui/index.tsx. The shell renders it in the main content area when a pilot selects your plugin in the sidebar.
What the Shell Provides
The shell injects several libraries at runtime — you don’t need to bundle them, and the build system externalises them automatically. Import them directly:react,react-dom@tanstack/react-query,@tanstack/react-router@skyvexsoftware/stratos-sdk(hooks, UI components, types, helpers)sonner(toast notifications)socket.io-clientmaplibre-gl,react-map-gl/maplibre
lucide-react, your own utilities, third-party libraries — will be bundled into your plugin’s ui/index.js.
Using usePluginContext()
The primary way to access shell state from any component in your plugin:
usePluginContext() can be called in any component in your tree — not just the root. The context is provided by the PluginShellProvider that wraps your entire plugin.
Auth
Calling the VA’s API
For HTTP calls to the bound airline’s API, useuseVaApi(). It returns a pre-configured axios instance that attaches the bearer, sets the airline’s base_url, and transparently refreshes the access token on 401:
ctx.airline.createClient() in background modules.
Config
Read plugin settings declared in your manifest’savailableSettings. Config access in the UI module is synchronous — values are pre-loaded when your plugin mounts:
get() is the default value, returned when the setting has not been explicitly set.
Note: config.get() in the UI context reads airline-scoped plugin configuration — settings managed by the VA admin on the Skyvex platform. User-scoped settings (personal preferences like unit system, display toggles, and refresh intervals) are managed through the shell’s settings UI and are not accessible via this API.
Navigation
Navigate within your plugin or jump to other plugins and shell routes:Toast Notifications
Styling
Plugins share the shell’s Tailwind CSS theme. Use standard Tailwind utility classes:| Class | Usage |
|---|---|
bg-card | Card and panel backgrounds |
bg-muted | Subtle, secondary backgrounds |
text-muted-foreground | Secondary and supporting text |
border | Standard dividers and outlines |
bg-primary / text-primary | Accent colour (configured per-airline) |
bg-background | Page-level background |
text-foreground | Primary text |