Skip to main content

Button API Overview

Initialization

<script>
import { Button } from "wx-svelte-core";
</script>

<!-- minimal configuration for initialization -->
<Button>Click Me</Button>
tip
  • Visit the Features Guide to learn more about the control's functionality.
  • Explore the samples to visualize the available features.

Button Properties

clickadds a click handler to a button
cssadds a custom style to a button
disableddefines whether a button is disabled
iconadds an icon into a button
textadds a text for a button
titlesets a tooltip text with additional info about the control
typesets the type of a button

Button Events

clickfires when a button is clicked