Skip to main content
The SDK re-exports a curated set of shadcn/ui components that are already themed to match the Stratos shell. Use these instead of installing your own UI library to stay visually consistent across plugins.

Import

All components are available from a single import:

Component Reference

Dialogs

AlertDialog

Accessible alert dialog for confirmations and destructive actions.
Sub-components: AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel

Dialog

General-purpose modal dialog.
Sub-components: Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger

Forms

Input

Single-line text input.

Textarea

Multi-line text input.

Select

Dropdown select menu.
Sub-components: Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue

Combobox

Searchable single-select. Prefer this over Select when there are many options — the list filters as you type and scrolls natively.
Props: options ({ value, label, group? }[]; options sharing a group render under that heading, in first-seen order, and options without one stay flat at the top), value, onValueChange, placeholder, searchPlaceholder, emptyText, loading, loadingText, disabled, triggerClassName, contentClassName, align, onOpenChange, id, aria-label, aria-labelledby. Pass loading while options are being fetched to avoid a flickering empty state. Pass aria-label or aria-labelledby to give the trigger an accessible name; the search field inside the popover inherits aria-label automatically.

RadioGroup

Radio button group for mutually exclusive choices.

Slider

Range slider for numeric values.

Switch

Toggle switch for boolean settings.

Layout

Card

Elevated container for grouping related content.

Separator

Horizontal or vertical visual divider.

Tabs

Tabbed content panels.

Popover

Floating panel anchored to a trigger. Use it for lightweight overlays (filters, pickers, info panels); for modal flows use Dialog. It’s the primitive behind Combobox.
Sub-components: Popover, PopoverTrigger, PopoverAnchor, PopoverContent

Feedback

Badge

Inline status label or tag.

Button

Primary interactive element.

Tooltip

Non-interactive contextual hint. The content renders in a portal on document.body, so it isn’t clipped by a dialog or an overflow-hidden parent. Stratos already wraps plugin UI in a TooltipProvider with no open delay, so a plugin only needs its own provider to change that timing.

Maps

StratosMap

A react-map-gl Map in the Stratos map style, light or dark to match the theme, switching as soon as the theme changes. Every other prop (your onLoad included), the ref and the children (Source, Layer, Marker and the rest) work as they do on Map; there’s no mapStyle to set.
  • The attribution is always the compact one, tucked behind its info button until it’s opened, so attributionControl isn’t a prop.
  • Want your own look? Pass lightStyle and darkStyle (a style URL or a style object, like mapStyle). Either one you leave out stays the Stratos style.
  • It tells Stratos when it has finished drawing the theme showing, so the debug footer’s Screenshot waits for it and both shots show the right map.
  • It needs SDK 0.23.0 and Stratos core 2.52.0 or later, so set min_core_version to at least 2.52.0.
  • If the graphics driver can’t draw the map (often just after the PC wakes from sleep), only the map is replaced, by a “Map unavailable” panel with a Try again button; the rest of your page keeps working.
  • The Stratos style shows English place names (or the local name where there’s no English one) and leaves out village, hamlet, highway shield and minor road labels. Your own lightStyle and darkStyle are used as they are.

Icons

Import icons directly from lucide-react — they’re tree-shaken, so only the icons you use land in your bundle:
The shell provides a single React instance to all plugins via the SDK’s Vite shim, so lucide-react’s own React imports resolve to the same instance — no two-React crashes, no bundle duplication.

DynamicIcon

For an icon picked by name at runtime (say, from an airline setting), use DynamicIcon. Stratos ships every Lucide icon as its own small chunk and loads one only when it’s shown, so your plugin carries none of the icon set:
  • name is a Lucide name (book-open; BookOpen works too). Other props (size, className, strokeWidth, …) go to the icon.
  • Until the icon has loaded it renders an empty box the same size, so nothing shifts. An unknown name shows a small generic icon, or your fallback component.
  • Import it from the /icons subpath (SDK 0.21.0+): that part is bundled into your plugin, so it works on any Stratos. It needs Stratos core 2.49.0 or later to load icons; on an older core it shows the generic icon.
  • Icons you know at build time are still best imported by name from lucide-react, which is bundled and tree-shaken.

Styling Notes

All components use the shell’s Tailwind theme tokens automatically. Dark mode is handled for you — use semantic class names like bg-card, text-muted-foreground, and border rather than hardcoded colours:
Key theme tokens: