A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.

Fields

NameTypeDescriptionOptions
Interval (ms)NumberHow much time to wait between ticks. A tick is considered finished when its event is handled.-
ActiveBooleanWhether the timer should trigger tick events.-
AccentColor--
Custom CSS classesTextCSS classes, separated by spaces. You can define classes in custom stylesheets.-

Events

Emitted when the timer ticks.
def handle_timer_tick(state):

# Increment counter when the timer ticks

state["counter"] += 1