--- title: Badge sidebar_label: Badge --- import { StoryWithControls } from '../../../src/components/StorybookWrapper'; # Badge The Badge component from Superset's UI library. ## Live Example ## Try It Edit the code below to experiment with the component: ```tsx live function Demo() { return ( ); } ``` ## Status Badge ```tsx live function StatusBadgeDemo() { const statuses = ['default', 'success', 'processing', 'warning', 'error']; return (
{statuses.map(status => ( ))}
); } ``` ## Color Gallery ```tsx live function ColorGallery() { const colors = ['pink', 'red', 'orange', 'green', 'cyan', 'blue', 'purple']; return (
{colors.map(color => ( ))}
); } ``` ## Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `count` | `number` | `5` | Number to show in the badge. | | `size` | `string` | `"default"` | Size of the badge. | | `showZero` | `boolean` | `false` | Whether to show badge when count is zero. | | `overflowCount` | `number` | `99` | Max count to show. Shows count+ when exceeded (e.g., 99+). | ## Import ```tsx import { Badge } from '@superset/components'; ``` --- :::tip[Improve this page] This documentation is auto-generated from the component's Storybook story. Help improve it by [editing the story file](https://github.com/apache/superset/edit/master/superset-frontend/packages/superset-ui-core/src/components/Badge/Badge.stories.tsx). :::