trellis.app.app
User-facing application definition.
App Objects
class App()
User-facing application definition.
Specifies the root component to render. Created in user's module and discovered by AppLoader.
Example:
from trellis import App from myapp.components import Root
app = App(Root)
__init__
def __init__(top: Callable[[], Element]) -> None
Initialize an App with a root component.
Arguments:
top- The root component to render (a callable that returns Element)
get_wrapped_top
def get_wrapped_top(system_theme: str, theme_mode: str | None) -> Component
Return top wrapped with TrellisApp for rendering.
Arguments:
system_theme- "light" or "dark" from clienttheme_mode- "system", "light", "dark", or None (defaults to "system")
Returns:
Component wrapped with TrellisApp and ClientState