Home > widget-integration > CountdownTimerController > hide

CountdownTimerController.hide() method

Hide the timer element and destroy the controller.

Signature:

protected hide(): void;

Returns:

void

Example

Override to add a fade-out before hiding:

protected hide() {
  if (this.element) {
    this.element.style.transition = 'opacity 0.3s';
    this.element.style.opacity = '0';
    setTimeout(() => super.hide(), 300);
  } else {
    super.hide();
  }
}