Castle logo

CASTLE UI

Search

K

The Badge component is designed to wrap other components and display notifications or status indicators, such as alerts, unread counts, or status messages.

Usage

Import

import { Badge } from '@passfort/castle'

Copy

Notification

Indicates the presence of a notification or status by displaying a dot.

Copy

live example

Notification with Content

Displays a badge with a numerical or textual indicator, providing more specific information about the status.

Copy

live example

Not Showing Notification

Toggles the visibility of the badge, allowing you to hide it when not needed.

Copy

live example

Customizing Badge Color

Customize the color of the badge to match different statuses or themes.

Copy

live example

Accessibility Considerations

Ensure that the Badge component is accessible by providing appropriate ARIA attributes and roles.

Copy

live example

Contents