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'content_copyCopy
Notification
Indicates the presence of a notification or status by displaying a dot.
content_copyCopy
live example
Notification with Content
Displays a badge with a numerical or textual indicator, providing more specific information about the status.
content_copyCopy
live example
Not Showing Notification
Toggles the visibility of the badge, allowing you to hide it when not needed.
content_copyCopy
live example
Customizing Badge Color
Customize the color of the badge to match different statuses or themes.
content_copyCopy
live example
Accessibility Considerations
Ensure that the Badge component is accessible by providing appropriate ARIA attributes and roles.
content_copyCopy
live example