View as Markdown

API reference: @salmonui/notifications/badge

BadgeInlinePropsinterface

import type { BadgeInlineProps } from '@salmonui/notifications/badge';
interface BadgeInlineProps extends BadgeCommonProps {
    variant?: BadgeVariant | undefined;
    children?: ReactNode;
    render?: ((props: BadgeRenderProps) => ReactElement) | undefined;
    content?: never;
    dot?: false | undefined;
    max?: never;
    placement?: never;
    overlap?: never;
    invisible?: never;
    label?: never;
    locale?: never;
}

Inline mode: children is the badge text.

BadgeInlineProps members (14, 3 inherited)
NameSignatureDescription
variantoptionalvariant?: BadgeVariant | undefined;

Visual weight. Default 'soft'; 'dot' is a status dot before the text (the dot is decorative, the text carries the meaning).

childrenoptionalchildren?: ReactNode;

The badge text.

renderoptionalrender?: ((props: BadgeRenderProps) => ReactElement) | undefined;

Renders another element (a link, a router link) with the computed props.

contentoptionalcontent?: never;
dotoptionaldot?: false | undefined;
maxoptionalmax?: never;
placementoptionalplacement?: never;
overlapoptionaloverlap?: never;
invisibleoptionalinvisible?: never;
labeloptionallabel?: never;
localeoptionallocale?: never;
toneoptionalinheritedtone?: BadgeTone;

Color role. Default 'neutral'.

shapeoptionalinheritedshape?: BadgeShape;

Corner shape. Default 'rounded' inline, 'pill' for overlay badges.

refoptionalinheritedref?: Ref<HTMLSpanElement>;

The root element: the badge inline, the host wrapper in overlay mode.