Prompt is the confirmation / alert dialog — not a duplicate of Dialog.
Prompt (s-prompt)
Dialog (s-dialog)
Purpose
Quick confirm, alert, or short forms with validation
General-purpose modal shell
Layout
Fixed: title bar + body + Accept / Cancel footer
Fully custom #header, default, #footer slots
Typical use
“Delete this item?”, security code, name validation
Login panel, nested modals, fullscreen content
Overlay (confirm)
Shakes to hint “use a button”
Closes or uses prevent-close
In Vuesax 3.x both come from the Dialogs family (vs-prompt is a preset on the same dialog primitive). Popup (vs-popup) is yet another component — a titled content panel, not yet migrated here.
Rule of thumb: need built-in OK/Cancel → Prompt. Need to own the whole layout → Dialog.
@cancel="val = ''"
@accept="activePrompt = false"
@close="activePrompt = false"
>
<divclass="con-exemple-prompt">
Enter the security code
<s-inputv-model="val"placeholder="Code"/><s-selectv-model="select1"label="Figuras"class="select-example"><s-select-itemv-for="(item, index) in options1":key="index":value="item.value":text="item.text"/></s-select></div></s-prompt>
<s-prompt
v-model="activePrompt2"
color="danger"
title="Dialog"
@cancel="
() => {
valMultiple.value1 = ''
valMultiple.value2 = ''
}
"
@accept="activePrompt2 = false"
@close="activePrompt2 = false"
>
<divclass="con-exemple-prompt">
Enter your first and last name to <b>continue</b>.
<s-inputv-model="valMultiple.value1"placeholder="Name"/><s-inputv-model="valMultiple.value2"placeholder="Last Name"/><s-alert:model-value="!validName"color="danger"><template#icon><s-iconname="cb:warning-alt"/></template>
Fields can not be empty please enter the data
</s-alert></div></s-prompt></div></template><scriptsetuplang="ts">
import { computed, reactive, ref } from 'vue'
Use is-valid to disable the accept button until the form inside the slot is valid.
Code copied
<template><divclass="prompt-demo"><s-buttontype="border"@click="active = true">Run validation prompt</s-button><s-promptv-model="active"color="danger"title="Dialog":is-valid="validName"@cancel="reset"@accept="active = false"@close="active = false"><divclass="con-exemple-prompt">
Enter your first and last name to <b>continue</b>.
<s-inputv-model="firstName"placeholder="Name"/><s-inputv-model="lastName"placeholder="Last Name"/><s-alert:model-value="!validName"color="danger"><template#icon><s-iconname="cb:warning-alt"/></template>
Fields can not be empty please enter the data
</s-alert>