統計區塊用幾個數字支持主張,每個數字下方都有一小段說明。數字是視覺焦點,以大字級和高對比文字色呈現,標籤則低調呈現。通常放四個就很合適。
統計數字
<section class="container-inline px-lg py-4xl" aria-labelledby="stats-title"> <div class="flex flex-col gap-2xl max-w(1040) mx-auto"> <header class="flex flex-col gap-sm max-w(560)"> <p class="eyebrow">In numbers</p> <h2 class="heading heading-2xl" id="stats-title">Quiet, at a very large scale.</h2> </header> <dl class="grid gap-xl m(0) grid-cols(2) grid-cols(4)@container(--4xl) pt-xl bt(1) bt-solid b-line-hair"> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div></section><section className="container-inline px-lg py-4xl" aria-labelledby="stats-title"> <div className="flex flex-col gap-2xl max-w(1040) mx-auto"> <header className="flex flex-col gap-sm max-w(560)"> <p className="eyebrow">In numbers</p> <h2 className="heading heading-2xl" id="stats-title">Quiet, at a very large scale.</h2> </header> <dl className="grid gap-xl m(0) grid-cols(2) grid-cols(4)@container(--4xl) pt-xl bt(1) bt-solid b-line-hair"> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Deployments a day</dt> <dd className="m(0) heading heading-2xl">2.4M</dd> </div> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Median build</dt> <dd className="m(0) heading heading-2xl">38 s</dd> </div> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Regions</dt> <dd className="m(0) heading heading-2xl">14</dd> </div> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Uptime, last year</dt> <dd className="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div></section><section class="container-inline px-lg py-4xl" aria-labelledby="stats-title"> <div class="flex flex-col gap-2xl max-w(1040) mx-auto"> <header class="flex flex-col gap-sm max-w(560)"> <p class="eyebrow">In numbers</p> <h2 class="heading heading-2xl" id="stats-title">Quiet, at a very large scale.</h2> </header> <dl class="grid gap-xl m(0) grid-cols(2) grid-cols(4)@container(--4xl) pt-xl bt(1) bt-solid b-line-hair"> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div></section><template> <section class="container-inline px-lg py-4xl" aria-labelledby="stats-title"> <div class="flex flex-col gap-2xl max-w(1040) mx-auto"> <header class="flex flex-col gap-sm max-w(560)"> <p class="eyebrow">In numbers</p> <h2 class="heading heading-2xl" id="stats-title">Quiet, at a very large scale.</h2> </header> <dl class="grid gap-xl m(0) grid-cols(2) grid-cols(4)@container(--4xl) pt-xl bt(1) bt-solid b-line-hair"> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div> </section></template>區塊提供可直接複製的標記,沿用頁面的文字顏色和字級。預覽在 body 上設定 fg-text-body text-sm。每個區塊都是尺寸容器,會依自身寬度重新排列。
#組成
- 描述清單。 在
<dl>裡,用<div>將標籤<dt>和數字<dd>包成一組,輔助技術便會將兩者成對讀出。依描述清單的規則,標籤在原始碼中排在前面,再對群組套用flex-col-reverse,讓數字顯示在上方。兩種順序都讀得通,因此可以安全地反轉顯示順序。 - 數字沿用標題的字體樣式。 在
<dd>上套用heading heading-2xl,讓數字具有標題的字級、高對比文字色和緊密的字距,同時保留原有語意。 - 先排兩欄,再排四欄。
grid-cols(2) grid-cols(4)@container(--4xl):區塊寬度達 56rem 時,每列排四欄。 - 在這列上方加一條細線,用
bt(1) bt-solid b-line-hair將數字與上方的標題區連在一起。
如果應用程式裡的數字需要在上方顯示標籤、在旁邊顯示變化量,請使用統計數值元件,並參考儀表板的版面配置。
#放在面板上
把每個數字各放在一個面板上,再把面板放進同一個托盤,彼此相隔 4px。
放在面板上
<section class="container-inline px-lg py-4xl" aria-label="Atlas in numbers"> <dl class="tray grid gap(4) max-w(1040) mx-auto m(0) grid-cols(2) grid-cols(4)@container(--4xl)"> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl></section><section className="container-inline px-lg py-4xl" aria-label="Atlas in numbers"> <dl className="tray grid gap(4) max-w(1040) mx-auto m(0) grid-cols(2) grid-cols(4)@container(--4xl)"> <div className="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt className="fg-text-muted">Deployments a day</dt> <dd className="m(0) heading heading-2xl">2.4M</dd> </div> <div className="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt className="fg-text-muted">Median build</dt> <dd className="m(0) heading heading-2xl">38 s</dd> </div> <div className="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt className="fg-text-muted">Regions</dt> <dd className="m(0) heading heading-2xl">14</dd> </div> <div className="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt className="fg-text-muted">Uptime, last year</dt> <dd className="m(0) heading heading-2xl">99.99%</dd> </div> </dl></section><section class="container-inline px-lg py-4xl" aria-label="Atlas in numbers"> <dl class="tray grid gap(4) max-w(1040) mx-auto m(0) grid-cols(2) grid-cols(4)@container(--4xl)"> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl></section><template> <section class="container-inline px-lg py-4xl" aria-label="Atlas in numbers"> <dl class="tray grid gap(4) max-w(1040) mx-auto m(0) grid-cols(2) grid-cols(4)@container(--4xl)"> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="sheet sheet-raised flex flex-col-reverse gap-3xs p-lg"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </section></template>#與論點並排
當數字用來支持論點時,將兩者並排。區塊寬度達 56rem 時,一欄放論述文字,另一欄將數字排成兩欄兩列。
與論點並排
<section class="container-inline px-lg py-4xl" aria-labelledby="stats-split-title"> <div class="grid gap-2xl items-center max-w(1040) mx-auto grid-cols(2)@container(--4xl)"> <header class="flex flex-col gap-sm"> <p class="eyebrow">Reliability</p> <h2 class="heading heading-2xl" id="stats-split-title"> We publish the numbers we are held to. </h2> <p class="lead"> Measured from outside our network, every minute, and posted on a public status page. </p> <a class="link self-start mt-xs" href="#">See the status page</a> </header> <dl class="grid gap-xl row-gap-2xl grid-cols(2) m(0)"> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div></section><section className="container-inline px-lg py-4xl" aria-labelledby="stats-split-title"> <div className="grid gap-2xl items-center max-w(1040) mx-auto grid-cols(2)@container(--4xl)"> <header className="flex flex-col gap-sm"> <p className="eyebrow">Reliability</p> <h2 className="heading heading-2xl" id="stats-split-title"> We publish the numbers we are held to. </h2> <p className="lead"> Measured from outside our network, every minute, and posted on a public status page. </p> <a className="link self-start mt-xs" href="#">See the status page</a> </header> <dl className="grid gap-xl row-gap-2xl grid-cols(2) m(0)"> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Deployments a day</dt> <dd className="m(0) heading heading-2xl">2.4M</dd> </div> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Median build</dt> <dd className="m(0) heading heading-2xl">38 s</dd> </div> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Regions</dt> <dd className="m(0) heading heading-2xl">14</dd> </div> <div className="flex flex-col-reverse gap-3xs"> <dt className="fg-text-muted">Uptime, last year</dt> <dd className="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div></section><section class="container-inline px-lg py-4xl" aria-labelledby="stats-split-title"> <div class="grid gap-2xl items-center max-w(1040) mx-auto grid-cols(2)@container(--4xl)"> <header class="flex flex-col gap-sm"> <p class="eyebrow">Reliability</p> <h2 class="heading heading-2xl" id="stats-split-title"> We publish the numbers we are held to. </h2> <p class="lead"> Measured from outside our network, every minute, and posted on a public status page. </p> <a class="link self-start mt-xs" href="#">See the status page</a> </header> <dl class="grid gap-xl row-gap-2xl grid-cols(2) m(0)"> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div></section><template> <section class="container-inline px-lg py-4xl" aria-labelledby="stats-split-title"> <div class="grid gap-2xl items-center max-w(1040) mx-auto grid-cols(2)@container(--4xl)"> <header class="flex flex-col gap-sm"> <p class="eyebrow">Reliability</p> <h2 class="heading heading-2xl" id="stats-split-title"> We publish the numbers we are held to. </h2> <p class="lead"> Measured from outside our network, every minute, and posted on a public status page. </p> <a class="link self-start mt-xs" href="#">See the status page</a> </header> <dl class="grid gap-xl row-gap-2xl grid-cols(2) m(0)"> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Deployments a day</dt> <dd class="m(0) heading heading-2xl">2.4M</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Median build</dt> <dd class="m(0) heading heading-2xl">38 s</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Regions</dt> <dd class="m(0) heading heading-2xl">14</dd> </div> <div class="flex flex-col-reverse gap-3xs"> <dt class="fg-text-muted">Uptime, last year</dt> <dd class="m(0) heading heading-2xl">99.99%</dd> </div> </dl> </div> </section></template>#無障礙
- 將單位寫進數字裡(「38 s」、「99.99%」),即使沒有標籤也能理解。
- 如果數字會隨時間變動,在附近標明日期。
- 不要用動畫讓數字逐步增加。這會讓讀者更晚看到實際數值,也沒有傳達額外資訊。