Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stack): add Stack component #1963

Merged
merged 1 commit into from
Apr 22, 2024
Merged

feat(stack): add Stack component #1963

merged 1 commit into from
Apr 22, 2024

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Apr 22, 2024

Related #1384

Adds the Stack component.

Stack is a utility component that can be used to create a stack of elements with a consistent gap between them. It supports both vertical and horizontal orientations.

It uses layout tokens from the Carbon Design System to define the gap between elements. The default gap is 1, which is equivalent to 0.125rem (2px).

The gap scale can be set from 1 to 13.

<Stack gap={2}>
  <p>Item 1</p>
  <p>Item 2</p>
  <p>Item 3</p>
</Stack>

@metonym metonym merged commit 0f1a77a into next/v11-styles Apr 22, 2024
1 check passed
@metonym metonym deleted the next/v11-stack branch April 22, 2024 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant