CngxCardTimestamp
projects/common/card/card-timestamp.component.ts
Import#
import { CngxCardTimestamp } from '@cngx/common/card'
Description#
Displays a formatted date/timestamp, typically in a card footer.
Uses Intl.DateTimeFormat with the injected LOCALE_ID.
<cngx-card>
<footer cngxCardFooter>
<cngx-card-timestamp [date]="evaluationDate()" prefix="Evaluierung am:" />
</footer>
</cngx-card>Metadata#
Default visuals for CngxCardTimestamp. The host carries
.cngx-card-timestamp - a lightweight inline-flex container that
renders an optional label slot before a muted timestamp string.
Slots
.cngx-card-timestamp__prefix- optional label before the date
Inheritance
Leaf tokens - the timestamp surface owns its own color, size, and
gap without delegating to a foundation cascade. Inline font-size
sits at 0.75rem so the timestamp reads as secondary metadata.
Dark mode
Three hooks lift the muted text from a dark gray to a soft light gray so the timestamp retains its secondary-information weight against a dark surface:
prefers-color-scheme: dark[data-color-scheme="dark"]/.darkclass[data-color-scheme="light"]/.lightclass (explicit pin)