Components/Dialog
Since 1.0.0BETA

Dialog

Critical confirmations and multi-style dialogs

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

Dialog

Dialogs surface important information and confirmations, including BottomDialog / BlowDialog / PopperDialog / TouchTip variants.

BottomDialog

Bottom-aligned dialog with customizable buttons and motion.

BottomDialog

Bottom sheet confirmation dialog.

Demo loads on client.

Button types

EXAMPLE.TS
const btns = [
  { content: 'Info', type: 'info', onClick: () => true },
  { content: 'Warning', type: 'warning', onClick: () => true },
  { content: 'Error', type: 'error', onClick: () => true },
  { content: 'Success', type: 'success', onClick: () => true },
]

Auto confirm timer

EXAMPLE.TS
const btns = [
  {
    content: 'Auto confirm',
    type: 'success',
    time: 5,
    onClick: () => true,
  },
]

Loading state

EXAMPLE.TS
const btns = [
  {
    content: 'Submit',
    type: 'success',
    onClick: async () => {
      await saveData()
      return true
    },
  },
]

BlowDialog

A centered dialog with dramatic animation.

BlowDialog

Focused, high-impact dialog.

Demo loads on client.

PopperDialog

PopperDialog

Lightweight popper-style prompt.

Demo loads on client.

TouchTip

TouchTip

Touch-friendly guidance prompt.

Demo loads on client.

Custom components

EXAMPLE.TS
import CustomContent from './CustomContent.vue'

function showCustomDialog() {
  return h(TxBlowDialog, {
    comp: CustomContent,
    close: () => {},
  })
}

Render function

EXAMPLE.TS
function showRenderDialog() {
  return h(TxBlowDialog, {
    render: () => h('div', [
      h('h2', 'Dynamic content'),
      h('p', 'Created with a render function'),
    ]),
    close: () => {},
  })
}

API

TxBottomDialog props

NameTypeDefaultDescription
titlestring''Dialog title
messagestring''Dialog message
staynumber0Auto close duration (ms)
close() => voidrequiredClose callback
btnsDialogButton[][]Button configs
iconstring''Icon class
indexnumber0z-index offset

DialogButton interface

EXAMPLE.TS
interface DialogButton {
  content: string
  type?: 'info' | 'warning' | 'error' | 'success'
  time?: number
  onClick: () => Promise<boolean> | boolean
  loading?: (done: () => void) => void
}

TxBlowDialog props

NameTypeDefaultDescription
titlestring''Dialog title
messagestring''Message (HTML supported)
close() => voidrequiredClose callback
compComponentundefinedCustom component
render() => VNodeundefinedRender function

TxPopperDialog props

NameTypeDefaultDescription
titlestring''Dialog title
messagestring''Message (HTML supported)
close() => voidrequiredClose callback
compComponentundefinedCustom component
render() => VNodeundefinedRender function

TxTouchTip props

NameTypeDefaultDescription
titlestring''Title
messagestring''Message text
buttonsTouchTipButton[][]Button configs
close() => voidrequiredClose callback

Accessibility

  • ESC to close
  • Focus trap inside dialog
  • Focus restore on close
  • ARIA attributes by default
Was this helpful?