Installation
v0.3.11 · Latest stableSoDialog has zero required runtime dependencies. Install the package, then import the ESM API and CSS explicitly.
bash
npm install sodialog
pnpm add sodialog
yarn add sodialog
bun add sodialogESM
ts
import { openModal, pushMessage } from 'sodialog'
import 'sodialog/style.css'
openModal({
title: 'Hello',
content: '<p>Your dialog is ready.</p>',
})
pushMessage('success', 'Saved')TypeScript
Types are provided by dist/types/lib.d.ts.
ts
import type { SoDialogModalOptions, SoToastOptions } from 'sodialog'