You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@saas-ui/modals

Package Overview
Dependencies
Maintainers
1
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saas-ui/modals

A modal manager for Chakra UI

3.0.0-next.36
Source
npmnpm
Version published
Weekly downloads
3.9K
2.4%
Maintainers
1
Weekly downloads
 
Created
Source

@saas-ui/modal

Chakra UI modals manager.

Build in modal types:

  • Modal
  • Drawer
  • Form
  • Dialog
  • ConfirmDialog
  • MenuDialog

Installation

$ yarn add @saas-ui/modals

#or

$ npm i @saas-ui/modals  --save

Usage

Add the ModalProvider to your app.

import { ModalsProvider } from '@saas-ui/modals'

export default App() {
  return (
    <ModalsProvider>
      {children}
    </ModalsProvider>
  )
}

Open a modal

import { useModals } from '@saas-ui/modals'

function MyComponent() {
  const modals = useModals()

  modals.open({
    title: 'My modal',
    body: <>My modal body</>,
  })
}

Open a drawer

import { useModals } from '@saas-ui/modals'

function MyComponent() {
  const modals = useModals()

  modals.drawer({
    title: 'My drawer',
    body: <>My drawer body</>,
  })
}

Open a confirm dialog

import { useModals } from '@saas-ui/modals'

function MyComponent() {
  const modals = useModals()

  modals.confirm({
    title: 'Delete user',
    body: 'Are you sure you want to delete this user?'
    onConfirm: () => //delete user
  })
}

Docs

https://www.saas-ui.dev/docs/overlay/modals-manager

Source

https://github.com/saas-js/saas-ui/tree/next/packages/saas-ui-modals

License

MIT - Appulse Software

Keywords

react

FAQs

Package last updated on 11 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts