Import
All components are available from a single import:Component Reference
Dialogs
AlertDialog
Accessible alert dialog for confirmations and destructive actions.AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel
Dialog
General-purpose modal dialog.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.Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue
Combobox
Searchable single-select. Prefer this overSelect when there are many options — the list filters as you type and scrolls natively.
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 useDialog. It’s the primitive behind Combobox.
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 ondocument.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-glMap 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
attributionControlisn’t a prop. - Want your own look? Pass
lightStyleanddarkStyle(a style URL or a style object, likemapStyle). 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_versionto at least2.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
lightStyleanddarkStyleare used as they are.
Icons
Import icons directly fromlucide-react — they’re tree-shaken, so only the icons you use land in your bundle:
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), useDynamicIcon. 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:
nameis a Lucide name (book-open;BookOpenworks 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
fallbackcomponent. - Import it from the
/iconssubpath (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 likebg-card, text-muted-foreground, and border rather than hardcoded colours: