Counter

Overview

The Counter is a component designed to measure time or duration, displayed in the HH format. It allows users to track events by either counting up (like a stopwatch) or counting down (like a countdown timer).

For example, you might use a Counter in a project management dashboard to count down the time remaining for a task deadline. As time progresses, the Counter updates in real-time, helping users stay aware of time-sensitive activities.

image-20240816-102533.png
Counter

Attributes

Attributes are the options available for each component, allowing you to customize its appearance and functionality. They help you tailor the look and behavior of your components to fit your needs.

Basic:

image-20240925-140104.png
Basic

Attribute Name

Description

Attribute Name

Description

Component Size

  • This allows users to modify the size of a specific component according to the grid size of layout.

For example,
If the layout grid size is 3 then layout is divided into 3 sections then you can changes the components size between 1 to 3.

Counting Order

You can set the Counter to either increment or decrement:

  • Increasing: The Counter starts at 00 and continues to increase until it reaches the maximum time you set.

  • Decreasing: The Counter starts at the time value you provide (in milliseconds) and counts down to 00.

Total Time

Here, users can set the time to start counting either in increasing or decreasing order.

Warning Unit

Here, you can set the counting unit

Seconds: Set seconds as the warning unit to trigger alerts for short time intervals.

Minutes: Use minutes as the warning unit for medium-length warnings.

Hours: Choose hours as the warning unit to generate alerts for longer durations.

Default Variant

Change the color of the Counter below are the different variants:

Default: Default color is Grey.

Inverse: Change the badge color to Dark Grey.

Lightest: Change the badge color to White.

Success: Change the badge color to Green.

Warning: Change the badge color to Orange.

Error: Change the badge color to Red.

Warning Variant

Change the color of the Counter below are the different variants

Default: Default color is Grey.

Inverse: Change the badge color to Dark Grey.

Lightest: Change the badge color to White.

Success: Change the badge color to Green.

Warning: Change the badge color to Orange.

Error: Change the badge color to Red.

Base UI:

Attribute Name

Description

Attribute Name

Description

Padding Location

"Padding Location" typically refers to the configuration of spacing around elements

Padding Size

"Padding Size" refers to the amount of space added inside an element, between the element's content and its border or edge.

Margin Location

"Margin Location" refers to the spacing around the outside edge of an element

Margin Size

"Margin Size" refers to the amount of space around the outside edges of an element,

Style

  • It is used to apply custom styles to section, such as color, font, size, and more.

  • It allows you to define the appearance of a component by specifying CSS properties directly within the attribute.

Classes

  • It is used to apply SLDS classes to section, if needed.

UI State:

Attribute Name

Description

Visibility Type

It determines whether a component is visible on the layout. It offers the following visibility types:

  1. Always: The component will always be visible.

  2. Conditional: The component's visibility is determined based on specific criteria, which can make it either visible or hidden as needed.
    You can explore more about Visibility Type here.

 

 

Events

  • Events are essentially the automation of invoking the component's actions.

  • Here, we have onload event, on start event, on stop event, on tick event, on warning event actions are available for this components.

Counter Event

Description

Counter Event

Description

on Load

This event action is triggered when the counter component is loaded.

on Start

This event action is triggered when the counter time starts.

on Stop

This event action is triggered when the counter time stop.

on Tick

This event action is triggered when the counter time is tick.

on Warning

This event action is triggered when the counter time warning is shows.

Below here is the onload event workflow action.