PrismX styles are local, typed and bundled with the view that owns them. There is no global cascade to debug, and no runtime style engine — appearance compiles to native property calls.
Inline attributes
The direct approach: every widget accepts style properties.
Button submitBtn = {
style = primaryBtn
text = "Submit"
radius = 8
}
Style properties are checked against what the widget actually supports. A typo is a compile error, not a silent styling miss.
Style blocks
Repeated styles become a named Style:
Style primaryBtn {
radius = 8
height = 36
bg = Color(255, 159, 67)
text_color = Color(28, 18, 8)
}
Styles are named values, referenced from any widget’s style property. Parameterized styles
are not in v0.1.0 — define each variant as its own block:
Style cardStyle {
radius = 12
stroke_width = 1
bg = Color(45, 35, 28)
border_color = Color(80, 60, 45)
}
Theming
A theme is driven by signals — a handler reacts when the theme changes:
signal ThemeChanged(value: str);
on ThemeChanged(value) {
println("theme: " + value);
}
fn main() {
emit ThemeChanged("dark");
}
Responsive rules
Responsive window.width conditionals are not in v0.1.0. Layout adapts through the container
widgets (Column gaps, Row alignment) instead.
Note: fonts, colors and spacing follow the platform’s native metrics by default, so an unthemed app already looks at home on every OS.
Next: The CLI.