Button with text, an icon and a click action.
| Prop | Type | Default | Meaning |
|---|---|---|---|
text | string | undefined | undefined | Text to display. |
disabled | boolean | undefined | false | Disables interaction. |
type | "default" | "normal" | "danger" | "success" | undefined | normal | Appearance/input type; see the signature for allowed values. |
useSubmitBehavior | boolean | undefined | false | Uses a native submit button. |
Events
| Event | Payload / behavior |
|---|---|
| click | Click event carrying MouseEvent. |
Slots
| Slot | Arguments |
|---|---|
| default | () |
<script setup lang="ts">
import { ref } from 'vue'
import { TxButton } from '@tekocloud.de/tecexpress'
import '@tekocloud.de/tecexpress/themes/index.css'
const saved = ref(false)
</script>
<template>
<TxButton :text="saved ? 'Saved ✓' : 'Save'" @click="saved = true" />
</template>