Theme

Toggle theme simulatously

React-Pings have built in theme support for dark, light and system mode.

By default react-pings use system theme, for toggling theme you just need to pass theme prop to <PingsToastsProvider>.

Typescript
1<PingsToastsProvider theme="system">
2 <App />
3</PingsToastsProvider>
1<PingsToastsProvider theme="system">
2 <App />
3</PingsToastsProvider>

or for nextjs

Typescript
1<PingsToastsProvider theme="system">{children}</PingsToastsProvider>
1<PingsToastsProvider theme="system">{children}</PingsToastsProvider>