Skip to content

SusRepeatButton

SusRepeatButton

Hold to auto-repeat clicks — first delay, then interval ticks.

Package

SusKit · Atoms (commercial)

Open in Playground

SusKit · Atoms

Props

NameTypeDefault
TextProp<string>"Hold"v-model
IconProp<string>""v-model
VariantProp<string>"elevated"v-model
ColorProp<string>"primary"v-model
SizeProp<string>"default"v-model
DisabledProp<bool>falsev-model
InitialDelayMsProp<int>400v-model
IntervalMsProp<int>80v-model
IsHoldingProp<bool>falsev-model

Slots

No slots.

Events

NameFieldPayload
ClickOnClick
RepeatOnRepeat

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-repeat-button
  • sus-repeat-button--disabled
  • sus-repeat-button--holding

Usage

xml
<template>
  <sus:SusRepeatButton Text="+"
                       Variant="tonal"
                       Color="primary"
                       InitialDelayMs="400"
                       IntervalMs="80"
                       @click="OnStep"
                       @repeat="OnStep" />
</template>

<script>
void OnStep() { /* increment once per click / tick */ }
</script>
csharp
var rpt = new SusRepeatButton();
rpt.Text.Value = "−";
rpt.InitialDelayMs.Value = 400;
rpt.IntervalMs.Value = 80;
rpt.OnClick += () => { /* … */ };
rpt.OnRepeat += () => { /* … */ };

Variant

elevated · flat · tonal · outlined · text · plain

Notes

  • OnClick fires on press; OnRepeat fires on each auto-tick while held.