Universal Component

Modal

Lightweight modal dialog

This page was migrated by AI, please review carefully

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

Modal

Centered modal for short tasks or confirmations.

Basic Usage

Trigger a lightweight modal.

Demo will load when visible.
<script setup lang="ts">
import { ref } from 'vue'

const open = ref(false)
</script>

<template>
  <TxButton variant="primary" @click="open = true">Open Modal</TxButton>
  <TxModal v-model="open" title="Quick Action">
    <p>Give the user a short task or decision.</p>
    <template #footer>
      <TxButton variant="ghost" @click="open = false">Cancel</TxButton>
      <TxButton variant="primary" @click="open = false">Confirm</TxButton>
    </template>
  </TxModal>
</template>

API (Lite)

PropertyTypeDefaultDescription
modelValueVisible state
titleModal title
widthContent width