Theming
A ToolPickerTheme sets the picker's material, every colour, the hairline, the shadows, the corner radius, and the barrel and eraser colours. Without theme, the picker follows the system colour scheme with the light and dark presets.
Presets
| Preset | Glass on iOS 26+ | Look |
|---|---|---|
light | ✅ | Light bar, default in light mode |
dark | ✅ | Dark bar, default in dark mode |
solidLight | ❌ | Light bar everywhere |
solidDark | ❌ | Dark bar everywhere |
Spread a preset and override a few fields:
import { ToolPicker, toolPickerThemes } from 'nitro-ui-sketch'
;<ToolPicker
tool={tool}
onToolChange={setTool}
theme={{ ...toolPickerThemes.dark, cornerRadius: 24 }}
/>
The same theme works on every part, so a custom layout matches the picker.
Liquid Glass
On iOS 26 and later, light and dark draw the bar and the options card on Liquid Glass. Elsewhere, including Android, they fall back to the theme's background.
// Clear, tinted glass.
theme={{ ...toolPickerThemes.light, glass: { style: 'clear', tint: '#007aff33' } }}
// A solid bar everywhere.
theme={{ ...toolPickerThemes.light, glass: undefined }}
theme={toolPickerThemes.solidLight}
| Glass style | Look |
|---|---|
regular | Frosts what is behind it. |
clear | Stays see-through; needs a busy backdrop to read well. |
Glass for your own panels
GlassBackground is the same material, exported for your own panels. It takes no children: place it absolutely behind them and give it the container's corner radius.
import { GlassBackground } from 'nitro-ui-sketch'
import { View } from 'nitro-ui-renderer'
;<View layout={{ padding: 12 }} style={{ cornerRadius: 20 }}>
<GlassBackground
glassStyle="regular"
fallbackColor={0xf7f7f8f2}
style={{ cornerRadius: 20 }}
layout={{ position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 }}
/>
{/* panel content */}
</View>