Repository navigation
feat(toast): stack toasts like a deck and restyle the toast - #158
Merged
Merged
Conversation
Toasts stack with the newest in front and fan out on hover or focus. `expand` keeps the full list. The description takes the muted colour under a title and the tone icon grows to 20px, aligned with the title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: f6eb69d The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Contributor
CodeUI package previewBuilt from npm install https://pkg.pr.new/riccardoperra/codeui/@codeui/solid@f6eb69d87ed0b95f0a48b2115641b38ff3e624ebInstalling |
Contributor
|
Docs preview deployed to Cloudflare Pages.
Built from f6eb69d. |
Replaces Kobalte's toast region behind createToaster and Toaster with our own engine: transitions for enter and leave, a deck stack that fans out on hover or focus, timers that pause while expanded or hidden, a limit that hides older toasts instead of queueing, and swipe toward the region's edge. The styled Kobalte parts are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An app style that stretches the region (the docs demo frame sets `w-full` on direct child sections from the utilities layer) made the stacked toasts span the viewport. The list now caps itself at 480px and aligns to the region's side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Toasts now render in the theme around the Toaster. `theme="inverted"` on the Toaster, or on one toast, keeps the light-on-dark card. Adds `ToastTheme` and an Inverted story. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…astTheme Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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
Stacked toasts (Sonner-style), now the default. The newest toast sits in front and up to two older ones peek 12px behind it, at 95% and 90% scale with their content hidden. Hovering or focusing the stack fans the toasts out to full height, and leaving collapses it. Bottom and top positions both stack, mirrored.
stack.tsmeasures each toast (ResizeObserver and MutationObserver) and sets--cui-toast-index,--cui-toast-offset,--cui-toast-height, the list's front height and stack height, anddata-cui-stack-index.[data-cui-stack]. It uses thetranslate,scaleandclip-pathproperties, nottransform, so swipe and the rise keyframe keep working. Back cards are clipped only on the side hidden behind the front card, so they keep their shadow and rounded corners.expandprop onToasterkeeps the old full list. The Tones story uses it.Toast restyle. A description under a title takes
--cui-text-mutedwith 2px between them. The tone icon goes from 16px to 20px, so the circle measures 16px, and it aligns with the title row. The leading padding grows to 16px.Also: a
Stackedstory,DESIGN.md§7 andmotion.mdxnotes, a changeset (minor for@codeui/solidand@codeui/styles), and a reusablejourneys/toast-stack.mjswith its feature-map entry.Verification
verify-codeui,designsystem-toaster--stacked, both themes: collapsed layout (the front card is lowest and two peek above with hidden content), hover fans out with no overlap, the stack collapses on pointer leave, and Tab fans it out. All checks pass.designsystem-toaster--interactive(top-right): the stack mirrors downward.toast-risejourney, plus the Tones, RichContent and Loading stories: pass.@codeui/stylescheck, kittsc, andtest/toaster.test.tsx(23 tests): pass. TheSTRICT_READ_UNTRACKEDwarnings also appear onmain.🤖 Generated with Claude Code