UI component library (.p-* styles)
The launcher ships a built-in set of.p-* style components for plugins (plugin-css.ts). They are injected automatically into plugin pages and Overlay windows (Overlay window)and follow the light/dark theme. Plugins can use them without importing any CSS file.
Theme variables
All colors are defined through CSS variables that follow the launcher’s light/dark theme automatically:How theme following works
- Plugin pages and Overlay windows follow the launcher’s light/dark theme automatically: the launcher injects the current theme’s CSS variables into the plugin environment (synced via the
__qomicex_themepostMessage), so light/dark switches take effect immediately. - The plugin
bodybackground is transparent, exposing the launcher background (the plugin container needs no background of its own; just use the CSS variables). - Theme variables are available both in plugin pages (inline/sandbox) and in Overlay windows (iframe).
Component list
Card
Button
--primary --default --ghost --danger --outline; size: --sm
Input / Textarea
Badge
Tabs
data-p-tabpoints to a panel withid="panel-{name}".- Click-to-switch is handled automatically by the injected script; you do not need to write any JS.
- Supported in Overlay windows as well.
Switch
- In an Overlay window, to use a Switch to show or hide a panel, add
data-p-switch="panelId"to the input and the script toggles the matchingidelement automatically.
Checkbox
Progress
--indeterminate indeterminate, --danger danger, --warn warning
Spinner
Empty state
Alert
Table
Select
Menu
Tooltip
Color picker
Icons (React components)
Icons ship with the component library: synchronous, zero IPC, tree-shakeable. In React plugins do not hand-roll SVGs, and do not wrap thegetIconSvg bridge yourself.
<Glyph> — per-icon static import (recommended)
- The subpath is the class name without the
fa-solid fa-prefix; brand icons addbrand-(fa-brands fa-github→@qomicex/plugin-ui/icons/brand-github) - The export name is PascalCase +
Icon - The bundler keeps only the icons you import, and a wrong icon name fails at build time instead of reaching the runtime
- Filled with
currentColor, so it follows the theme automatically; passlabelfor an accessible name
<Icon> — when the icon name comes from runtime data
name is a runtime string the bundler cannot analyse, so the entire icon table (~160KB) is
lazily loaded as a separate chunk — only downloaded when an <Icon> actually renders. Prefer
<Glyph> whenever the name is known at compile time.
Unknown names render null (no empty gap) and console.warn in dev builds.
Discovering icons
await __PLUGIN_API__.call('listIcons').
Do not hardcode an icon list — the built-in table evolves with the launcher, so
listIcons() / ICON_NAMES are the authoritative sources.
Layout and utilities
.p-row--wrap--between,.p-col.p-icon--lg,.p-divider.p-hr.p-separator,.p-status-dot --up/--down/--warn,.p-pre- Spacing:
.p-mt-1/2/3.p-mb-1/2/3.p-gap-1/2/3 - Text:
.p-text-center.p-text-muted.p-text-sm/xs/lg.p-font-mono - Other:
.p-ml-auto.p-truncate.p-rounded