Skip to content

Card

Design guidelines

Cards are used to group similar concepts and tasks together for users to scan, read, and get things done. It displays content in a familiar and recognizable style.

HTML
React
Angular
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<certara-card headline="Card title" subtitle="This is a subtitle" width="370px">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</certara-card>
import { CertaraCard } from '@certara/certara-ui-react';
<CertaraCard headline="Card title" subtitle="This is a subtitle" width="370px">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</CertaraCard>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-card headline="Card title" subtitle="This is a subtitle" width="370px">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</certara-card>

Cards are used to group similar concepts and tasks together for users to scan, read, and get things done. It displays content in a familiar and recognizable style.

bodyClassName

Attributebody-class-name
Typestring
Defaultundefined
Requiredfalse
DescriptionAdds optional classes to the card body, for instance to zero out padding “pb-0” when there’s a footer that already has padding.

headline

Attributeheadline
Typestring
Defaultundefined
Requiredfalse
DescriptionOptional title of the card, appended as the first item in the card body.

href

Attributehref
Typestring
Defaultundefined
Requiredfalse
DescriptionLinks the entire card if present, using the stretched link utility class.

size

Attributesize
Type"default" | "xs"
Default'default'
Requiredfalse
DescriptionA size of ‘small” creates a mini-card, with tighter padding.

subtitle

Attributesubtitle
Typestring
Defaultundefined
Requiredfalse
DescriptionOptional subtitle of the card, appended to the card body under the title in smaller, gray text.

target

Attributetarget
Type"_blank" | "_parent" | "_self" | "_top" | "_unfencedTop"
Defaultundefined
Requiredfalse
DescriptionIf href is present, this sets the target of the link.

width

Attributewidth
Typestring
Defaultundefined
Requiredfalse
DescriptionOptional width of the card. Accepts a value of 30rem, 370px, or any valid CSS size value.

There are no events available for this component

There are no public methods available for this component

NameDescription
Main slot for card content
footerSlot for custom footer content. Should use <certara-card-footer>.
headerSlot for custom header content. Should use <certara-card-header>.
image-topSlot for an image that appears at the top of the card. Should use <certara-card-image slot="image-top">.

Header region of a <certara-card>.

Header Component
<certara-card-header slot="header">
<certara-hexagon class="bg-brand icon-brand">
<certara-icon icon="file-import" variant="light" size="24"></certara-icon>
</certara-hexagon>
<span class="text-tertiary ml-4">Header Component</span>
</certara-card-header>
import { CertaraCardHeader, CertaraHexagon, CertaraIcon } from '@certara/certara-ui-react';
<CertaraCardHeader slot="header">
<CertaraHexagon className="bg-brand icon-brand">
<CertaraIcon icon="file-import" variant="light" size={24} />
</CertaraHexagon>
<span className="text-tertiary ml-4">Header Component</span>
</CertaraCardHeader>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-card-header slot="header">
<certara-hexagon class="bg-brand icon-brand">
<certara-icon icon="file-import" variant="light" size="24"></certara-icon>
</certara-hexagon>
<span class="text-tertiary ml-4">Header Component</span>
</certara-card-header>

There are no public properties available for this component

There are no events available for this component

There are no public methods available for this component

NameDescription
Main slot for custom header content

Footer region of a <certara-card>.

Primary Secondary
<certara-card-footer slot="footer">
<certara-button color="brand" class="mr-3">Primary</certara-button>
<certara-button color="secondary">Secondary</certara-button>
</certara-card-footer>
import { CertaraButton, CertaraCardFooter } from '@certara/certara-ui-react';
<CertaraCardFooter slot="footer">
<CertaraButton color="brand" className="mr-3">Primary</CertaraButton>
<CertaraButton color="secondary">Secondary</CertaraButton>
</CertaraCardFooter>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-card-footer slot="footer">
<certara-button color="brand" class="mr-3">Primary</certara-button>
<certara-button color="secondary">Secondary</certara-button>
</certara-card-footer>

There are no public properties available for this component

There are no events available for this component

There are no public methods available for this component

NameDescription
Main slot for custom footer content

Image region of a <certara-card>, placed above or below the card body.

<certara-card-image slot="image-top" src="/assets/img/empty-states/empty-inbox.svg" alt="Empty inbox">
</certara-card-image>
import { CertaraCardImage } from '@certara/certara-ui-react';
<CertaraCardImage slot="image-top" src="/assets/img/empty-states/empty-inbox.svg" alt="Empty inbox">
</CertaraCardImage>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-card-image slot="image-top" src="/assets/img/empty-states/empty-inbox.svg" alt="Empty inbox">
</certara-card-image>

alt

Attributealt
Typestring
Default''
Requiredfalse
DescriptionThe alt text for the image, used for accessibility.

imageSrc

Attributeimage-src
Typestring
Defaultundefined
Requiredfalse
DescriptionThe source URL of the image to display in the card. DEPRECATED. Use src instead. Will be removed in the next major version.

placement

Attributeplacement
Type"bottom" | "top"
Defaultundefined
Requiredfalse
DescriptionThe placement of the image within the card. DEPRECATED. Position comes from the slot. Use slot="image-top" instead. Will be removed in the next major version.

src

Attributesrc
Typestring
Defaultundefined
Requiredfalse
DescriptionThe source URL of the image to display in the card.

There are no events available for this component

There are no public methods available for this component

There are no slots available for this component

Cards are used to group similar concepts and tasks together for users to scan, read, and get things done. It displays content in a familiar and recognizable style.

Header Component Badge Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Primary Secondary
  • Group related information
  • Display information in a way that prioritizes what the user needs to know most first
  • Use headings that set clear expectations about the card’s purpose
  • Stick to single user flows or break more complicated flows into multiple sections
  • Avoid more than 2 call-to-action buttons or links and only one primary call to action per card
  • Use calls to action on the bottom of the card for next steps and use the space in the upper right corner of the card for persistent, optional callouts (such as Time saver)

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