Skip to content

feat(mosaic): add flush elevation to sign-in, sign-up and OAuth consent - #10973

Open
prestonwebdev wants to merge 5 commits into
mainfrom
prestonwebdev/mosaic-flush-elevation
Open

prestonwebdev wants to merge 5 commits into
mainfrom
prestonwebdev/mosaic-flush-elevation

Conversation

@prestonwebdev

Copy link
Copy Markdown
Member

Description

Adds a flush presentation for the sign-in, sign-up and OAuth consent cards, so the component sits directly on the page with no surface around it.

  • Card with elevation='flush' now drops its inner padding, the footer divider and the fixed width. It fills its container up to the card's size width, and --cl-card-flush-max-width overrides that cap. The "Secured by Clerk" branding and the divider above it stay, and hiding the branding removes the divider with it.
  • SignInView, SignUpView and OAuthConsent accept an optional elevation and pass it to the card. SignInView and SignUpView also accept an optional renderBranding.
  • Swingset gets flush stories for all three, each with a "Secured by Clerk" switch.

Card has no other flush consumers (user and organization profile use their own elevation), so existing surfaces are unchanged.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude Code

Card's flush elevation now drops the inner padding, the footer divider and the fixed width, filling its container up to the size width (overridable with --cl-card-flush-max-width) while keeping the branding and its divider. SignInView, SignUpView and OAuthConsent pass elevation through to the card, and the sign-in and sign-up views accept renderBranding. Swingset gets flush stories with a branding toggle.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 24, 2026 5:07pm UTC
mosaic-docs Ready Ready Preview Nov 24, 2026 5:07pm UTC
swingset Ready Ready Preview Nov 24, 2026 5:07pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Card styling now supports flush elevation through configurable spacing, radius, and width behavior. OAuth consent, sign-in, and sign-up accept an optional elevation prop and pass it to the card. New stories and documentation demonstrate flush cards, including a branding toggle in the OAuth consent story.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: austincalvelage

Merge Risk: Minimal · up to b15ac

This adds a flush presentation option to the sign-in, sign-up and OAuth consent cards, with stories and documentation. No actionable merge-blocking issue was found. The CSS bundle size check in CI is failing slightly over its limit and may need attention before merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: adding a flush elevation option to the sign-in, sign-up and OAuth consent cards. The changeset matches it, with the card elevation props, flush styles and Swingset sto…
Description check Passed The description states the flush presentation for the sign-in, sign-up and OAuth consent cards. It also covers the Card elevation changes, the new elevation props, the branding divider behavior and th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding a flush elevation option to the sign-in, sign-up and OAuth consent cards. The changeset matches it, with the card elevation props, flush styles and Swingset stories. It is specific and follows conventional commit form.

Full details: Description check

Explanation

The description states the flush presentation for the sign-in, sign-up and OAuth consent cards. It also covers the Card elevation changes, the new elevation props, the branding divider behavior and the Swingset stories. These match the changeset.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: This review skipped 6 repositories. Cross-repository analysis may be incomplete. Check linked repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between dc5b4b8 and b15acfc.

Files selected for processing: 14

  • .changeset/flush-elevation-auth-cards.md
  • packages/mosaic/src/components/card/card.doc.ts
  • packages/mosaic/src/components/card/card.markers.stylex.ts
  • packages/mosaic/src/components/card/card.styles.ts
  • packages/mosaic/src/components/card/card.tsx
  • packages/mosaic/src/features/sign-in/sign-in.types.ts
  • packages/mosaic/src/features/sign-in/sign-in.view.tsx
  • packages/mosaic/src/features/sign-up/sign-up.types.ts
  • packages/mosaic/src/features/sign-up/sign-up.view.tsx
  • packages/swingset/src/stories/oauth-consent.mdx
  • packages/swingset/src/stories/sign-in.mdx
  • packages/swingset/src/stories/sign-in.stories.tsx
  • packages/swingset/src/stories/sign-up.mdx
  • packages/swingset/src/stories/sign-up.stories.tsx
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Files with no reviewable changes: 4

  • packages/mosaic/src/features/sign-in/sign-in.types.ts
  • packages/mosaic/src/features/sign-in/sign-in.view.tsx
  • packages/mosaic/src/features/sign-up/sign-up.types.ts
  • packages/mosaic/src/features/sign-up/sign-up.view.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@changeset-bot

changeset-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b15acfc

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

This PR includes changesets to release 3 packages
Name Type
@clerk/mosaic Minor
@clerk/mosaic-docs Patch
@clerk/swingset 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

pkg-pr-new Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10973

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10973

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10973

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10973

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10973

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10973

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10973

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10973

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10973

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10973

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10973

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10973

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10973

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10973

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10973

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10973

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10973

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10973

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10973

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10973

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10973

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10973

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10973

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10973

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10973

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10973

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10973

commit: b15acfc

@prestonwebdev
prestonwebdev marked this pull request as ready for review November 24, 2026 04:13
@blacksmith-sh

blacksmith-sh Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Matches Flush sign-in drops the card surface

Flush sign-in card is still transparent, shadowless, square, 420px wide, with 0px insets and footer border, 16px header-to-content gap, and Secured by Clerk with its 1px divider.

Flush sign-in story

Computed card styles

Also checked · 6 match

Matches Hiding branding removes its divider
Matches Flush sign-up and OAuth consent stories
Matches Default card elevation unchanged
Matches Flush card sizes like a card
Matches renderBranding removed from view props
Matches Flush loading screen has no top gap

Proof on b15acfcb (from 26856f2d) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@alexcarpenter

Copy link
Copy Markdown
Member

Two things to change before merge:

1. Drop flushSizes; flush can use sizes.

In a normal layout, width: 100% + max-width: 26.25rem comes out the same as the existing width: 26.25rem + max-width: 100%. But in a parent that sizes to its content, the flush card collapses to 0px wide. That's the case the comment above sizes in card.styles.ts warns about.

Measured in swingset on /components/card (md, flush Preview vs a default card), with each card placed in a test parent:

parent flush (this PR) card flush using sizes
block, 300px 300 300 300
block, 800px 420 420 420
flex column / flex row / grid, centered 420 420 420
display: inline-block 0 420 420
width: fit-content 0 420 420

Fix: in card.tsx, use slots.sizes[size] for every elevation, remove flushSizes, and drop width: '100%' from root.flush. With that change, flush matched the default card in every row above.

2. Remove renderBranding from the public SignInView / SignUpView props.

packages/mosaic/docs/public-props.md says branding follows displayConfig.branded and has no public prop. As it stands, any app can hide "Secured by Clerk" on a branded instance. Derive it in the model from environment.displayConfig.branded, the way oauth-consent.model.ts, waitlist.model.ts and create-organization.model.ts already do, and remove it from sign-in.types.ts / sign-up.types.ts and the changeset.

@alexcarpenter

Copy link
Copy Markdown
Member

Minor, non-blocking: flush sets the card's top, side and bottom insets to 0, but content.base still has a fixed paddingBlockStart: space['4'] (card.styles.ts:230). That padding is the gap between the header and the content. In a card with no header, it ends up as a 16px gap at the top of a flush card.

This PR hits that case in one place. AuthLoading (blocks/auth/auth-loading.tsx) renders only Card.Banner + Card.Content, and SignUpView shows it inside its card for the loading state (sign-up.view.tsx:109-115). Sign-in's notice step uses it too. So a flush sign-up loading screen has 16px above the spinner and nothing below it. I haven't checked this in a browser.

If you want it even, zero the content's top padding only when it is the card's first child. Changing it to var(--_cl-card-inset-block-start) everywhere would also remove the header→content gap in flush.

…view prop

Flush reuses the card size widths, so it no longer collapses to zero inside a parent that sizes to its content. SignInView and SignUpView lose renderBranding, since branding follows displayConfig.branded and has no public prop; the branding toggle stays on the OAuth consent flush story, where the story renders the card.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…der precedes it

Card.Content keeps its 16px top padding only when a Card.Header comes before it. A flush card with no header, such as the sign-up loading screen, now starts at the top edge. Adds a flush loading story.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – swingset — b15acfcb Deployed Nov 24, 2026 by vercel[bot]
Preview – clerk-js-sandbox — b15acfcb Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants