Skip to content

extract core; add vanilla support#716

Draft
emaia wants to merge 1 commit intoemilkowalski:mainfrom
emaia:vanilla
Draft

extract core; add vanilla support#716
emaia wants to merge 1 commit intoemilkowalski:mainfrom
emaia:vanilla

Conversation

@emaia
Copy link
Copy Markdown

@emaia emaia commented Dec 2, 2025

This PR extracts core functionalities, separete React and add a vanilla implementation. No breaking changes expected. I can also work to add docs and vanilla tests if this can be under consideration.

Nothing changes for react use.

Vanilla example:

import { createToaster, toast } from 'sonner/vanilla';

const toaster = createToaster({
  position: 'bottom-right',
  theme: 'system',
  richColors: true,
  closeButton: true,
  expand: false,
  duration: 4000,
  gap: 14,
  visibleToasts: 3,
});

// Use toasts
toast('Hello World!');
toast.success('Operation successful!');
toast.error('Something went wrong!');
toast.info('Did you know?');
toast.warning('Be careful!');
toast.loading('Loading...');

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 2, 2025

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

Project Deployment Preview Comments Updated (UTC)
sonner Ready Ready Preview Comment Dec 2, 2025 3:07pm

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.

1 participant