Skip to content

feat(callout): composable/headless Callout — neutral variant + custom content #474

Description

@bntvllnt

Problem

Callout is opinionated in a way that blocks reuse for editorial/branded
call-outs. It (a) forces the internal structure — an optional icon slot, a title
<p class="font-semibold">, and a body wrapped in text-sm [&>p]:mb-0; and (b)
its variants are all colored surfaces (danger/info/note/success/tip/
warning, each a bg-*/10 border-* + fixed text color). A consumer that wants a
neutral or brand-accented call-out — e.g. a left-rule aside driven by --accent,
no colored background, with its own header + body typography — can't get there
without overriding half the classes and still fighting the fixed inner markup.

Proposal

  • A neutral, token-driven variant (no colored bg/border/text; border + text
    from the standard tokens, so a brand accent comes from --accent / className).
  • Composable/headless usage: let the header and body be arbitrary children
    (e.g. CalloutHeader / CalloutBody subcomponents, or accept title as a
    ReactNode and drop the forced font-semibold / text-sm), so consumers own
    the inner typography and layout while the component keeps the container role,
    spacing and border.

Acceptance

  • A neutral/token-driven variant with no colored surface
  • Consumer can supply a custom header + body without the forced font-semibold/text-sm
  • Container role/spacing/border still provided; brand accent via token/className
  • Existing colored variants unchanged (backward compatible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    componentNew componentenhancementNew feature or requestneeds-triageMissing required metadata (type, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions