页面标题区位于应用页面顶部,说明当前位置、页面内容和可执行的操作。标题和操作分居两端,标题在起始端,操作在末端,返回上级的导航位于上方。
页面标题区
<header class="container-inline flex flex-col gap-sm"> <nav aria-label="Breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Projects</a></li> <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Atlas</a></li> <li class="breadcrumb-item"> <a class="breadcrumb-link" href="#" aria-current="page">Deployments</a> </li> </ol> </nav> <div class="flex flex-wrap items-end justify-between gap-md"> <div class="flex flex-col gap-3xs min-w(0)"> <h1 class="heading heading-xl">Deployments</h1> <p class="m(0) fg-text-muted">Every build of Atlas, newest first.</p> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M8.5 9L8.4994 1.9755A0.5 0.5 0 0 0 7.5054 1.9266L7.5 2L7.5014 9.0379A0.5007 0.5007 0 0 0 7.5892 9.285A0.7044 0.7044 0 0 0 8.4108 9.285A0.4996 0.4996 0 0 0 8.5 9Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M5 6L7.8586 8.8586A0.2 0.2 0 0 0 8.1414 8.8586L11 6" /><path d="M2.5 10.5L2.5 12.5A1 1 0 0 0 3.5 13.5L12.5 13.5A1 1 0 0 0 13.5 12.5L13.5 10.5" /> </svg>Export </button> <button type="button" class="btn btn-primary"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L13 8" /><path d="M8 3L8 13" /> </svg>New deployment </button> </div> </div></header>import DownloadIcon from '@master/icons-react/native/16/soft/download'import PlusIcon from '@master/icons-react/native/16/soft/plus'<header className="container-inline flex flex-col gap-sm"> <nav aria-label="Breadcrumb"> <ol className="breadcrumb"> <li className="breadcrumb-item"><a className="breadcrumb-link" href="#">Projects</a></li> <li className="breadcrumb-item"><a className="breadcrumb-link" href="#">Atlas</a></li> <li className="breadcrumb-item"> <a className="breadcrumb-link" href="#" aria-current="page">Deployments</a> </li> </ol> </nav> <div className="flex flex-wrap items-end justify-between gap-md"> <div className="flex flex-col gap-3xs min-w(0)"> <h1 className="heading heading-xl">Deployments</h1> <p className="m(0) fg-text-muted">Every build of Atlas, newest first.</p> </div> <div className="flex flex-wrap gap-xs"> <button type="button" className="btn"><DownloadIcon className="icon" />Export</button> <button type="button" className="btn btn-primary"> <PlusIcon className="icon" />New deployment </button> </div> </div></header><script> import DownloadIcon from '@master/icons-svelte/native/16/soft/download' import PlusIcon from '@master/icons-svelte/native/16/soft/plus'</script><header class="container-inline flex flex-col gap-sm"> <nav aria-label="Breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Projects</a></li> <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Atlas</a></li> <li class="breadcrumb-item"> <a class="breadcrumb-link" href="#" aria-current="page">Deployments</a> </li> </ol> </nav> <div class="flex flex-wrap items-end justify-between gap-md"> <div class="flex flex-col gap-3xs min-w(0)"> <h1 class="heading heading-xl">Deployments</h1> <p class="m(0) fg-text-muted">Every build of Atlas, newest first.</p> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn"><DownloadIcon class="icon" />Export</button> <button type="button" class="btn btn-primary"><PlusIcon class="icon" />New deployment</button> </div> </div></header><script setup>import DownloadIcon from '@master/icons-vue/native/16/soft/download'import PlusIcon from '@master/icons-vue/native/16/soft/plus'</script><template> <header class="container-inline flex flex-col gap-sm"> <nav aria-label="Breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Projects</a></li> <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Atlas</a></li> <li class="breadcrumb-item"> <a class="breadcrumb-link" href="#" aria-current="page">Deployments</a> </li> </ol> </nav> <div class="flex flex-wrap items-end justify-between gap-md"> <div class="flex flex-col gap-3xs min-w(0)"> <h1 class="heading heading-xl">Deployments</h1> <p class="m(0) fg-text-muted">Every build of Atlas, newest first.</p> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn"><DownloadIcon class="icon" />Export</button> <button type="button" class="btn btn-primary"> <PlusIcon class="icon" />New deployment </button> </div> </div> </header></template>区块提供可直接复制的标记,沿用所在页面的文字颜色和字号。预览在 body 上设置 fg-text-body text-sm。每个区块都是尺寸容器,按自身宽度重排,可放在宽页面、只有侧边栏宽度的区域或对话框中。
#组成
- 返回上级。 页面位于多级层级中时,在标题上方放置面包屑导航。
- 标题和一句说明。 用标题作为页面的
<h1>,再用弱化的文字颜色显示一句说明,介绍下方列表的内容。 - 操作。 将页面的核心操作设为主要按钮,放在一行的末尾,其余操作用默认按钮排在前面。
- 可换行的两端布局。 使用
flex flex-wrap items-end justify-between gap-md,在窄屏上让操作移到标题下方,并保持原有顺序。在标题列上设置min-w(0),让长标题在列内换行,为操作保留空间。
页面标题区是页面内容的一部分,会随内容一起滚动。需要始终留在视口中的栏时,使用导航栏。
#单个对象的标题区
单个项目、人员或文件的页面先展示对象本身的信息,包括标记、名称、状态和一行基本信息。次要操作收进菜单,通过一个低调的按钮打开。标题区下方的标签页用于切换该对象的不同视图。
单个对象的标题区
<header class="container-inline flex flex-col gap-md"> <div class="flex flex-wrap items-center justify-between gap-md"> <div class="flex items-center gap-sm min-w(0)"> <span class="avatar avatar-lg avatar-square" aria-hidden="true">A</span> <div class="flex flex-col gap-3xs min-w(0)"> <div class="flex flex-wrap items-center gap-xs"> <h1 class="heading heading-lg">Atlas</h1> <span class="badge badge-success badge-dot">Ready</span> </div> <p class="m(0) fg-text-muted"> atlas.dev · deployed 2 hours ago from <code class="code">main</code> </p> </div> </div> <div class="flex flex-wrap gap-xs"> <a class="btn" href="#"> Visit<svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M11.9111 3.508A0.4992 0.4992 0 0 0 11.6465 3.6465L3.6295 11.6642A0.5 0.5 0 0 0 4.2978 12.4016L4.3535 12.3535L12.3793 4.3258A0.5 0.5 0 0 0 12.492 4.0889A0.7044 0.7044 0 0 0 11.9111 3.508Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M4 4L11.8 4A0.2 0.2 0 0 1 12 4.2L12 12" /> </svg> </a> <button type="button" class="btn btn-quiet btn-square btn-hang-end" popovertarget="ph-more" aria-label="More actions"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none" /><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none" /><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none" /> </svg> </button> <div class="menu menu-end" id="ph-more" popover> <button type="button" class="menu-item" popovertarget="ph-more" popovertargetaction="hide"> Redeploy </button> <button type="button" class="menu-item" popovertarget="ph-more" popovertargetaction="hide"> Copy address </button> <hr class="menu-separator"> <button type="button" class="menu-item menu-item-danger" popovertarget="ph-more" popovertargetaction="hide"> Delete project </button> </div> </div> </div> <nav class="tabs" aria-label="Project"> <a class="tabs-item" href="#" aria-current="page">Overview</a> <a class="tabs-item" href="#">Deployments <span class="badge badge-sm badge-pill">37</span></a> <a class="tabs-item" href="#">Analytics</a> <a class="tabs-item" href="#">Settings</a> </nav></header>import ArrowUpRightIcon from '@master/icons-react/native/16/soft/arrow-up-right'import MoreHorizontalIcon from '@master/icons-react/native/16/soft/more-horizontal'<header className="container-inline flex flex-col gap-md"> <div className="flex flex-wrap items-center justify-between gap-md"> <div className="flex items-center gap-sm min-w(0)"> <span className="avatar avatar-lg avatar-square" aria-hidden="true">A</span> <div className="flex flex-col gap-3xs min-w(0)"> <div className="flex flex-wrap items-center gap-xs"> <h1 className="heading heading-lg">Atlas</h1> <span className="badge badge-success badge-dot">Ready</span> </div> <p className="m(0) fg-text-muted"> atlas.dev · deployed 2 hours ago from <code className="code">main</code> </p> </div> </div> <div className="flex flex-wrap gap-xs"> <a className="btn" href="#">Visit<ArrowUpRightIcon className="icon" /></a> <button type="button" className="btn btn-quiet btn-square btn-hang-end" popoverTarget="ph-more" aria-label="More actions"> <MoreHorizontalIcon className="icon" /> </button> <div className="menu menu-end" id="ph-more" popover=""> <button type="button" className="menu-item" popoverTarget="ph-more" popoverTargetAction="hide"> Redeploy </button> <button type="button" className="menu-item" popoverTarget="ph-more" popoverTargetAction="hide"> Copy address </button> <hr className="menu-separator" /> <button type="button" className="menu-item menu-item-danger" popoverTarget="ph-more" popoverTargetAction="hide"> Delete project </button> </div> </div> </div> <nav className="tabs" aria-label="Project"> <a className="tabs-item" href="#" aria-current="page">Overview</a> <a className="tabs-item" href="#"> Deployments <span className="badge badge-sm badge-pill">37</span> </a> <a className="tabs-item" href="#">Analytics</a> <a className="tabs-item" href="#">Settings</a> </nav></header><script> import ArrowUpRightIcon from '@master/icons-svelte/native/16/soft/arrow-up-right' import MoreHorizontalIcon from '@master/icons-svelte/native/16/soft/more-horizontal'</script><header class="container-inline flex flex-col gap-md"> <div class="flex flex-wrap items-center justify-between gap-md"> <div class="flex items-center gap-sm min-w(0)"> <span class="avatar avatar-lg avatar-square" aria-hidden="true">A</span> <div class="flex flex-col gap-3xs min-w(0)"> <div class="flex flex-wrap items-center gap-xs"> <h1 class="heading heading-lg">Atlas</h1> <span class="badge badge-success badge-dot">Ready</span> </div> <p class="m(0) fg-text-muted"> atlas.dev · deployed 2 hours ago from <code class="code">main</code> </p> </div> </div> <div class="flex flex-wrap gap-xs"> <a class="btn" href="#">Visit<ArrowUpRightIcon class="icon" /></a> <button type="button" class="btn btn-quiet btn-square btn-hang-end" popovertarget="ph-more" aria-label="More actions"> <MoreHorizontalIcon class="icon" /> </button> <div class="menu menu-end" id="ph-more" popover> <button type="button" class="menu-item" popovertarget="ph-more" popovertargetaction="hide"> Redeploy </button> <button type="button" class="menu-item" popovertarget="ph-more" popovertargetaction="hide"> Copy address </button> <hr class="menu-separator"> <button type="button" class="menu-item menu-item-danger" popovertarget="ph-more" popovertargetaction="hide"> Delete project </button> </div> </div> </div> <nav class="tabs" aria-label="Project"> <a class="tabs-item" href="#" aria-current="page">Overview</a> <a class="tabs-item" href="#">Deployments <span class="badge badge-sm badge-pill">37</span></a> <a class="tabs-item" href="#">Analytics</a> <a class="tabs-item" href="#">Settings</a> </nav></header><script setup>import ArrowUpRightIcon from '@master/icons-vue/native/16/soft/arrow-up-right'import MoreHorizontalIcon from '@master/icons-vue/native/16/soft/more-horizontal'</script><template> <header class="container-inline flex flex-col gap-md"> <div class="flex flex-wrap items-center justify-between gap-md"> <div class="flex items-center gap-sm min-w(0)"> <span class="avatar avatar-lg avatar-square" aria-hidden="true">A</span> <div class="flex flex-col gap-3xs min-w(0)"> <div class="flex flex-wrap items-center gap-xs"> <h1 class="heading heading-lg">Atlas</h1> <span class="badge badge-success badge-dot">Ready</span> </div> <p class="m(0) fg-text-muted"> atlas.dev · deployed 2 hours ago from <code class="code">main</code> </p> </div> </div> <div class="flex flex-wrap gap-xs"> <a class="btn" href="#">Visit<ArrowUpRightIcon class="icon" /></a> <button type="button" class="btn btn-quiet btn-square btn-hang-end" popovertarget="ph-more" aria-label="More actions"> <MoreHorizontalIcon class="icon" /> </button> <div class="menu menu-end" id="ph-more" popover> <button type="button" class="menu-item" popovertarget="ph-more" popovertargetaction="hide"> Redeploy </button> <button type="button" class="menu-item" popovertarget="ph-more" popovertargetaction="hide"> Copy address </button> <hr class="menu-separator"> <button type="button" class="menu-item menu-item-danger" popovertarget="ph-more" popovertargetaction="hide"> Delete project </button> </div> </div> </div> <nav class="tabs" aria-label="Project"> <a class="tabs-item" href="#" aria-current="page">Overview</a> <a class="tabs-item" href="#"> Deployments <span class="badge badge-sm badge-pill">37</span> </a> <a class="tabs-item" href="#">Analytics</a> <a class="tabs-item" href="#">Settings</a> </nav> </header></template>#带基本信息的标题区
记录的基本信息排在标题下方,用可换行的 flex 行容纳描述列表,并用细线与标题隔开。每项信息上方是小字号标签,下方是以主要前景色显示的值。
带基本信息的标题区
<header class="container-inline flex flex-col gap-lg"> <div class="flex flex-wrap items-start justify-between gap-md"> <div class="flex flex-col gap-xs min-w(0)"> <a class="link link-quiet fg-text-muted self-start" href="#"> <span aria-hidden="true">←</span>All invoices </a> <div class="flex flex-wrap items-center gap-xs"> <h1 class="heading heading-xl">Invoice 2026-0042</h1> <span class="badge badge-warning badge-dot">Due in 5 days</span> </div> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn">Download PDF</button> <button type="button" class="btn btn-primary">Pay $240.00</button> </div> </div> <dl class="flex flex-wrap gap-lg col-gap-2xl m(0) pt-md bt(1) bt-solid b-line-hair"> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Billed to</dt> <dd class="m(0) fg-text-strong">Northwind Ltd</dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Issued</dt> <dd class="m(0) fg-text-strong"><time datetime="2026-11-01">1 November 2026</time></dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Due</dt> <dd class="m(0) fg-text-strong"><time datetime="2026-11-16">16 November 2026</time></dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Amount</dt> <dd class="m(0) fg-text-strong">$240.00</dd> </div> </dl></header><header className="container-inline flex flex-col gap-lg"> <div className="flex flex-wrap items-start justify-between gap-md"> <div className="flex flex-col gap-xs min-w(0)"> <a className="link link-quiet fg-text-muted self-start" href="#"> <span aria-hidden="true">←</span>All invoices </a> <div className="flex flex-wrap items-center gap-xs"> <h1 className="heading heading-xl">Invoice 2026-0042</h1> <span className="badge badge-warning badge-dot">Due in 5 days</span> </div> </div> <div className="flex flex-wrap gap-xs"> <button type="button" className="btn">Download PDF</button> <button type="button" className="btn btn-primary">Pay $240.00</button> </div> </div> <dl className="flex flex-wrap gap-lg col-gap-2xl m(0) pt-md bt(1) bt-solid b-line-hair"> <div className="flex flex-col gap-3xs"> <dt className="text-xs fg-text-muted">Billed to</dt> <dd className="m(0) fg-text-strong">Northwind Ltd</dd> </div> <div className="flex flex-col gap-3xs"> <dt className="text-xs fg-text-muted">Issued</dt> <dd className="m(0) fg-text-strong"><time dateTime="2026-11-01">1 November 2026</time></dd> </div> <div className="flex flex-col gap-3xs"> <dt className="text-xs fg-text-muted">Due</dt> <dd className="m(0) fg-text-strong"><time dateTime="2026-11-16">16 November 2026</time></dd> </div> <div className="flex flex-col gap-3xs"> <dt className="text-xs fg-text-muted">Amount</dt> <dd className="m(0) fg-text-strong">$240.00</dd> </div> </dl></header><header class="container-inline flex flex-col gap-lg"> <div class="flex flex-wrap items-start justify-between gap-md"> <div class="flex flex-col gap-xs min-w(0)"> <a class="link link-quiet fg-text-muted self-start" href="#"> <span aria-hidden="true">←</span>All invoices </a> <div class="flex flex-wrap items-center gap-xs"> <h1 class="heading heading-xl">Invoice 2026-0042</h1> <span class="badge badge-warning badge-dot">Due in 5 days</span> </div> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn">Download PDF</button> <button type="button" class="btn btn-primary">Pay $240.00</button> </div> </div> <dl class="flex flex-wrap gap-lg col-gap-2xl m(0) pt-md bt(1) bt-solid b-line-hair"> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Billed to</dt> <dd class="m(0) fg-text-strong">Northwind Ltd</dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Issued</dt> <dd class="m(0) fg-text-strong"><time datetime="2026-11-01">1 November 2026</time></dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Due</dt> <dd class="m(0) fg-text-strong"><time datetime="2026-11-16">16 November 2026</time></dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Amount</dt> <dd class="m(0) fg-text-strong">$240.00</dd> </div> </dl></header><template> <header class="container-inline flex flex-col gap-lg"> <div class="flex flex-wrap items-start justify-between gap-md"> <div class="flex flex-col gap-xs min-w(0)"> <a class="link link-quiet fg-text-muted self-start" href="#"> <span aria-hidden="true">←</span>All invoices </a> <div class="flex flex-wrap items-center gap-xs"> <h1 class="heading heading-xl">Invoice 2026-0042</h1> <span class="badge badge-warning badge-dot">Due in 5 days</span> </div> </div> <div class="flex flex-wrap gap-xs"> <button type="button" class="btn">Download PDF</button> <button type="button" class="btn btn-primary">Pay $240.00</button> </div> </div> <dl class="flex flex-wrap gap-lg col-gap-2xl m(0) pt-md bt(1) bt-solid b-line-hair"> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Billed to</dt> <dd class="m(0) fg-text-strong">Northwind Ltd</dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Issued</dt> <dd class="m(0) fg-text-strong"><time datetime="2026-11-01">1 November 2026</time></dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Due</dt> <dd class="m(0) fg-text-strong"><time datetime="2026-11-16">16 November 2026</time></dd> </div> <div class="flex flex-col gap-3xs"> <dt class="text-xs fg-text-muted">Amount</dt> <dd class="m(0) fg-text-strong">$240.00</dd> </div> </dl> </header></template>#无障碍
- 页面标题区是位于
<main>内的<header>,其标题是页面唯一的<h1>。 - 用徽章内的文字明确表示状态,确保仅凭文字也能识别。
- 记录名称旁的字母标记重复传达了名称,因此对辅助技术隐藏该标记。
- 图标按钮有无障碍名称。它打开的菜单由一组按钮组成,按 Escape 可关闭菜单。
- 基本信息使用
<dl>,辅助技术会将每个值与对应标签一起读出。