Skip to content
SoDialog 0.3.11 · 零執行時必需依賴

Modern Dialogs
for Every Web Project

一套輕量、框架無關、面向現代 Web 應用的 Dialog 解決方案。

npm install sodialogv0.3.11
release-dialog.ts Ready
import { confirmModal } from 'sodialog'

const approved = await confirmModal({
  title: 'Deploy to production?',
  content: 'All checks have passed.',
  confirmText: 'Deploy now',
})
WHY SODIALOG

Everything a dialog library should be.
Nothing it shouldn't.

一套專注、可預測的互動基礎設施。保留宿主專案的技術選擇權,不讓依賴樹成為意外。

00

零強依賴

無需框架執行時、jQuery、Popper 或 Bootstrap。

TS

TypeScript First

從選項到返回句柄,公共 API 均有完整型別。

Promise API

用 async/await 編排 confirm、prompt 與表單流程。

Framework Agnostic

同一套核心能力服務原生專案和主流框架。

A11Y

Accessibility Friendly

原生 dialog 語義、鍵盤路徑與焦點恢復。

M

Mobile Friendly

響應式尺寸、觸控友好,並覆蓋窄屏互動。

~

Lightweight

聚焦 Dialog 領域,不攜帶大型 UI Framework。

EXPRESSIVE BY DEFAULT

Simple API. Serious capability.

從簡單提醒到完整業務流程,保持程式碼清晰、型別安全並且容易維護。

example.ts
import { openModal } from 'sodialog'

openModal({
  title: 'Deployment ready',
  content: 'Your changes are live.',
  footerButtons: [
    { label: 'Got it', role: 'confirm', action: 'destroy' },
  ],
})
TypeScriptUTF-8
BUILT FOR THE LONG RUN

Choose less complexity.

SoDialog 聚焦現代 Dialog 體驗,同時保留框架獨立、輕量和可維護的核心優勢。

SolutionPromise APIFramework agnosticRequired UI runtimeMaintenance
Native AlertNoneBrowser-limited
Bootstrap ModalBootstrap JSFramework coupled
SweetAlert2Package runtimeGeneral-purpose
SoDialog RecommendedNoneFocused & typed
WORKS WHERE YOU WORK

One library. Every modern stack.

Bootstrap 是相容對象,而不是依賴。SoDialog 的核心始終屬於 Web Platform。

JSVanilla JS
TSTypeScript
BBootstrap
TWTailwind
React
VVue
NNext.js
NuNuxt
DOCUMENTATION

Build something thoughtful.

從首次安裝到進階主題和完整 API,每個入口都為快速找到答案而設計。

READY WHEN YOU ARE

Your next dialog starts here.

零強依賴。完整 TypeScript 型別。幾分鐘即可接入。

Built for the open web. Bootstrap compatible, never Bootstrap dependent.

Released under the MIT License.