slint-ui-templates 0.1.0

Composable Slint UI building blocks — mother-child pattern, token-driven
Documentation
// ViewSlot — routing slot for AppShell content area.
//
// Handles visibility and fill automatically — no if-blocks, no vertical-stretch.
// Place one ViewSlot per nav destination inside AppShell or MobileShell.
//
// Usage:
//   AppShell {
//       active-slot: root.active-view;
//       slot-changed(id) => { root.active-view = id; }
//
//       ViewSlot { slot-id: "home";     active: root.active-view; HomeView {} }
//       ViewSlot { slot-id: "settings"; active: root.active-view; SettingsView {} }
//   }

/// V ie ws lo t component.
export component ViewSlot inherits Rectangle {
    /// Input property "slot-id".
    in property <string> slot-id;
    /// Input property "active".
    in property <string> active;

    visible: root.slot-id == root.active;

    @children
}