Badge

3 variants. Open one in isolation: use the link on each card.

pre-release
Draft

src/ui/0_atoms/Badge.astro
---
/**
* Pill label using the same styles as tag links (`a.tag` / `span.tag` in `global.css`).
* Pass `href` for a tag-style link; omit it for a static badge.
*/
interface Props {
/** Shown when the default slot is empty. */
label?: string
href?: string
class?: string
/** Override link accessible name (defaults to visible text). */
'aria-label'?: string
}
const { label, href, class: className, 'aria-label': ariaLabel } = Astro.props
---
{
href ? (
<a href={href} class:list={['tag', className]} aria-label={ariaLabel}>
<slot>{label}</slot>
</a>
) : (
<span class:list={['tag', className]}>
<slot>{label}</slot>
</span>
)
}