内容
图标框
标题旁的小型凹面图标框,让图标保持原有尺寸。
本页内容
图标框是放置图标的小凹槽,常见于标题旁、空状态视图顶部或一排功能介绍中。它让图标保持合适的尺寸并居中,同时为图标提供一层材质,使图标看起来像一个标识,而不是一个孤零零的字形。图标框只是装饰,不是控件:用 aria-hidden 将它隐藏,由旁边的文字说明含义。
图标框
<span class="icon-frame" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M10.6071 2.4206L16.8571 5.8928A1.25 1.25 0 0 1 17.5 6.9855L17.5 13.4312A1.25 1.25 0 0 1 16.857 14.5239L10.607 17.9961A1.25 1.25 0 0 1 9.393 17.9961L3.143 14.5239A1.25 1.25 0 0 1 2.5 13.4312L2.5 6.9855A1.25 1.25 0 0 1 3.1429 5.8928L9.3929 2.4206A1.25 1.25 0 0 1 10.6071 2.4206Z" /><path d="M5.7036 4.4702L6.8934 3.8092L13.75 7.6183L16.857 5.8928A1.2493 1.2493 0 0 1 17.4998 6.9651L10.625 10.7844V17.9861A1.2511 1.2511 0 0 1 9.375 17.9861V10.7844L2.5002 6.9651A1.25 1.25 0 0 1 3.1435 5.8925L10 9.7017L12.4631 8.3333L5.9092 4.6906A0.6265 0.6265 0 0 1 5.7036 4.4702Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> </svg></span>import PackageIcon from '@master/icons-react/native/20/soft/package'<span className="icon-frame" aria-hidden="true"><PackageIcon className="icon" /></span><script> import PackageIcon from '@master/icons-svelte/native/20/soft/package'</script><span class="icon-frame" aria-hidden="true"><PackageIcon class="icon" /></span><script setup>import PackageIcon from '@master/icons-vue/native/20/soft/package'</script><template> <span class="icon-frame" aria-hidden="true"><PackageIcon class="icon" /></span></template>#尺寸
凹槽默认为 48px,内含 20px 的图标。每种尺寸都采用对应角色的圆角,因此图标框在各个尺寸下看起来都是同一种形状:32px 使用小号控件的圆角,40px 使用常规控件的圆角,48px 使用大号控件的圆角,64px 使用表面的圆角。
尺寸
<span class="icon-frame icon-frame-xs" aria-hidden="true"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"> <path d="M8.4856 1.9365L13.4856 4.7142A1 1 0 0 1 14 5.5884L14 10.7449A1 1 0 0 1 13.4857 11.6191L8.4857 14.3969A1 1 0 0 1 7.5143 14.3969L2.5143 11.6191A1 1 0 0 1 2 10.7449L2 5.5884A1 1 0 0 1 2.5144 4.7142L7.5144 1.9365A1 1 0 0 1 8.4856 1.9365Z" /><path d="M2.0001 5.572A1 1 0 0 1 2.5148 4.714L8 7.7613L13.4856 4.7142A1 1 0 0 1 13.9999 5.572L8.5 8.6275V14.389A1.0011 1.0011 0 0 1 7.5 14.389V8.6275L2.0001 5.572Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> </svg></span><span class="icon-frame icon-frame-sm" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M10.6071 2.4206L16.8571 5.8928A1.25 1.25 0 0 1 17.5 6.9855L17.5 13.4312A1.25 1.25 0 0 1 16.857 14.5239L10.607 17.9961A1.25 1.25 0 0 1 9.393 17.9961L3.143 14.5239A1.25 1.25 0 0 1 2.5 13.4312L2.5 6.9855A1.25 1.25 0 0 1 3.1429 5.8928L9.3929 2.4206A1.25 1.25 0 0 1 10.6071 2.4206Z" /><path d="M5.7036 4.4702L6.8934 3.8092L13.75 7.6183L16.857 5.8928A1.2493 1.2493 0 0 1 17.4998 6.9651L10.625 10.7844V17.9861A1.2511 1.2511 0 0 1 9.375 17.9861V10.7844L2.5002 6.9651A1.25 1.25 0 0 1 3.1435 5.8925L10 9.7017L12.4631 8.3333L5.9092 4.6906A0.6265 0.6265 0 0 1 5.7036 4.4702Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> </svg></span><span class="icon-frame" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M10.6071 2.4206L16.8571 5.8928A1.25 1.25 0 0 1 17.5 6.9855L17.5 13.4312A1.25 1.25 0 0 1 16.857 14.5239L10.607 17.9961A1.25 1.25 0 0 1 9.393 17.9961L3.143 14.5239A1.25 1.25 0 0 1 2.5 13.4312L2.5 6.9855A1.25 1.25 0 0 1 3.1429 5.8928L9.3929 2.4206A1.25 1.25 0 0 1 10.6071 2.4206Z" /><path d="M5.7036 4.4702L6.8934 3.8092L13.75 7.6183L16.857 5.8928A1.2493 1.2493 0 0 1 17.4998 6.9651L10.625 10.7844V17.9861A1.2511 1.2511 0 0 1 9.375 17.9861V10.7844L2.5002 6.9651A1.25 1.25 0 0 1 3.1435 5.8925L10 9.7017L12.4631 8.3333L5.9092 4.6906A0.6265 0.6265 0 0 1 5.7036 4.4702Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> </svg></span><span class="icon-frame icon-frame-lg" aria-hidden="true"> <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M12.7285 2.9047L20.2285 7.0714A1.5 1.5 0 0 1 21 8.3826L21 16.1174A1.5 1.5 0 0 1 20.2285 17.4286L12.7285 21.5953A1.5 1.5 0 0 1 11.2715 21.5953L3.7715 17.4286A1.5 1.5 0 0 1 3 16.1174L3 8.3826A1.5 1.5 0 0 1 3.7715 7.0714L11.2715 2.9047A1.5 1.5 0 0 1 12.7285 2.9047Z" /><path d="M6.8444 5.3642L8.2722 4.571L16.5 9.142L20.2284 7.0714A1.4996 1.4996 0 0 1 20.9998 8.3581L12.75 12.9413V21.5833A1.501 1.501 0 0 1 11.25 21.5833V12.9413L3.0002 8.3581A1.5002 1.5002 0 0 1 3.7722 7.071L12 11.642L14.9556 10L7.0911 5.6287A0.7489 0.7489 0 0 1 6.8444 5.3642Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> </svg></span>import PackageIcon16 from '@master/icons-react/native/16/soft/package'import PackageIcon20 from '@master/icons-react/native/20/soft/package'import PackageIcon24 from '@master/icons-react/native/24/soft/package'<> <span className="icon-frame icon-frame-xs" aria-hidden="true"> <PackageIcon16 className="icon" /> </span> <span className="icon-frame icon-frame-sm" aria-hidden="true"> <PackageIcon20 className="icon" /> </span> <span className="icon-frame" aria-hidden="true"><PackageIcon20 className="icon" /></span> <span className="icon-frame icon-frame-lg" aria-hidden="true"> <PackageIcon24 className="icon" /> </span></><script> import PackageIcon16 from '@master/icons-svelte/native/16/soft/package' import PackageIcon20 from '@master/icons-svelte/native/20/soft/package' import PackageIcon24 from '@master/icons-svelte/native/24/soft/package'</script><span class="icon-frame icon-frame-xs" aria-hidden="true"><PackageIcon16 class="icon" /></span><span class="icon-frame icon-frame-sm" aria-hidden="true"><PackageIcon20 class="icon" /></span><span class="icon-frame" aria-hidden="true"><PackageIcon20 class="icon" /></span><span class="icon-frame icon-frame-lg" aria-hidden="true"><PackageIcon24 class="icon" /></span><script setup>import PackageIcon16 from '@master/icons-vue/native/16/soft/package'import PackageIcon20 from '@master/icons-vue/native/20/soft/package'import PackageIcon24 from '@master/icons-vue/native/24/soft/package'</script><template> <span class="icon-frame icon-frame-xs" aria-hidden="true"><PackageIcon16 class="icon" /></span> <span class="icon-frame icon-frame-sm" aria-hidden="true"><PackageIcon20 class="icon" /></span> <span class="icon-frame" aria-hidden="true"><PackageIcon20 class="icon" /></span> <span class="icon-frame icon-frame-lg" aria-hidden="true"><PackageIcon24 class="icon" /></span></template>#外观与色调
icon-frame-raised 把图标框从凹槽变成一小块凸起面板,适合放在托盘或凹槽之上。状态色调会用对应的色相为凹槽着色,旁边须有表达同样含义的文字;icon-frame-category 则采用外层设置的分类色。
外观与色调
<span class="icon-frame icon-frame-raised" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M10.625 11L10.6242 2.4693A0.625 0.625 0 0 0 9.3818 2.4083L9.375 2.5L9.377 11.05A0.6255 0.6255 0 0 0 9.4989 11.3735Q9.7145 11.5422 10 11.5422Q10.2855 11.5422 10.5011 11.3735A0.625 0.625 0 0 0 10.625 11Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M6.5 7.5L9.8586 10.8586A0.2 0.2 0 0 0 10.1414 10.8586L13.5 7.5" /><path d="M3 13.5L3 15.75A1.25 1.25 0 0 0 4.25 17L15.75 17A1.25 1.25 0 0 0 17 15.75L17 13.5" /> </svg></span><span class="icon-frame icon-frame-info" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <circle cx="10" cy="10" r="7.5" /><circle cx="10" cy="6" r="0.625" fill="currentColor" stroke="none" /><path d="M10 10L10 14" /> </svg></span><span class="icon-frame icon-frame-success" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M3.5 10L7.8545 14.3545A0.2 0.2 0 0 0 8.1413 14.3504L16.5 5.5" /> </svg></span><span class="icon-frame icon-frame-warning" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M10.9696 4.81L16.6324 15.3806A1.1 1.1 0 0 1 15.6628 17L4.3372 17A1.1 1.1 0 0 1 3.3676 15.3806L9.0304 4.81A1.1 1.1 0 0 1 10.9696 4.81Z" /><path d="M10 8L10 11.5" /><circle cx="10" cy="14.5" r="0.625" fill="currentColor" stroke="none" /> </svg></span><span class="icon-frame icon-frame-danger" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <circle cx="10" cy="10" r="7.5" transform="rotate(180 10 10)" /><circle cx="10" cy="6" r="0.625" fill="currentColor" stroke="none" transform="rotate(180 10 10)" /><path d="M10 10L10 14" transform="rotate(180 10 10)" /> </svg></span><span class="icon-frame icon-frame-category category-violet" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <circle cx="8.75" cy="8.75" r="5.75" /><path d="M12.8159 12.8159L17.5 17.5" /> </svg></span>import DownloadIcon from '@master/icons-react/native/20/soft/download'import InfoCircleIcon from '@master/icons-react/native/20/soft/info-circle'import CheckIcon from '@master/icons-react/native/20/soft/check'import AlertTriangleIcon from '@master/icons-react/native/20/soft/alert-triangle'import AlertCircleIcon from '@master/icons-react/native/20/soft/alert-circle'import SearchIcon from '@master/icons-react/native/20/soft/search'<> <span className="icon-frame icon-frame-raised" aria-hidden="true"> <DownloadIcon className="icon" /> </span> <span className="icon-frame icon-frame-info" aria-hidden="true"> <InfoCircleIcon className="icon" /> </span> <span className="icon-frame icon-frame-success" aria-hidden="true"> <CheckIcon className="icon" /> </span> <span className="icon-frame icon-frame-warning" aria-hidden="true"> <AlertTriangleIcon className="icon" /> </span> <span className="icon-frame icon-frame-danger" aria-hidden="true"> <AlertCircleIcon className="icon" /> </span> <span className="icon-frame icon-frame-category category-violet" aria-hidden="true"> <SearchIcon className="icon" /> </span></><script> import DownloadIcon from '@master/icons-svelte/native/20/soft/download' import InfoCircleIcon from '@master/icons-svelte/native/20/soft/info-circle' import CheckIcon from '@master/icons-svelte/native/20/soft/check' import AlertTriangleIcon from '@master/icons-svelte/native/20/soft/alert-triangle' import AlertCircleIcon from '@master/icons-svelte/native/20/soft/alert-circle' import SearchIcon from '@master/icons-svelte/native/20/soft/search'</script><span class="icon-frame icon-frame-raised" aria-hidden="true"><DownloadIcon class="icon" /></span><span class="icon-frame icon-frame-info" aria-hidden="true"><InfoCircleIcon class="icon" /></span><span class="icon-frame icon-frame-success" aria-hidden="true"><CheckIcon class="icon" /></span><span class="icon-frame icon-frame-warning" aria-hidden="true"> <AlertTriangleIcon class="icon" /></span><span class="icon-frame icon-frame-danger" aria-hidden="true"> <AlertCircleIcon class="icon" /></span><span class="icon-frame icon-frame-category category-violet" aria-hidden="true"> <SearchIcon class="icon" /></span><script setup>import DownloadIcon from '@master/icons-vue/native/20/soft/download'import InfoCircleIcon from '@master/icons-vue/native/20/soft/info-circle'import CheckIcon from '@master/icons-vue/native/20/soft/check'import AlertTriangleIcon from '@master/icons-vue/native/20/soft/alert-triangle'import AlertCircleIcon from '@master/icons-vue/native/20/soft/alert-circle'import SearchIcon from '@master/icons-vue/native/20/soft/search'</script><template> <span class="icon-frame icon-frame-raised" aria-hidden="true"><DownloadIcon class="icon" /></span> <span class="icon-frame icon-frame-info" aria-hidden="true"><InfoCircleIcon class="icon" /></span> <span class="icon-frame icon-frame-success" aria-hidden="true"><CheckIcon class="icon" /></span> <span class="icon-frame icon-frame-warning" aria-hidden="true"> <AlertTriangleIcon class="icon" /> </span> <span class="icon-frame icon-frame-danger" aria-hidden="true"> <AlertCircleIcon class="icon" /> </span> <span class="icon-frame icon-frame-category category-violet" aria-hidden="true"> <SearchIcon class="icon" /> </span></template>#与文字并列
图标框标明其所在区段讨论的是哪一类事物,旁边的标题再用文字说出来。空状态视图的顶部就有一个图标框,empty-media 负责它在纵列中的位置。
与文字并列
<div class="auto-grid gap-xl w-full max-w(640)" style="--auto-grid-min: 11rem"> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M10.6071 2.4206L16.8571 5.8928A1.25 1.25 0 0 1 17.5 6.9855L17.5 13.4312A1.25 1.25 0 0 1 16.857 14.5239L10.607 17.9961A1.25 1.25 0 0 1 9.393 17.9961L3.143 14.5239A1.25 1.25 0 0 1 2.5 13.4312L2.5 6.9855A1.25 1.25 0 0 1 3.1429 5.8928L9.3929 2.4206A1.25 1.25 0 0 1 10.6071 2.4206Z" /><path d="M5.7036 4.4702L6.8934 3.8092L13.75 7.6183L16.857 5.8928A1.2493 1.2493 0 0 1 17.4998 6.9651L10.625 10.7844V17.9861A1.2511 1.2511 0 0 1 9.375 17.9861V10.7844L2.5002 6.9651A1.25 1.25 0 0 1 3.1435 5.8925L10 9.7017L12.4631 8.3333L5.9092 4.6906A0.6265 0.6265 0 0 1 5.7036 4.4702Z" fill="currentColor" stroke="none" fill-rule="evenodd" /> </svg> </span> <h3 class="m(0) text-sm font-medium fg-text-strong">Contracts</h3> <p class="m(0) text-sm fg-text-muted"> Every class says what it promises, in a file a program reads. </p> </div> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M3.9532 10.7535Q4.119 12.0422 4.7999 13.1487Q5.559 14.3826 6.7952 15.1379Q8.0313 15.8933 9.4756 16.0059A6.0357 6.0357 0 0 0 15.6598 11.9443Q16.1302 10.5741 15.9281 9.1396A6.0358 6.0358 0 0 0 10.6259 3.9793Q9.1864 3.8162 7.8295 4.3235Q6.6125 4.7786 5.6902 5.6937L3.3143 7.9822A0.626 0.626 0 0 1 3.0069 8.1185Q2.7352 8.0852 2.5333 7.8834Q2.3315 7.6815 2.2982 7.4098A0.6257 0.6257 0 0 1 2.4829 7.0501L4.8098 4.8063Q5.923 3.7019 7.3917 3.1527Q9.0294 2.5404 10.7666 2.7372Q12.5039 2.9341 13.963 3.8974A7.2849 7.2849 0 0 1 16.8422 12.3501Q16.2744 14.0038 15.0186 15.2202A7.2846 7.2846 0 0 1 6.1434 16.2045Q4.6515 15.2929 3.7353 13.8038Q2.9135 12.4683 2.7134 10.9131A0.625 0.625 0 0 1 3.9257 10.6341A0.6251 0.6251 0 0 1 3.9532 10.7535Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M2.9167 2.9167L2.9167 7.3A0.2 0.2 0 0 0 3.1167 7.5L7.5 7.5" /><path d="M10 5.8333L10 9.893A0.2 0.2 0 0 0 10.0891 10.0594L12.5 11.6667" /> </svg> </span> <h3 class="m(0) text-sm font-medium fg-text-strong">Platform first</h3> <p class="m(0) text-sm fg-text-muted"> Native elements do the work; a script moves attributes. </p> </div> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"> <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"> <path d="M3.3333 4.1667L16.6667 4.1667" /><path d="M3.3333 7.9167L11.6667 7.9167" /><path d="M3.3333 11.6667L16.6667 11.6667" /><path d="M3.3333 15.4167L11.6667 15.4167" /> </svg> </span> <h3 class="m(0) text-sm font-medium fg-text-strong">Tokens only</h3> <p class="m(0) text-sm fg-text-muted">One theme file retunes every face, edge and shadow.</p> </div></div>import PackageIcon from '@master/icons-react/native/20/soft/package'import HistoryIcon from '@master/icons-react/native/20/soft/history'import AlignLeftIcon from '@master/icons-react/native/20/soft/align-left'<div className="auto-grid gap-xl w-full max-w(640)" style={{ '--auto-grid-min': '11rem' } as React.CSSProperties}> <div className="flex flex-col items-start gap-sm"> <span className="icon-frame icon-frame-sm" aria-hidden="true"> <PackageIcon className="icon" /> </span> <h3 className="m(0) text-sm font-medium fg-text-strong">Contracts</h3> <p className="m(0) text-sm fg-text-muted"> Every class says what it promises, in a file a program reads. </p> </div> <div className="flex flex-col items-start gap-sm"> <span className="icon-frame icon-frame-sm" aria-hidden="true"> <HistoryIcon className="icon" /> </span> <h3 className="m(0) text-sm font-medium fg-text-strong">Platform first</h3> <p className="m(0) text-sm fg-text-muted"> Native elements do the work; a script moves attributes. </p> </div> <div className="flex flex-col items-start gap-sm"> <span className="icon-frame icon-frame-sm" aria-hidden="true"> <AlignLeftIcon className="icon" /> </span> <h3 className="m(0) text-sm font-medium fg-text-strong">Tokens only</h3> <p className="m(0) text-sm fg-text-muted"> One theme file retunes every face, edge and shadow. </p> </div></div><script> import PackageIcon from '@master/icons-svelte/native/20/soft/package' import HistoryIcon from '@master/icons-svelte/native/20/soft/history' import AlignLeftIcon from '@master/icons-svelte/native/20/soft/align-left'</script><div class="auto-grid gap-xl w-full max-w(640)" style="--auto-grid-min: 11rem"> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"><PackageIcon class="icon" /></span> <h3 class="m(0) text-sm font-medium fg-text-strong">Contracts</h3> <p class="m(0) text-sm fg-text-muted"> Every class says what it promises, in a file a program reads. </p> </div> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"><HistoryIcon class="icon" /></span> <h3 class="m(0) text-sm font-medium fg-text-strong">Platform first</h3> <p class="m(0) text-sm fg-text-muted"> Native elements do the work; a script moves attributes. </p> </div> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"><AlignLeftIcon class="icon" /></span> <h3 class="m(0) text-sm font-medium fg-text-strong">Tokens only</h3> <p class="m(0) text-sm fg-text-muted">One theme file retunes every face, edge and shadow.</p> </div></div><script setup>import PackageIcon from '@master/icons-vue/native/20/soft/package'import HistoryIcon from '@master/icons-vue/native/20/soft/history'import AlignLeftIcon from '@master/icons-vue/native/20/soft/align-left'</script><template> <div class="auto-grid gap-xl w-full max-w(640)" style="--auto-grid-min: 11rem"> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"><PackageIcon class="icon" /></span> <h3 class="m(0) text-sm font-medium fg-text-strong">Contracts</h3> <p class="m(0) text-sm fg-text-muted"> Every class says what it promises, in a file a program reads. </p> </div> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"><HistoryIcon class="icon" /></span> <h3 class="m(0) text-sm font-medium fg-text-strong">Platform first</h3> <p class="m(0) text-sm fg-text-muted"> Native elements do the work; a script moves attributes. </p> </div> <div class="flex flex-col items-start gap-sm"> <span class="icon-frame icon-frame-sm" aria-hidden="true"> <AlignLeftIcon class="icon" /> </span> <h3 class="m(0) text-sm font-medium fg-text-strong">Tokens only</h3> <p class="m(0) text-sm fg-text-muted">One theme file retunes every face, edge and shadow.</p> </div> </div></template>#无障碍
- 图标框只是装饰:为它设置
aria-hidden="true",含义由旁边的文字表达。 - 它绝不是按钮。可点击的图标应使用带无障碍名称的
btn-square。 - 色调的色相只是重复文字所表达的含义,绝不单独传达信息。
#类名
| 类名 | 说明 |
|---|---|
icon-frame | 压入表面的 48px 凹槽,容纳 20px 图标 |
icon-frame-xs | 32px,容纳 16px 图标,使用小控件的圆角与 icon-frame 一同使用 |
icon-frame-sm | 40px,容纳 20px 图标,使用控件的圆角与 icon-frame 一同使用 |
icon-frame-lg | 64px,容纳 28px 图标,使用表面的圆角与 icon-frame 一同使用 |
icon-frame-raised | 以小块凸起面板代替凹槽,适合放在凹槽、托盘或视觉元素较多的表面上与 icon-frame 一同使用 |
icon-frame-info | 淡信息色底纹,旁边要有表达相同含义的文字与 icon-frame 一同使用 |
icon-frame-success | 淡成功色底纹,旁边要有表达相同含义的文字与 icon-frame 一同使用 |
icon-frame-warning | 淡警告色底纹,旁边要有表达相同含义的文字与 icon-frame 一同使用 |
icon-frame-danger | 淡危险色底纹,旁边要有表达相同含义的文字与 icon-frame 一同使用 |
icon-frame-category | 使用由自身或外层 category-<name> 类设定的分类表面、线条和文字;没有分类时为中性样式与 icon-frame 一同使用 |
#自定义属性
| 属性 | 默认值 | 说明 |
|---|---|---|
--icon-frame-size | 3rem | 图标框的宽度和高度 |
--icon-frame-radius | var(--radius-control-lg) | 应用圆角缩放前的圆角 |