---
url: /api/plugins/pantoken/stacking/src.md
---
[pantoken-root](../../../../index.md) / stacking

# stacking

Beta

`@pantoken/plugin-stacking` — named z-index depths.

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.

## Example

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

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

## Interfaces

* [StackingOptions](interfaces/StackingOptions.md)

## Variables

* [STACKING_LEVELS](variables/STACKING_LEVELS.md)

## Functions

* [stacking](functions/stacking.md)

## References

### default

Renames and re-exports [stacking](functions/stacking.md)
