What's New
Breaking Changes
- Renamed
Animateclass toApp- The main interactive display class is now calledAppfor cleaner naming - All demos, tests, and documentation updated to use
App
New Features
- Window abstraction - New
Windowclass for runtime window controlapp.window.set_title("New Title")- Change browser tab titleapp.window.dark()/app.window.light()- Toggle themesapp.window.resize(width, height)- Resize windowapp.window.fullscreen()- Make window fullscreen
- WindowConfig - Configuration dataclass with factory presets
WindowConfig.compact()- 600x400WindowConfig.standard()- 1024x768WindowConfig.wide()- 1400x900WindowConfig.dark()- Dark theme preset
- CSS theme variables - Light and dark theme support via CSS variables
Example
from animaid import App, HTMLString
with App(title="My App", theme="dark") as app:
app.add(HTMLString("Hello World!").bold())
# Runtime window control
app.window.set_title("Updated Title")
app.window.light() # Switch to light themeMigration
Simply replace Animate with App and anim with app:
# Before
from animaid import Animate
with Animate() as anim:
anim.add(...)
# After
from animaid import App
with App() as app:
app.add(...)