Skip to content

SiValueWidgetComponent documentation

selector
si-value-widget

Is a dynamic UI component that not only displays information, but also includes embedded actions which the user can interact with to perform tasks directly related to the card's content. Actions might include editing settings, initiating processes, or deleting resources.

The actionable widget turns data representation into an interactive hub, streamlining the user's tasks and decisions associated with the card's content.

This component is a wrapper using the .si-value-widget CSS classes and the <​si-card​> component. For more configuration options, use the CSS classes directly.

Input Properties

NameTypeDefaultDescription
accentLine
AccentLineTypeOptional accent line
description
TranslatableStringShort description of the value. A description is mandatory to show an icon. Only visible if value is available.
disableAutoLoadingIndicator
booleanfalseOption to disable automatic start of skeleton loading indication.
heading
TranslatableStringValue widget header text.
icon
stringThe element icon name. Only visible if value is available.
imgAlt
stringAlt text for a provided image.
imgDir
("horizontal" | "vertical")'vertical'Defines if an image is placed on top or start (left) of the card.
imgObjectFit
("fill" | "contain" | "cover" | "none" | "scale-down")'scale-down'Sets the image object-fit CSS property.
imgObjectPosition
stringSets the image object-position CSS property.
imgSrc
stringImage source for the card.
initialLoadingIndicatorDebounceTime
number300Initial delay time in milliseconds before enabling loading indicator. Only used once initially during construction.
LinkLink that leads the user to more information or triggers and action. The link.title is displayed. The title will be translated.
primaryActions
(MenuItem | ContentActionBarMainItem)[][]Input list of primary action items. Supports up to 4 actions and omits additional ones.
secondaryActions
(MenuItem | MenuItem)[][]Input list of secondary action items.
showLoadingIndicator
booleanfalseInput to start and stop the skeleton loading indication.
status
EntityStatusTypeShow a status icon instead of the icon .
unit
TranslatableStringThe unit of the value (e.g. kWh or users). Only visible if value is available.
value
TranslatableStringThe main value to be displayed. If no value is set, the skeleton indicates the loading of the value. Disable the automatic loading mechanism by setting SiValueWidgetComponent.disableAutoLoadingIndicator .

Types Documentation

(StatusType | "caution" | "primary" | "inactive")
Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit . Equivalent to a normal string in usage and functionality.
("success" | "info" | "warning" | "danger" | "caution" | "critical")
Translatable
import
Properties
Action that called when the item is triggered. A function will be called, a string will be dispatched to the SiMenuActionService .
action: (string | (actionParam: any, source: this) => void)
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "action"
Properties
Action that called when the item is triggered. A function will be called, a string will be dispatched to the SiMenuActionService .
action: (string | (actionParam: any, source: this) => void)
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Whether the checkbox is checked.
checked: boolean
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "checkbox"
Properties
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Submenu items for this menu item.
children: MenuItem[]
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "group"
Properties
Items that are part of the radio group.
children: [ MenuItemHeader, ...(MenuItemRadio | MenuItemHeader | MenuDivider)[] ]
type: "radio-group"
Properties
Action that called when the item is triggered. A function will be called, a string will be dispatched to the SiMenuActionService .
action: (string | (actionParam: any, source: this) => void)
Badge that is rendered after the label.
badge?: (string | number) from badge
Color of the badge (not iconBadge).
badgeColor?: string from badgeColor
Whether the radio is checked.
checked: boolean
Whether the menu item id disabled.
disabled?: boolean from disabled
Optional icon that will be rendered before the label.
icon?: string from icon
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean) from iconBadge
ID that will be attached to the DOM node.
id?: string from id
Label that is shown to the user.
label: TranslatableString from label
type: "radio"
Properties
The label of the header.
label: string
type: "header"
Properties
type: "divider"
Properties
Badge that is rendered after the label.
badge?: (string | number)
Color of the badge (not iconBadge).
badgeColor?: string
Whether the menu item id disabled.
disabled?: boolean
Optional icon that will be rendered before the label.
icon?: string
Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.
iconBadge?: (string | number | boolean)
ID that will be attached to the DOM node.
id?: string
Label that is shown to the user.
label: TranslatableString
Implement and provide this to an SiMenuFactoryComponent to receive trigger events.
Constructor
() => {}
Methods
Will be called by SiMenuFactoryComponent if an action is defined with a string instead of a function.
Parameters
item: (MenuItemAction | MenuItemCheckbox | MenuItemRadio)
actionParam?: any
Used in events emitted from SiLinkActionService
Properties
param: any
Constructor
() => {}
Properties
actionParam: InputSignal<unknown> = ...
items: InputSignal<(undefined | readonly (MenuItem | MenuItem)[])> = ...
linkActionService: (null | SiLinkActionService) = ...
menuActionService: (null | SiMenuActionService) = ...
Methods
Parameters
item: (MenuItem | MenuItem)
Parameters
item: (MenuItem | MenuItem)
Parameters
item: MenuItem
Parameters
item: (MenuItemAction | MenuItemCheckbox | MenuItemRadio)
Constructor
() => {}
Properties
Observable which emits the link and param to run the action on.
action$: Observable<LinkAction> = this.actionSubject.asObservable()
actionSubject: Subject<LinkAction> = ...
Methods
(link: Link, param: any) => void
Emit a new link and param pair to run the action on.
Parameters
param: any

Except where otherwise noted, content on this site is licensed under MIT License.