chakra-ui / panda

🐼 Universal, Type-Safe, CSS-in-JS Framework for Product Teams ⚡️
https://panda-css.com
MIT License
5.09k stars 226 forks source link

feat: zstack function #1503

Closed Onekki closed 11 months ago

Onekki commented 11 months ago

Description

A extension to the existing stack function. Instead of stacking the items vertically or horizontally it stacks the children on top of each other.

Problem Statement/Justification

Currently there exists no function that lets its children stack on top of each other

Proposed Solution or API

Add absolute position for children and relative position for parent.

Alternatives

No response

Additional Information

No response

astahmer commented 11 months ago

not sure if many people would use this, I feel like this should remain in user-land, as a custom preset or utility

omarkhatibco commented 11 months ago

@Onekki I'm curious to see what do you means? or what is the difference between ZStack and VStack?

Onekki commented 11 months ago

@Onekki I'm curious to see what do you means? or what is the difference between ZStack and VStack?

You can refer to this PR: https://github.com/chakra-ui/chakra-ui/pull/8039

Onekki commented 11 months ago

not sure if many people would use this, I feel like this should remain in user-land, as a custom preset or utility

I'm from Flutter & SwiftUI, they all have this feature. If this function were available, people would naturally use it.