Askr documentation
Generated API snapshot

@askrjs/themes/badge

Exports from the declarations published in @askrjs/themes. Signatures reflect the published artifact.

Exports

This entrypoint publishes 4 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

Badgetype

Badge: { (props: BadgeProps): JSX.Element; (props: BadgeAsChildProps): JSX.Element; }

Renders a small status/label badge, defaulting to a <span> (or merging onto a child via asChild), with a variant color modifier.

BadgeAsChildPropstype

BadgeAsChildProps: BadgeOwnProps & {
  asChild: true;
  children: JSXElement;
  ref?: Ref<unknown>;
}

Props for {@link Badge } rendered with asChild, merging its attributes onto a single child element.

asChild
asChild: true;
children
children: JSXElement;
ref
ref?: Ref<unknown>;
variant
variant?: BadgeVariant | undefined;

BadgeOwnPropstype

BadgeOwnProps: {
  children?: unknown;
  variant?: BadgeVariant;
}

Props shared by both {@link Badge } call signatures.

children
children?: unknown;
variant
variant?: BadgeVariant | undefined;

BadgePropstype

BadgeProps: Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & BadgeOwnProps & {
  asChild?: false;
  ref?: Ref<HTMLSpanElement>;
}

Props for {@link Badge } rendered as its default <span> element.

asChild
asChild?: false | undefined;
children
children?: unknown;
ref
ref?: Ref<HTMLSpanElement>;
variant
variant?: BadgeVariant | undefined;