Card
Group content and actions around one subject.
Examples
Group content and actions around one subject
December release
Operations checklist
React code
import {
Card,
CardHeader,
CardTitle,
CardDescription,
CardContent,
CardFooter,
} from "@accelerate/react/components";
export function Example() {
return (
<>
<Card>
<CardHeader>
<CardTitle>December release</CardTitle>
<CardDescription>Operations checklist</CardDescription>
</CardHeader>
<CardContent>Review permissions and test the approval workflow.</CardContent>
<CardFooter>
<a href="/migration/">Open the checklist</a>
</CardFooter>
</Card>
</>
);
}Angular code
import { Component } from "@angular/core";
import {
AccCard,
AccCardHeader,
AccCardTitle,
AccCardDescription,
AccCardContent,
AccCardFooter,
} from "@accelerate/angular/components";
@Component({
selector: "app-example",
imports: [
AccCard,
AccCardHeader,
AccCardTitle,
AccCardDescription,
AccCardContent,
AccCardFooter,
],
template: `
<section accCard>
<header accCardHeader>
<h3 accCardTitle>December release</h3>
<p accCardDescription>Operations checklist</p>
</header>
<div accCardContent>Review permissions and test the approval workflow.</div>
<footer accCardFooter>
<a href="/migration/">Open the checklist</a>
</footer>
</section>
`,
})
export class Example {}Installation
Source preview. The expanded component catalog is ahead of the public npm releases. To run these examples in your own application, use packages built from the SDK source used for the previews or a release that includes the APIs below.
- React
@accelerate/ui@0.4.0and@accelerate/react@0.4.0- Angular
@accelerate/ui@0.4.0and@accelerate/angular@0.2.0
Load @accelerate/ui/theme.css and put acc-theme on the app or the region using Accelerator components. See the framework setup guide for the theme and adapter conventions.
Usage
Compose CardHeader, CardTitle, CardDescription, CardContent, and CardFooter.
Import the React component Card from @accelerate/react/components. For Angular, add AccCard to the standalone component’s imports and use <section accCard>.
Examples use these React parts: Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter. The Angular examples show the corresponding directives and template hosts.
API reference
- CardHeader / CardContent / CardFooter
- Use the parts that fit the content.
- CardTitle / CardDescription
- Establish a clear heading and supporting context.