Skip to content

CSS: menu.item

.item — รายการเมนู (InstUI Menu.Item); เพิ่ม -disabled, -highlighted, หรือ -active/[aria-checked].

การเข้าถึง

ทำเครื่องหมายรายการที่ถูกเลือกด้วย aria-checked="true" (สไตล์เดียวกับ -active).

การใช้งาน

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/menu.item.css";

ตัวปรับแต่ง

ตัวปรับแต่งคำอธิบาย
.-activeการไฮไลท์เมื่อใช้งาน/ถูกเลือก; สไตล์เดียวกับ [aria-checked="true"].
.-disabledจางและไม่สามารถโต้ตอบได้.
.-highlightedพื้นหลัง/ข้อความที่ถูกไฮไลท์ (โฟกัสจากคีย์บอร์ดหรือเมื่อวางเมาส์).

ส่วนประกอบ

ส่วนคำอธิบาย
.item-infoข้อความข้อมูลรองภายในรายการ

สถานะ

สถานะคำอธิบาย
[aria-checked="true"]

โทเค็นที่ใช้

Tokenชนิดค่า
--instui-component-menu-item-active-background<color>LightDarklight-dark(#1D354F, #EEF4FD)
--instui-component-menu-item-active-label-color<color>LightDarklight-dark(#ffffff, #1D354F)
--instui-component-menu-item-font-family[ <font-family-name> | <generic-font-family> ]#Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif
--instui-component-menu-item-font-size<length>1rem
--instui-component-menu-item-font-weight<integer>400
--instui-component-menu-item-highlighted-background<color>LightDarklight-dark(#EEF4FD, #2E5177)
--instui-component-menu-item-highlighted-label-color<color>LightDarklight-dark(#273540, #F2F4F5)
--instui-component-menu-item-highlighted-label-info-color<color>LightDarklight-dark(#273540, #F2F4F5)
--instui-component-menu-item-label-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-menu-item-label-info-color<color>LightDarklight-dark(#576773, #AAB0B5)
--instui-component-menu-item-line-height<length>1.25rem
--instui-component-menu-item-padding-horizontal<length>0.75rem
--instui-component-menu-item-padding-vertical<length>0.5rem
--instui-component-menu-item-selected-highlighted-background<color>LightDarklight-dark(#234465, #ffffff)
--instui-opacity-disabled<number>0.5