Skip to main content

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

clickadds a click handler to a Two State button
cssadds a custom style to a Two State button
disableddefines whether a Two State button is disabled
iconadds an icon into a Two State button
iconactiveadds an icon into a Two State button in the pressed state
titlesets a tooltip text with additional info about the control
typesets the type of a Two State button
valuedefines whether a button is pressed