Skip to content

pantoken / stacking

stacking

Beta

@pantoken/plugin-stacking — các mức z-index được đặt tên.

InstUI's View exposes a stacking scale (deepest, below, above, topmost) so layers stack predictably instead of by hand-tuned magic numbers. This plugin emits --instui-stacking-<level> tokens, resolved to concrete z-index values from the shipped --instui-component-view-stacking-* tokens, for consumers using the lower-level @pantoken/css/@pantoken/tokens pipeline directly. The matching .instui-stack-<level> utility classes now live in @pantoken/components' own stacking utility.

Ví dụ

ts
import { buildTokens } from "@pantoken/core/build";
import { stacking } from "@pantoken/plugin-stacking";

const tokens = buildTokens({ theme: "rebrand", plugins: [stacking()] });
// → includes --instui-stacking-topmost: …

Giao diện

Biến

Hàm

Tham chiếu

default

Đổi tên và xuất lại stacking