Card
Content container with projected header, body, and footer regions.
- Selector
- ui-card
- Package
- @ngnova/ui/card
Import
import { UiCardComponent } from '@ngnova/ui/card';Usage & variants
Live examples use the public ui-card API, paired with the exact snippet a product team would paste into an Angular app.
Card playground
Adjust the visual options, compare responsive widths, and copy the generated Angular template.
System Health
Overall server cluster performance is operating within optimal parameters. Network latency decreased by 12% in the last session.
Production guidance
Use these notes to decide when the component belongs in a product workflow and what to verify before shipping.
When to use
Use cards for repeated dashboard panels, settings sections, pricing options, or preview blocks.
Watch for
Empty header and footer slots collapse automatically.
Product recipes
Apply Card in distinct, copyable product scenarios—not just an isolated component state.
Settings card
Header and footer slots frame the main content.
1 2 3 4 5 6 7 8 9 10
<ui-card variant="elevated" padding="lg">
<div uiCardHeader>
<h3>Billing</h3>
<p>Manage plan and invoices.</p>
</div>
<p>Your Pro plan renews next month.</p>
<div uiCardFooter>
<ui-button variant="outline">View invoices</ui-button>
</div>
</ui-card>Usage summary
Compose a compact billing summary with supporting metadata and a clear next action.
1 2 3 4 5 6
<ui-card>
<h3 uiCardHeader>Current usage</h3>
<p class="text-3xl font-semibold">18,420 <span class="text-sm">requests</span></p>
<p class="text-sm text-slate-600">82% of the monthly allowance</p>
<a uiButton uiCardFooter href="/billing" variant="outline">Review billing</a>
</ui-card>API Reference
Inputs and outputs are semver-sensitive public API. Keep examples aligned with this table.
Inputs
variant 'outline' 'outline' | 'elevated' Card border and shadow treatment.
padding 'md' 'none' | 'sm' | 'md' | 'lg' Body padding scale.
ariaLabel '' string Optional accessible name that promotes the neutral card surface to a region.
| Name | Type | Default | Description |
|---|---|---|---|
variant | 'outline' | 'elevated' | 'outline' | Card border and shadow treatment. |
padding | 'none' | 'sm' | 'md' | 'lg' | 'md' | Body padding scale. |
ariaLabel | string | '' | Optional accessible name that promotes the neutral card surface to a region. |
Accessibility
- The card is a neutral container by default; ariaLabel promotes it to a named region only when useful for navigation.
- Use semantic headings inside card headers and avoid duplicating the same wording in ariaLabel.
Keyboard behavior
- Card itself has no keyboard interaction. Interactive projected content keeps its own behavior.
Testing guidance
- Assert projected header, body, and footer content render.
- Assert empty optional slots, neutral or named-region semantics, every variant, and every padding class.
- A component harness is unnecessary because Card has no state or interaction; consumers can locate projected content directly.