MCPcopy Index your code
hub / github.com/emilkowalski/sonner

github.com/emilkowalski/sonner @v2.0.7 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.7 ↗
56 symbols 115 edges 29 files 0 documented · 0% 124 cross-repo links
README

https://github.com/vallezw/sonner/assets/50796600/59b95cb7-9068-4f3e-8469-0b35d9de5cf0

Sonner is an opinionated toast component for React. You can read more about why and how it was built here.

Usage

To start using the library, install it in your project:

npm install sonner

Add <Toaster /> to your app, it will be the place where all your toasts will be rendered. After that you can use toast() from anywhere in your app.

import { Toaster, toast } from 'sonner';

// ...

function App() {
  return (



      <Toaster />
      <button onClick={() => toast('My first toast')}>Give me a toast</button>



  );
}

Documentation

Find the full API reference in the documentation.

Extension points exported contracts — how you extend this code

PromiseIExtendedResult (Interface)
(no doc)
src/types.ts
ToastClassnames (Interface)
(no doc)
src/types.ts
ToastIcons (Interface)
(no doc)
src/types.ts
Action (Interface)
(no doc)
src/types.ts
ToastT (Interface)
(no doc)
src/types.ts

Core symbols most depended-on inside this repo

cn
called by 10
src/index.tsx
isAction
called by 4
src/types.ts
getDampening
called by 2
src/index.tsx
getDocumentDirection
called by 2
src/index.tsx
assignAll
called by 2
src/index.tsx
promise
called by 1
test/src/app/page.tsx
action
called by 1
test/src/app/action.tsx
getAsset
called by 1
src/assets.tsx

Shape

Function 41
Interface 10
Class 2
Method 2
Enum 1

Languages

TypeScript100%

Modules by API surface

src/types.ts12 symbols
src/index.tsx12 symbols
src/state.ts8 symbols
test/src/app/page.tsx3 symbols
website/src/components/Position/index.tsx2 symbols
src/hooks.tsx2 symbols
src/assets.tsx2 symbols
website/theme.config.jsx1 symbols
website/src/pages/index.tsx1 symbols
website/src/pages/_app.tsx1 symbols
website/src/components/Usage/index.tsx1 symbols
website/src/components/Types/Types.tsx1 symbols

Dependencies from manifests, versioned

@playwright/test1.49.1 · 1×
@types/node18.11.13 · 1×
@types/react18.0.26 · 1×
@types/react-dom18.0.11 · 1×
@vercel/analytics1.1.0 · 1×
ai3.4.9 · 1×
autoprefixer10.4.15 · 1×
bunchee6.3.3 · 1×
clsx2.0.0 · 1×
copy-to-clipboard3.3.3 · 1×
eslint8.35.0 · 1×
eslint-config-next13.2.4 · 1×

For agents

$ claude mcp add sonner \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact