A component that groups together several Sheets and enable the definition of stacking-driven animations (i.e. animations based on the travel of Sheets stacked on top of each other).
Notes
Current limitation
import { Sheet } from "@silk-hq/components";
export default () => (
<SheetStack.Root>
<SheetStack.Outlet />
<Sheet.Root>
<Sheet.Trigger />
<Sheet.Portal>
<Sheet.View>
<Sheet.Backdrop />
<Sheet.Content>
<Sheet.Title />
<Sheet.Description />
</Sheet.Content>
</Sheet.View>
</Sheet.Portal>
</Sheet.Root>
<Sheet.Root>
<Sheet.Trigger />
<Sheet.Portal>
<Sheet.View>
<Sheet.Backdrop />
<Sheet.Content>
<Sheet.Title />
<Sheet.Description />
</Sheet.Content>
</Sheet.View>
</Sheet.Portal>
</Sheet.Root>
</SheetStack.Root>
);
import { Sheet } from "@silk-hq/components";
export default () => (
<SheetStack.Root>
<SheetStack.Outlet />
<Sheet.Root>
<Sheet.Trigger />
<Sheet.Portal>
<Sheet.View>
<Sheet.Backdrop />
<Sheet.Content>
<Sheet.Title />
<Sheet.Description />
{/* Nested sheet */}
<Sheet.Root>
<Sheet.Trigger />
<Sheet.Portal>
<Sheet.View>
<Sheet.Backdrop />
<Sheet.Content>
<Sheet.Title />
<Sheet.Description />
</Sheet.Content>
</Sheet.View>
</Sheet.Portal>
</Sheet.Root>
</Sheet.Content>
</Sheet.View>
</Sheet.Portal>
</Sheet.Root>
);
<SheetStack.Root>
Presence | Required |
---|---|
Composition | - Contains all SheetStack sub-components |
<Sheet.Root>
|
| Underlying element | <div>
|Description
The Root sub-component wraps all other sub-components of the same SheetStack instance as well as the associated Sheet instances’ <Sheet.Root>
sub-components.