Skip to content

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 ​

NameTypeDefaultRequiredDescription
idStringtrueThe ID Value
dataAutomationIdString() => idfalseThe data automation id value
titleStringfalseThe Title Value that is displayed at the top of the Info Card with default styling
titleHeadingIs"h1", "h2", "h3", "h4", "h5", "h6""h2"falseThe heading level of the title (h1-h6)
severityInfoCardSeveritytrueThe Severity in which color the Info Card is presented (Primary, Brand, Base)

Slots ​

NamePurpose
titleFor custom usage of the Title segment, if used then title property will not be used
defaultFor custom usage of the Content segment, if used then content slot will not be used
contentFor default usage of the Content segment (used for text with default styling)
ctaFor custom usage of the CTA segment where content can be provided (like buttons) to enhance Info Card's functionality

Automation Ids ​

NamePurpose
"[dataAutomationId]_title" or "infoCard_label"Title segment only when used with Title property