Two State Button API Overview
Initialization
<script>
import { TwoState } from "wx-svelte-core";
</script>
<!-- minimal configuration for initialization -->
<TwoState>Click Me</TwoState>
tip
- Visit the Features Guide to learn more about the control's functionality.
- Explore the samples to visualize the available features.
Two State Button Properties
css | adds a custom style to the Two State button |
disabled | defines whether the Two State button is disabled |
icon | adds an icon for the Two State button |
iconactive | adds an icon for the Two State button in the pressed state |
text | adds a text for the Two State button |
textactive | adds a text for the Two State button in the pressed state |
title | sets a tooltip text with additional info about the control |
type | sets the type of the Two State button |
value | defines whether a button is pressed |
Two State Button Events
change | fires when the state of the Two State button changes |
click | adds a click handler to the Two State button |