Alocite Provider

Functionality

Provider need to be used to wrap your app.

  • It will provide the theme control to your app.
  • It provide the toaster for your app.
  • It provide the tooltip for your app.
app/layout.tsx
import { AlociteProvider } from '@alocite/ui'
 
export default function RootLayout({ children }: { children: React.ReactNode }): JSX.Element {
  return (
    <html lang="en">
      <body>
        <AlociteProvider>{children}</AlociteProvider>
      </body>
    </html>
  )
}

Props

PropTypeDescriptionDefault
childrenReact.ReactNodeThe child components to be rendered within the provider.
forcedThemestringThe theme to be enforced regardless of system settings.
defaultThemestringThe initial theme before user selection or system preference.
enableSystembooleanEnables the use of the system's theme settings.true
toastPosition'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'The position of the toast notifications.'bottom-right'
toastExpandbooleanDetermines if toast notifications are expandable.false
toastRichColorsbooleanEnables rich color schemes in toast notifications.true