Skip to main content

Counter API Overview

Initialization

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

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

Counter Properties

disableddefines whether a counter is disabled
errordefines whether error styling is applied to the Counter control
idsets an HTML id for a counter
maxsets the maximal value of the counter
minsets the minimal value of the counter
readonlydefines whether a counter is read-only
stepsets the jump between values of the counter
valuesets the value of a counter

Counter Events

changefires when a number is changed in the counter