網站導覽

元件

圖例

為每種教學用色配上可見名稱。

背景、主體與比較對象

01
02
03
  • Context
  • Subject
  • Comparison

結果

  • Measured
  • Passes
  • Fails

使用於 Axes.

用法與介面

DemoLegend 會根據 items 呈現 ul.ui-legend:每個 { label, tone } 都會成為一個包含色塊與名稱的清單項目。請放在托盤圖說中或展示區旁。

<Demo caption={<DemoLegend items={[{ label: 'Subject', tone: 'blue' }, { label: 'Comparison', tone: 'violet' }]} />}>  …</Demo>
<ul class="ui-legend" aria-label="Legend">  <li><i data-tone="blue" aria-hidden="true"></i>Subject</li>  <li><i data-tone="violet" aria-hidden="true"></i>Comparison</li></ul>