npm install sonner-solid
yarn add sonner-solid
pnpm add sonner-solid
bun add sonner-solid
Add the <Toaster />
component to your app.
import { Toaster } from 'sonner-solid';
// In your app component or layout
export default function App() {
return (
<>
<Toaster />
{/* Your app content */}
</>
);
}
Use it to render a toast. You can call it from anywhere, even outside of React.