Docs
Sonner

Sonner

An opinionated toast component for Solid.

Installation

npx shadcn-solid@latest add sonner

Usage

import { toast } from "somoto"
toast("Event has been created.")
src/main.tsx
import { Toaster } from "@/components/ui/sonner"
 
const App = () => {
  return (
    <Router
      root={(props) => (
        <Suspense>
          <ColorModeScript />
          <ColorModeProvider>
            {props.children}
            <Toaster />
          </ColorModeProvider>
        </Suspense>
      )}
    >
      <FileRoutes />
    </Router>
  )
}
 
export default App