This guide will help you get started with Somoto. Sonner is good. So i think there should be a toast library for SolidJS.
pnpm i somoto
npm i somoto
yarn add somoto
bun add somoto
It can be placed anywhere, even in server components such as layout.tsx.
layout.tsx
import { Toaster } from 'somoto'; export default function RootLayout({ children }: { children: JSX.Element }) { return ( <html lang="en"> <body> {children} <Toaster /> </body> </html> );}
import { toast } from 'somoto'; function MyToast() { return <button onClick={() => toast('This is a somoto toast')}>Render my toast</button>;}