Date Badge
The Date Badge component provides a reusable pattern for datebadge in the interface.
Datebadge
Display a datebadge in it's simpliest form.
Apr
28
Apr
28
Apr
28
Datebadge - Small
Display a datebadge in it's simpliest form, small variant.
Apr
28
Datebadge - Large
Display a datebadge in it's simpliest form, large variant.
Apr
28
Datebadge - Translucent
Display a datebadge in it's simpliest form, translucent variant.
Apr
28
Apr
28
Apr
28
API
| Parameter | Default | Description |
|---|---|---|
|
date
|
false | A date string in any format or a unix timestamp. |
|
size
|
md | The size of the datebadge. Can be either 'sm', 'md' or 'lg'. |
|
translucent
|
false | If true, the datebadge will have a translucent background. |
|
color
|
light | The color of the datebadge. Can be either 'light', 'dark', 'primary', 'secondary'. |
CSS API
| Variable | Default | Type | Values | Description |
|---|---|---|---|---|
|
--c-datebadge--border-radius
|
var(--border-radius) | range | - | Border Radius |
|
--c-datebadge--border-width
|
var(--border-width) | range | - | Size |
|
--c-datebadge--space
|
var(--space) | range | - | Base spacing unit. Used for padding and margin inside components. |
|
--c-datebadge--color--primary
|
var(--color--primary) | color | - | Primary |
|
--c-datebadge--color--secondary
|
var(--color--secondary) | color | - | Secondary |
|
--c-datebadge--color--surface
|
var(--color--surface) | color | - | Surface |
|
--c-datebadge--color--surface-contrast
|
var(--color--surface-contrast) | color | - | Used for text and icons on surface backgrounds with less contrast. |
|
--c-datebadge--color--surface-border
|
var(--color--surface-border) | color | - | Manual companion token for borders on surface elements. |
|
--c-datebadge--corner-shape
|
var(--corner-shape) | select | square, round, squircle, circular, bevel, scoop | Corner Shape |
|
--c-datebadge--color--primary-contrast
|
var(--color--primary-contrast) | color | - | Primary Contrast |
|
--c-datebadge--color--primary-border
|
var(--color--primary-border) | color | - | Manual companion token for primary border and hover states. |
|
--c-datebadge--color--secondary-contrast
|
var(--color--secondary-contrast) | color | - | Secondary Contrast |
|
--c-datebadge--color--secondary-border
|
var(--color--secondary-border) | color | - | Manual companion token for secondary border and hover states. |