For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.2.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.2.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.2.0/components/app-shell.md.
  • 简体中文
  • v0.2.0
  • App Shell 应用外壳

    App Shell 提供持久导航区域与边界明确的产品工作区,是 A3S Office、网关运维和智能体控制台的顶层框架。

    Live previewHTML · CSS · JavaScript

    设计系统工作区

    应用组成预览
    实时模式

    使用稳定组件组合产品界面。

    调整视口大小或折叠导航,内容区域仍保持有界且可滚动。

    Agent sessionActive · 2 tools
    ConfigurationValidated · ACL

    用途

    <div class="app-shell" data-navigation="expanded">
      <aside data-app-navigation>...</aside>
      <main data-app-main>
        <header class="workspace-header">...</header>
        <div data-app-content>...</div>
      </main>
    </div>

    参数

    参数可选值默认目的
    data-navigationexpandedcollapsedhiddenexpanded桌面导航状态
    data-mobile-navigationopen 或省略省略移动端抽屉是否可见
    --app-shell-navigation-sizeCSS 长度15rem展开后的导航宽度
    --app-shell-navigation-collapsed-sizeCSS 长度2.875rem与 Office 对齐的图标栏宽度
    --app-shell-navigation-max-sizeCSS 长度或百分比38%展开导航最多占用的比例
    --app-shell-heightCSS 长度或 autoauto可选的有界外壳高度
    --app-shell-min-heightCSS 长度36rem外壳最小高度

    状态和变体

    App Shell 支持展开、折叠、隐藏与移动端打开状态。低于 768px 时,导航会成为限制在外壳内部的浮层;关闭状态不会接收指针或键盘交互,data-mobile-navigation="open" 会在局部遮罩之上显示导航。状态管理由宿主应用负责,以便保存用户偏好并与路由协调;预览只使用文档专用的轻量控制器。

    可访问性

    使用地标元素(asidenavmainheader)并命名每个导航区域。导航开关需要 aria-expanded 与随状态变化的可访问名称。移动导航为模态时,应组合 Drawer 来管理焦点。