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.
certara-card
Section titled “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.
Properties
Section titled “Properties”bodyClassName
| Attribute | body-class-name |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Adds optional classes to the card body, for instance to zero out padding “pb-0” when there’s a footer that already has padding. |
headline
| Attribute | headline |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Optional title of the card, appended as the first item in the card body. |
href
| Attribute | href |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Links the entire card if present, using the stretched link utility class. |
size
| Attribute | size |
| Type | "default" | "xs" |
| Default | 'default' |
| Required | false |
| Description | A size of ‘small” creates a mini-card, with tighter padding. |
subtitle
| Attribute | subtitle |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Optional subtitle of the card, appended to the card body under the title in smaller, gray text. |
target
| Attribute | target |
| Type | "_blank" | "_parent" | "_self" | "_top" | "_unfencedTop" |
| Default | undefined |
| Required | false |
| Description | If href is present, this sets the target of the link. |
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”There are no events available for this component
Methods
Section titled “Methods”There are no public methods available for this component
| Name | Description |
|---|---|
| Main slot for card content | |
footer | Slot for custom footer content. Should use <certara-card-footer>. |
header | Slot for custom header content. Should use <certara-card-header>. |
image-top | Slot for an image that appears at the top of the card. Should use <certara-card-image slot="image-top">. |
certara-card-header
Section titled “certara-card-header”Header region of a <certara-card>.
Properties
Section titled “Properties”There are no public properties available for this component
Events
Section titled “Events”There are no events available for this component
Methods
Section titled “Methods”There are no public methods available for this component
| Name | Description |
|---|---|
| Main slot for custom header content |
certara-card-footer
Section titled “certara-card-footer”Footer region of a <certara-card>.
Properties
Section titled “Properties”There are no public properties available for this component
Events
Section titled “Events”There are no events available for this component
Methods
Section titled “Methods”There are no public methods available for this component
| Name | Description |
|---|---|
| Main slot for custom footer content |
certara-card-image
Section titled “certara-card-image”Image region of a <certara-card>, placed above or below the card body.
Properties
Section titled “Properties”alt
| Attribute | alt |
| Type | string |
| Default | '' |
| Required | false |
| Description | The alt text for the image, used for accessibility. |
imageSrc
| Attribute | image-src |
| Type | string |
| Default | undefined |
| Required | false |
| Description | The source URL of the image to display in the card. DEPRECATED. Use src instead. Will be removed in the next major version. |
placement
| Attribute | placement |
| Type | "bottom" | "top" |
| Default | undefined |
| Required | false |
| Description | The 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
| Attribute | src |
| Type | string |
| Default | undefined |
| Required | false |
| Description | The source URL of the image to display in the card. |
Events
Section titled “Events”There are no events available for this component
Methods
Section titled “Methods”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.
Design guidelines
Section titled “Design guidelines” Best practices
Section titled “Best practices”- 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)
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.