UI Skins System¶
r0astr features a powerful skin system that allows complete customization of the UI layout and visual theme through modular skin packages.
What Are Skins?¶
Skins in r0astr are self-contained packages that define:
- HTML Templates - Panel layout, slider controls, UI components
- CSS Theme - Visual styling, colors, spacing, animations
- Manifest - Metadata, configuration, and CSS variable overrides
Unlike traditional themes that only change colors, r0astr skins can completely restructure the UI layout while maintaining compatibility with the underlying JavaScript.
Features¶
✅ Complete Layout Control - Change from tree layout to grid, tabs, or floating windows ✅ Visual Customization - Override colors, fonts, spacing, animations ✅ Configurable Hover Interactions - Define custom hover targets for menus and UI elements ✅ Offline-First - Skins bundled with app, no external dependencies ✅ Hot-Swappable - Switch skins from settings without page reload ✅ Community Shareable - Package and distribute custom skins ✅ Browser & Electron - Works in all deployment modes
Included Skins¶
Default (Tree Layout)¶
The standard r0astr interface with collapsible tree-structured panels, inline sliders, and floating visualizers.
Features:
- Vertical tree layout
- Collapsible details panels
- Badge-based panel numbering
- Material icons
- Drag-to-reorder panels
- Top banner hover trigger for menu access
Glass (Glassmorphism)¶
Modern frosted glass design with translucent panels, backdrop blur, and multi-point hover interactions.
Features:
- Dark purple gradient background
- Frosted glass panels with backdrop blur
- Glowing cyan accents
- Left-edge menu trigger (vertical slide-out)
- Bottom metronome trigger (glass strip)
- Pulsing glow animations on playing panels
How Skins Work¶
Storage¶
Your selected skin is stored in:
- Browser:
localStorageas part of r0astr-settings - Electron:
userData/r0astr-settings.json - GitHub Pages: Browser localStorage (persists across sessions)
Loading Sequence¶
- Startup: App loads settings from localStorage
- Skin Load: Fetch manifest from
/skins/{skinName}/skin.json - CSS Injection: Add skin's
theme.cssto document head - Template Compilation: Parse HTML templates into JavaScript functions
- Rendering: Use templates when creating panels/sliders
- Caching: Templates cached in memory for fast rendering
Performance¶
- Initial Load: ~50-100ms (one-time fetch + compile)
- Rendering: <1ms per panel (templates cached in memory)
- No I/O: After initial load, all rendering is in-memory
Using Skins¶
Switching Skins¶
- Click CONFIG button in top menu (hover top banner area to reveal menu)
- Navigate to Integrations section
- Select skin from UI Skin / Theme dropdown
- Click Save
- UI updates instantly - no reload needed!
Hot-Reload
Skins hot-reload automatically when you save settings. Your panel state is preserved during the transition.
Hover Targets System¶
Skins can define custom hover targets that control when and how UI elements appear. This allows for edge-based menus, corner triggers, and interactive regions.
How It Works¶
- Manifest Definition - Skin defines hover targets in
skin.json - DOM Injection - skinManager creates invisible hover regions
- CSS Control - Skin CSS positions targets and defines interactions
- Pure CSS - No JavaScript needed for hover behaviors
Example: Glass Skin¶
The Glass skin demonstrates multi-point hover interactions:
Left Edge (15px cyan glow):
Top-Right Corner (pulsing hint):
Bottom Strip (visible glass bar):
Hover Target Hints¶
Skins can use different visual hints for discoverability:
subtle-glow- Faint edge glow (Glass left edge)pulse- Pulsing animation (Glass top corner)visible- Always visible strip (Glass bottom)banner- Inherit existing banner visibility (Default)none- Completely invisible
Creating Your Own Skin¶
Ready to create a custom skin? Head to Creating Skins for a complete tutorial.
Quick Start¶
# Create skin folder
mkdir -p public/skins/my-custom-skin/templates
# Copy default templates as starting point
cp -r public/skins/default/templates/* public/skins/my-custom-skin/templates/
# Create theme CSS
touch public/skins/my-custom-skin/theme.css
# Build and test
npm run build
Architecture¶
Template System¶
r0astr uses a simple Mustache-style templating engine:
<!-- Template -->
<span class="panel-title">{{title}}</span>
<!-- Rendered -->
<span class="panel-title">Instrument 1</span>
Required CSS Classes¶
For JavaScript functionality to work, templates must include specific CSS classes:
| Class | Purpose |
|---|---|
.panel-tree |
Main container |
.level-panel |
Panel wrapper |
.panel-title |
Editable title |
.code-editor |
CodeMirror mount |
.btn-playback |
Play/pause button |
.panel-controls-container |
Sliders area |
Technical Details¶
For developers interested in the implementation:
- SkinManager:
/src/managers/skinManager.js - Template Compilation: Simple regex-based Mustache engine
- Integration: panelManager.js, sliderManager.js use
skinManager.render() - Initialization:
main.jsloads skin before rendering UI
License¶
Skins inherit the project's AGPL-3.0 license unless otherwise specified in skin.json.
Next Steps¶
- Creating Skins Tutorial - Step-by-step guide
- Skin Gallery - Browse community skins (coming soon)