Skip to content

feat: [container] add render prop - #921

Open
rohanchkrabrty wants to merge 1 commit into
mainfrom
feat/container-render
Open

rohanchkrabrty wants to merge 1 commit into
mainfrom
feat/container-render

Conversation

@rohanchkrabrty

@rohanchkrabrty rohanchkrabrty commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Container uses useRender and mergeProps, like Flex, so it accepts a render prop, for example render={<main />}. The repo uses render for polymorphism, so this replaces the as prop from [Container] Support ref as prop and add polymorphic as prop #610.
  • ref already worked through the props spread. useRender needs it passed explicitly, and a test covers that.
  • With render, Container adds no automatic role="region". The rendered element keeps its implicit role, so render={<main />} stays a main landmark. An explicit role still applies.
  • Tests cover the render element, the kept implicit role, and the data-slot on the rendered element.
  • Docs add a "Custom render" section, the render prop, and rename ariaLabel/ariaLabelledby in props.ts to aria-label/aria-labelledby to match the component.

Closes #610

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
apsara Ready Ready Preview Sep 29, 2026 9:52am UTC

@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 13 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 78cf9cc1-e5b7-4d84-ae69-0a8eb4d3cee9

📥 Commits

Reviewing files that changed from the base of the PR and between 8bf6f0d and a854470.

📒 Files selected for processing (5)
  • apps/www/src/content/docs/components/container/index.mdx
  • apps/www/src/content/docs/components/container/props.ts
  • packages/raystack/components/container/__tests__/container.test.tsx
  • packages/raystack/components/container/__tests__/data-slots.test.tsx
  • packages/raystack/components/container/container.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@921

commit: a854470

This branch was successfully deployed

1 active deployment
Preview — a8544702 Deployed Sep 29, 2026 by vercel[bot]
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.

[Container] Support ref as prop and add polymorphic as prop

1 participant