Skip to content

Widget

Design guidelines
HTML
React
Angular
<certara-widget-box headline="Headline prop">
<certara-form-group label="Input">
<certara-input name="firstName"></certara-input>
</certara-form-group>
</certara-widget-box>
import { CertaraFormGroup, CertaraInput, CertaraWidgetBox } from '@certara/certara-ui-react';
<CertaraWidgetBox headline="Headline prop">
<CertaraFormGroup label="Input">
<CertaraInput name="firstName" />
</CertaraFormGroup>
</CertaraWidgetBox>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-widget-box headline="Headline prop">
<certara-form-group label="Input">
<certara-input name="firstName"></certara-input>
</certara-form-group>
</certara-widget-box>
Submit Cancel
<certara-widget-box headline="With footer" icon="align-justify">
<certara-form-group label="Input">
<certara-input name="firstName"></certara-input>
</certara-form-group>
<div slot="widget-box-footer">
<certara-button>Submit</certara-button>
<certara-button variant="link">Cancel</certara-button>
</div>
</certara-widget-box>
import { CertaraButton, CertaraFormGroup, CertaraInput, CertaraWidgetBox } from '@certara/certara-ui-react';
<CertaraWidgetBox headline="With footer" icon="align-justify">
<CertaraFormGroup label="Input">
<CertaraInput name="firstName" />
</CertaraFormGroup>
<div slot="widget-box-footer">
<CertaraButton>Submit</CertaraButton>
<CertaraButton variant="link">Cancel</CertaraButton>
</div>
</CertaraWidgetBox>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-widget-box headline="With footer" icon="align-justify">
<certara-form-group label="Input">
<certara-input name="firstName"></certara-input>
</certara-form-group>
<div slot="widget-box-footer">
<certara-button>Submit</certara-button>
<certara-button variant="link">Cancel</certara-button>
</div>
</certara-widget-box>
<certara-widget-box headline="Title" open="true">
<certara-form-group label="Input">
<certara-input name="firstName"></certara-input>
</certara-form-group>
</certara-widget-box>
import { CertaraFormGroup, CertaraInput, CertaraWidgetBox } from '@certara/certara-ui-react';
<CertaraWidgetBox headline="Title" open={true}>
<CertaraFormGroup label="Input">
<CertaraInput name="firstName" />
</CertaraFormGroup>
</CertaraWidgetBox>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-widget-box headline="Title" open="true">
<certara-form-group label="Input">
<certara-input name="firstName"></certara-input>
</certara-form-group>
</certara-widget-box>

headline

Attributeheadline
Typestring
Defaultundefined
Requiredfalse
DescriptionOutput in the header of the widget box

icon

Attributeicon
Typestring
Defaultundefined
Requiredfalse
DescriptionSet 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

Attributeopen
Typeboolean
Defaultundefined
Requiredfalse
DescriptionThis 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

Attributepadded
Typeboolean
Defaultundefined
Requiredfalse
DescriptionIf 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

Attributespace-inside
Type"md" | "none"
Defaultundefined
Requiredfalse
DescriptionIf 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

Attributewidth
Typestring
Defaultundefined
Requiredfalse
DescriptionOptional width of the card. Accepts a value of 30rem, 370px, or any valid CSS size value.
NameDescriptionBubbles
certaraToggleFollows the native toggle event for the HTML <details> element to emit interaction with the controltrue

There are no public methods available for this component

NameDescription
Main slot for widget content
widget-box-footerSlot for items appearing in the widget-box footer
widget-box-headingSlot for custom formatted heading
widget-box-iconSlot for custom header icon
widget-header-rightSlot 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.

Sample help text
  • 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)

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.

View component in Figma