Skip to content

feat(components): Add Stack and Columns layout components#2941

Open
Shubhdeep12 wants to merge 4 commits intoresend:canaryfrom
Shubhdeep12:feat/layout-components
Open

feat(components): Add Stack and Columns layout components#2941
Shubhdeep12 wants to merge 4 commits intoresend:canaryfrom
Shubhdeep12:feat/layout-components

Conversation

@Shubhdeep12
Copy link

@Shubhdeep12 Shubhdeep12 commented Feb 6, 2026

  • 2 packages:
    • @react-email/stack - vertical stacking with gap
    • @react-email/columns - horizontal columns with gap and optional columnWidths
    • both built on Row and Column and re-exported from @react-email/components
  • Unit tests added.
  • added docs - stack.mdx and columns.mdx

related #2940

…' to package.json and index.ts.

- Updated docs.json to include new components in the documentation.
@vercel
Copy link

vercel bot commented Feb 6, 2026

@Shubhdeep12 is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

🦋 Changeset detected

Latest commit: d1759c5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@react-email/columns Minor
@react-email/stack Minor
docs Patch
@react-email/components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 6, 2026

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email/@react-email/columns@2941
npm i https://pkg.pr.new/resend/react-email/@react-email/components@2941
npm i https://pkg.pr.new/resend/react-email/@react-email/stack@2941

commit: d1759c5

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 23 files

Confidence score: 3/5

  • Some risk due to layout behavior in email clients; the issues are user-visible in Outlook and could affect spacing/alignment.
  • packages/stack/src/stack.tsx uses marginBottom on table rows for gaps, which Outlook may ignore and collapse spacing.
  • Pay close attention to packages/stack/src/stack.tsx and packages/columns/src/columns.tsx - Outlook table/padding width handling may break intended layout.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/stack/src/stack.tsx">

<violation number="1" location="packages/stack/src/stack.tsx:30">
P2: Stack uses `marginBottom` on a `<table>` (`Row`) to implement gaps, but Outlook (Word rendering engine) does not reliably support margins on tables, so spacing can collapse in Outlook clients.</violation>
</file>

<file name="packages/columns/src/columns.tsx">

<violation number="1" location="packages/columns/src/columns.tsx:38">
P2: Column widths are set to 100/cols% while horizontal gap is added via left/right padding on each <Column>. In email clients (especially Outlook), <td> padding adds to the effective cell width when a width is set, so the total width exceeds 100% and columns can overflow or wrap. Consider reducing widths to account for the gap or using spacer cells/nested tables for gutters instead of padding on width‑constrained cells.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- Enhanced gap handling in <Columns> and <Stack> components to use spacer columns and padding for better Outlook compatibility.
- Updated documentation to clarify the implementation of gaps and their effects on layout.
- Adjusted tests to reflect changes in gap application and ensure accurate rendering.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/columns/src/columns.tsx">

<violation number="1" location="packages/columns/src/columns.tsx:56">
P2: `cols` is ignored when `gap` is provided because widths are divided by `n` (children count) instead of `cols`, leading to inconsistent layout behavior based on whether `gap` is set.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- Updated the gap calculation logic in the Columns component to ensure proper distribution of space when gaps are applied.
- Adjusted the calculation to use the correct number of columns, improving layout consistency.
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