Skip to contentSkip to Content
ComponentsDeprecationNotice

DeprecationNotice

A styled banner indicating that a class, function, or module is deprecated. Displays a red “Deprecated” badge with version information and guidance on what to use instead. This component is typically auto-generated when a docstring contains a Deprecated: section.

API

DeprecationNotice

PropTypeDefaultDescription
sincestringVersion when the deprecation was introduced (e.g. "1.5.0").
alternativestringName of the replacement to use. Rendered in a <code> element with “Use … instead.” phrasing.
messagestringCustom deprecation message.

The rendered card shows:

  • A red “Deprecated” badge
  • “since X.X.X” in muted text (if since is provided)
  • The custom message (if provided)
  • “Use alternative instead.” (if alternative is provided)

Example

Deprecatedsince 2.0.0

This class will be removed in v3.0.

Use FederatedNode instead.

<DeprecationNotice since="2.0.0" alternative="FederatedNode" message="This class will be removed in v3.0." />

Minimal usage with just a version:

Deprecatedsince 1.5.0
<DeprecationNotice since="1.5.0" />