Toolkits
Toolkits
Jewel and Material restyle the Nucleus window chrome to match your app's design system.
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
| Toolkit | Native to | Artifacts | Ships with |
|---|---|---|---|
| Jewel | IntelliJ Platform | dev.nucleusframework:nucleus.window-jewel | Nucleus |
| Material 2 | Any | dev.nucleusframework:nucleus.window-material2 | Nucleus |
| Material 3 | Any | dev.nucleusframework:nucleus.window-material3 | Nucleus |
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
DecoratedWindowAPI every toolkit wraps.
Was this page helpful?
Edit on GitHub
Last updated on