ZStack


目录

This component is deprecated. Write your own CSS instead.

Usage

ZStack allows you to stack things along the Z-axis.

import { __experimentalZStack as ZStack } from '@wordpress/components';

function Example() {
    return (
        <ZStack offset={ 20 } isLayered>
            <ExampleImage />
            <ExampleImage />
            <ExampleImage />
        </ZStack>
    );
}

Props

isLayered: boolean

Layers children elements on top of each other (first: highest z-index, last: lowest z-index).

isReversed: boolean

Reverse the layer ordering (first: lowest z-index, last: highest z-index).

offset: number

The amount of space between each child element. Its value is automatically inverted (i.e. from positive to negative, and viceversa) when switching from LTR to RTL.

children: ReactNode

The children to stack.


版本号 #2
由 壳壳虫 创建于 2026-10-31 18:15:53 UTC
由 壳壳虫 更新于 2026-10-31 18:15:54 UTC