CardLayout: vertical alignment via flex-col - #160
Merged
Conversation
CardLayout now uses flex flex-col on the outer div and flex-1 flex flex-col on the inner content wrapper. This lets children use mt-auto to pin footer content to the bottom when cards stretch to equal height in a row. No new props required — just add mt-auto to your footer element. Added VerticalAlignment story demonstrating food-menu and pricing-card patterns. Closes #110
pglevy
force-pushed
the
card-vertical-alignment
branch
from
July 21, 2026 19:56
811314c to
f3e3084
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CardLayout now uses
flex flex-colinternally so that children can pin footer content to the bottom usingmt-auto. This solves the common pattern of cards in a row with variable content length where footers (buttons, prices, actions) should align at the same vertical position.Changes
flex flex-colto the outer card div andflex-1 flex flex-colto the inner content wrapperVerticalAlignmentstory showing food-menu and pricing-card patternsUsage
No new props needed. For AUTO-height cards (default), this has zero visual effect.
Closes #110