Dynamic
Runtime-driven styles using state-controlled className, inline styles, and C++ interop.
Files
| File | Description |
|---|---|
src/App.mx |
JSX template with dynamic classes and styles |
src/native.cpp |
C++ helper function |
src/style.css |
Animation and theme styles |
morph.config.json |
Window config (500×400) |
Features Demonstrated
morphStatecontrollingtheme,width,accent,message,sig- Template-literal className driven by state
- Inline
styleobjects bound to state import { getTheme } from './native.cpp'interopfetch()async in a coroutine with loading state- CSS
@keyframesfor animations - Theme toggle switching className and style props reactively
Run
morph runSee the full README for more details.