Askr documentation
Generated API snapshot

@askrjs/themes/alert

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.

Alerttype

Alert: (props: AlertProps) => JSX.Element

Renders an alert/status banner with an optional icon, title, description, actions, and a dismiss button. Automatically picks an "alert" or "status" ARIA role from variant unless role is set explicitly.

AlertHeadingTagtype

AlertHeadingTag: "h2" | "h3" | "h4" | "h5" | "h6"

Heading tag allowed for an alert's title via titleAs.

AlertPropstype

AlertProps: DivProps & {
  actions?: unknown;
  children?: unknown;
  description?: unknown;
  dismissLabel?: string;
  icon?: unknown;
  onDismiss?: () => void;
  title?: unknown;
  titleAs?: AlertHeadingTag;
  variant?: AlertVariant;
  ref?: Ref<HTMLDivElement>;
}

Props for the {@link Alert } component.

actions
actions?: unknown;
children
children?: unknown;
description
description?: unknown;
dismissLabel
dismissLabel?: string | undefined;
icon
icon?: unknown;
onDismiss
onDismiss?: (() => void) | undefined;
ref
ref?: Ref<HTMLDivElement>;
title
title?: unknown;
titleAs
titleAs?: AlertHeadingTag | undefined;
variant
variant?: AlertVariant | undefined;

AlertVarianttype

AlertVariant: "default" | "info" | "success" | "warning" | "danger"

Visual tone of an {@link AlertProps} alert; "danger"/"warning" render with role="alert".