Nucleus
Toolkits

Toolkits

Jewel and Material restyle the Nucleus window chrome to match your app's design system.

View as Markdown

A toolkit styles the window chrome to match the design system of your widgets. Jewel and Material ship with Nucleus and style the title bar, window controls and dialogs.

Compare the toolkits

ToolkitNative toArtifactsShips with
JewelIntelliJ Platformdev.nucleusframework:nucleus.window-jewelNucleus
Material 2Anydev.nucleusframework:nucleus.window-material2Nucleus
Material 3Anydev.nucleusframework:nucleus.window-material3Nucleus

Open a toolkit window

Call the toolkit window inside nucleusApplication { }, wrapped in the toolkit's theme:

fun main() = nucleusApplication {
    MaterialTheme {
        MaterialDecoratedWindow(onCloseRequest = ::exitApplication, title = "Settings") {
            MaterialTitleBar { Text("Settings") }
            App()
        }
    }
}

Each toolkit page lists its dependencies and imports.

Changed in 3.0

The Jewel and Material windows and dialogs exist only as NucleusApplicationScope extensions. The overloads on Compose's ApplicationScope, and the top-level Material 2 and Jewel dialogs, are gone. See Migrate from Nucleus 2.x.

To build custom chrome without a toolkit, use WindowScaffold.

What's next

  • Jewel: IntelliJ Platform chrome.
  • Material 2 and 3: chrome from a Compose MaterialTheme.
  • Windows: the DecoratedWindow API every toolkit wraps.
Was this page helpful?
Edit on GitHub

Last updated on