Skip to content

refactor(ui): style interactive avatars in Avatar itself - #9413

Merged
alexcarpenter merged 1 commit into
austin/user-profile-03-avatar-buttonfrom
alex/mosaic-avatar-interactive-styles
Aug 12, 2026
Merged

refactor(ui): style interactive avatars in Avatar itself#9413
alexcarpenter merged 1 commit into
austin/user-profile-03-avatar-buttonfrom
alex/mosaic-avatar-interactive-styles

Conversation

@alexcarpenter

Copy link
Copy Markdown
Member

Description

Stacked on #9378.

Avatar.Root now owns its interactive appearance instead of borrowing it from the Mosaic Button. When a render prop composes the root onto another element, the root applies an interactive StyleX style: no border, pointer cursor (not-allowed when disabled), and a focus-visible outline. The :is(button) selectors that patched the border and min-size around Button are gone, and demos compose onto a plain <button>.

Also removes the --cl-color-avatar-icon token (the icon slot inherits its color) and replaces the pen glyph with a 16px-grid path, so it no longer needs a viewBox override.

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:

Apply an `interactive` StyleX style when `Avatar.Root` composes onto another
element, instead of relying on the Mosaic Button. Drops the
`--cl-color-avatar-icon` token and updates the pen glyph to the 16px grid.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 12, 2026 12:32pm
swingset Ready Ready Preview Aug 12, 2026 12:32pm

Request Review

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 28bb829

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

Comment on lines +99 to 103
d='M12.03 3.972a1.59 1.59 0 0 0-2.261 0l-.01.01-5.056 4.89a1.25 1.25 0 0 0-.351.627l-.61 2.747 2.542-.598a1.25 1.25 0 0 0 .59-.325L12.085 6.2c.573-.638.549-1.62-.057-2.228M8.71 2.909a3.09 3.09 0 0 1 4.383.005 3.126 3.126 0 0 1 .06 4.341l-5.228 5.138a2.75 2.75 0 0 1-1.298.715l-3.705.872a.75.75 0 0 1-.904-.893l.87-3.914a2.75 2.75 0 0 1 .772-1.38z'
fill='currentColor'
fillRule='evenodd'
clipRule='evenodd'
/>,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this icon is not the same as what we were pulling from causing issues. we shouldn't need to specify a viewBox override to get things to align. will need to get a fix from design.


'--cl-color-card': 'light-dark(oklch(1 0 0), oklch(0.205 0 0))',
'--cl-color-card-foreground': 'light-dark(oklch(0.145 0 0), oklch(0.985 0 0))',
'--cl-color-avatar-icon': 'light-dark(oklch(0.145 0 0), oklch(0.985 0 0))',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Lets avoid adding to many specific vars like this.

@alexcarpenter
alexcarpenter merged commit 926c92a into austin/user-profile-03-avatar-button Aug 12, 2026
11 checks passed
@alexcarpenter
alexcarpenter deleted the alex/mosaic-avatar-interactive-styles branch August 12, 2026 15:10
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