Skip to main content

Widget

Widget component

A widget is a quick summary view of data from the product. It gives users quick access to a product area and the most recent content in use there, as well as key actions. Widgets are mainly used on the Home page.

Example:

Live Editor
Result
Loading...

Header

The header part accepts a title, primary action button, and filters.

Title: You can provide title value with the title prop. It accepts a string value.

Cta: You can provide the call-to-action button using a cta prop. This part uses the Atlas Button component with the primary button kind.

You can use the following props from the Button in cta prop object: label, id (used for providing the custom data-testid), iconName, onClick, onMouseEnter, onMouseLeave, onFocus, onBlur, onKeyDown, and disabled

Filters:

You can provide a filter set using the filters prop. This part uses the type of ReactNode that accepts Atlas components like Combobox, SegmentedButton etc.

Content

The content part of the Widget uses Atlas Table with limited features. resizing, header actions, header groups, header menu, nested table, editable, sticky, and dnd features are disabled here. You can use the data and columns props as its used in Atlas Table.

Action Menu:

The Action Menu adds the menu for all the rows to the table as a last column item. You can use the actionMenu prop to provide the action menu for the table, as in the examples.

EmptyState:

You can provide an EmptyState instead of the table within the "emptyState" prop used in the example.

Secondary Action

You can provide the secondary-call-to-action button to footer part of the Widget using a secondaryAction prop. This part uses the Atlas Button component with the secondary button kind.

Examples:

Apps

Live Editor
Result
Loading...

Pulse

Live Editor
Result
Loading...

Connections

Live Editor
Result
Loading...

Account users

Live Editor
Result
Loading...

Action center

Live Editor
Result
Loading...

Empty State

Live Editor
Result
Loading...

Grid examples

Live Editor
Result
Loading...

Props

NameTypeDefault
type *
type of accordion
"headline" | "list"
data *
accordion data
AccordionItem[]
bordered
makes accordion headers bordered - for list type only
boolean
disabled
makes all accordion items disabled
boolean
onItemUpdate
callback for getting clicked item id, expand status and type (clicked item is custom checkbox or accordion header)
((id: string | number, isExpanded: boolean, isCustomCheckbox: boolean) => void)
selectable
makes all items selectable
boolean
togglePosition
toggle button position - for list type only
"left" | "right"
backgroundColor
background color of headline
string
data-{foo}
Data attributes can be used by testing libraries to retrieve components or assert their existence
string
* - the prop is required.