Skip to content

Add index paramter to toast for proper overlap styling#4268

Merged
endigo9740 merged 9 commits intoskeletonlabs:mainfrom
cmintey:feature/toast-overlap-styling
Jan 30, 2026
Merged

Add index paramter to toast for proper overlap styling#4268
endigo9740 merged 9 commits intoskeletonlabs:mainfrom
cmintey:feature/toast-overlap-styling

Conversation

@cmintey
Copy link
Contributor

@cmintey cmintey commented Jan 23, 2026

Linked Issue

Closes #4264

Description

Toast overlap styling from Zag relies on the use of an --index CSS variable, which is created by Zag when the toast is supplied with an index parameter. This parameter was left out of Skeleton's implementation of the Zag toast.

This PR adds an optional index parameter to a Toast in order to maintain backwards compatibility within the major version. Docs were updated and the Playground was also updated to allow for dynamically changing the toast settings for testing.

While this parameter is optional, I added it to all the docs since it doesn't hurt to be explicit.

AI Disclosure

Use of LLM technology is allowed. We ask for your voluntary disclosure to help inform future Skeleton contribution guidelines.

  • I used AI to generate this pull request

Checklist

Please read and apply all contribution requirements.

  • Your branch should be prefixed with: docs/, feature/, task/, bugfix/
  • Contributions should target the main branch
  • Documentation should be updated to describe all relevant changes
  • Run pnpm check in the root of the monorepo
  • Run pnpm format in the root of the monorepo
  • Run pnpm lint in the root of the monorepo
  • Run pnpm test in the root of the monorepo
  • If you modify /package projects, please supply a Changeset

Changesets

View our documentation to learn more about Changesets. To create a Changeset:

  1. Navigate to the root of the monorepo in your terminal
  2. Run pnpm changeset and follow the prompts
  3. Commit and push the changeset before flagging your PR ready for review.

@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2026

🦋 Changeset detected

Latest commit: 00a4c01

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

This PR includes changesets to release 5 packages
Name Type
@skeletonlabs/skeleton-react Minor
@skeletonlabs/skeleton-svelte Minor
skeleton Minor
@skeletonlabs/skeleton-common Minor
@skeletonlabs/skeleton Minor

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

@vercel
Copy link

vercel bot commented Jan 23, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
www.skeleton.dev Ignored Ignored Preview Jan 30, 2026 10:08pm

Request Review

Copy link
Contributor

@endigo9740 endigo9740 left a comment

Choose a reason for hiding this comment

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

@cmintey See my comment below.

And one additional note - I'm going to run this by @Hugos68. As he has a much better handle on the inner workings of Zag. There's two things I'm going to ask of him:

  1. Does he agree with my suggested implementation
  2. Should we consider sending this upstream in some capacity to Zag; perhaps they can implement a change that makes this even more trivial

In the meantime, let's go ahead and make the changes as I describe below. And as I stated - if it's easier to start with a fresh PR, by all means close this one out. I'd understand given the number of changes.

@cmintey cmintey requested a review from endigo9740 January 23, 2026 17:50
Copy link
Contributor

@endigo9740 endigo9740 left a comment

Choose a reason for hiding this comment

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

@cmintey again thanks for the quick turn around. Just two super minor things. If need be I can jump in and help with these, just let me know. Thanks again!

@endigo9740 endigo9740 merged commit 2472c76 into skeletonlabs:main Jan 30, 2026
6 checks passed
@github-actions github-actions bot mentioned this pull request Jan 30, 2026
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.

Toast “overlap” option not working as expected

2 participants