Info Card β
The purpose of this component is to convey information to the user via different pre-colored cards. It can be customized with a Title, Content and CTA via slots.
js
import { XerInfoCard } from "@xerius/codey-components";
Showcases β
Default β
With Different Title Heading Levels β
With Buttons in the CTA Slot β
With Custom Title and Content Slot β
Props β
Name | Type | Default | Required | Description |
---|---|---|---|---|
id | String | true | The ID Value | |
dataAutomationId | String | () => id | false | The data automation id value |
title | String | false | The Title Value that is displayed at the top of the Info Card with default styling | |
titleHeadingIs | "h1", "h2", "h3", "h4", "h5", "h6" | "h2" | false | The heading level of the title (h1-h6) |
severity | InfoCardSeverity | true | The Severity in which color the Info Card is presented (Primary, Brand, Base) |
Slots β
Name | Purpose |
---|---|
title | For custom usage of the Title segment, if used then title property will not be used |
default | For custom usage of the Content segment, if used then content slot will not be used |
content | For default usage of the Content segment (used for text with default styling) |
cta | For custom usage of the CTA segment where content can be provided (like buttons) to enhance Info Card's functionality |
Automation Ids β
Name | Purpose |
---|---|
"[dataAutomationId]_title" or "infoCard_label" | Title segment only when used with Title property |