Build or modify Compose Desktop UI using JetBrains Jewel components, theming, and icon loading. Use when requests mention Jewel, IntUiTheme, SwingBridgeTheme, AllIconsKeys, IconKey, PainterHint, or migration from Material/Compose widgets to Jewel in either standalone apps or IntelliJ Platform plugins.
Implement UI with Jewel by first selecting the runtime context, then applying the correct theme wrapper, then using Jewel components and icon APIs.
Standalone:
IntUiTheme(isDark = false) {
App()
}
IntelliJ plugin:
SwingBridgeTheme {
App()
}
Icon loading:
object MyIcons {
val Settings = PathIconKey("icons/settings.svg", MyIcons::class.java)
}
Icon(key = MyIcons.Settings, contentDescription = "Settings")
Decide runtime before writing code:
SwingBridgeThemeIntUiTheme and standalone Jewel dependencies.If context is unclear, inspect build files and imports first:
org.jetbrains.jewel.bridge.theme.SwingBridgeTheme implies plugin context.org.jetbrains.jewel.intui.standalone.theme.IntUiTheme implies standalone context.Use STANDALONE-VS-BRIDGE.md for dependency and wrapper snippets.
Use the simplest valid theme API first:
IntUiTheme(isDark = ...).IntUiTheme(theme = ..., styling = ..., swingCompatMode = ...).SwingBridgeTheme { ... }.When implementing custom standalone themes:
ThemeDefinition via JewelTheme.lightThemeDefinition(...) or JewelTheme.darkThemeDefinition(...).JewelTheme.createDefaultTextStyle() and JewelTheme.createEditorTextStyle().ComponentStyling.default().with(...) (or specialized style builders).Use THEMING.md for concrete patterns. Use THEMING-COLORS.md for color-palette and semantic-color guidance. Use TYPOGRAPHY.md for text-style guidance and when-to-use rules.
Prefer Jewel components from org.jetbrains.jewel.ui.component over Material equivalents.
When converting existing UI:
Button, TextField, Checkbox, Tabs, etc.).Use local samples as source-of-truth examples:
Use LAYOUT-PATTERNS.md for composition archetypes extracted from those sample apps. Use COMPONENTS-CATALOG.md for component-by-component catalog guidance.
Use IconKey-based loading for portability across standalone and bridge:
PathIconKey(path, iconClass) when icon path is the same across old/new UI.IntelliJIconKey(oldUiPath, newUiPath, iconClass) when paths differ.Icon(key = ..., contentDescription = ...) or Image(iconKey = ...) instead of deprecated raw painterResource.AllIconsKeys for IntelliJ platform icons.When using AllIconsKeys in standalone apps, ensure IntelliJ icons are on classpath (recommended: com.jetbrains.intellij.platform:icons).
Use PainterHint only when stateful/dynamic path or runtime icon patching behavior is required.
Use ICONS.md for icon patterns and pitfalls.
When citing source in responses, prefer master links for always-latest behavior:
Treat this skill as Jewel-version scoped.
master links with release-tag links.Before finishing:
IntUiTheme vs SwingBridgeTheme).IconKey and classpath-friendly resource resolution.For deep Compose-in-Swing integration flows (tool windows, ComposePanel wrappers, compositing flags, AWT bridging), use jewel-swing-interop.