Widget
Remove default padding with the space-inside prop
Note the hr spanning the full width
widget-box-icon slot
Custom title
Custom headings with complex markup can be achieved with the widget-box-heading slot
Collapsible widget-box
Section titled “Collapsible widget-box”certara-widget-box
Section titled “certara-widget-box”Properties
Section titled “Properties”headline
| Attribute | headline |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Output in the header of the widget box |
icon
| Attribute | icon |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Set the icon name to display in the widget box header. If no icon is set, the default is lines. List of available Font Awesome icons |
open
| Attribute | open |
| Type | boolean |
| Default | undefined |
| Required | false |
| Description | This sets the open state of the widget box and turns it into a disclosure width if present. If this is set to false, the widget box is collasped by default. |
padded
| Attribute | padded |
| Type | boolean |
| Default | undefined |
| Required | false |
| Description | If this is set to false, it zeros out the padding on the widget content, for instance if you want a full width table inside the widget box DEPRECATED. Use spaceInside instead. Will be removed in the next major version. |
spaceInside
| Attribute | space-inside |
| Type | "md" | "none" |
| Default | undefined |
| Required | false |
| Description | If this is set to none, it zeros out the padding on the widget content, for instance if you want a full width table inside the widget box. Defaults to md. |
width
| Attribute | width |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Optional width of the card. Accepts a value of 30rem, 370px, or any valid CSS size value. |
Events
Section titled “Events”| Name | Description | Bubbles |
|---|---|---|
certaraToggle | Follows the native toggle event for the HTML <details> element to emit interaction with the control | true |
Methods
Section titled “Methods”There are no public methods available for this component
| Name | Description |
|---|---|
| Main slot for widget content | |
widget-box-footer | Slot for items appearing in the widget-box footer |
widget-box-heading | Slot for custom formatted heading |
widget-box-icon | Slot for custom header icon |
widget-header-right | Slot for right-aligned header content |
Widget boxes are used to group form sections together for users to scan, read, and get things done. It displays content in a familiar and recognizable style.
Design guidelines
Section titled “Design guidelines”Variants
Section titled “Variants” Best practices
Section titled “Best practices”Using a footer
Section titled “Using a footer”- Same as Card guidelines
- When the widget box has a footer, place all action items in the footer for users to find quickly.
- When there is no footer and has a help article link, use the space in the upper right corner of the card for persistent, optional actions (such as Read the help article)
Accessibility
Section titled “Accessibility”Screen reader support
Section titled “Screen reader support”Use semantic HTML to provide more context to screen readers and bots. For example, use <header> HTML tag for card headers, <footer> HTML tag for card footers, and wrap the card in an <article> or <section> HTML tag.