UI Launch Docs

Badge

Badge component of the UILaunch design system, how to import it and its usage.

🏷️ Badge

The Badge component is a small, often circular, visual indicator that can be used to display a count or status. It is commonly used in notifications, messages, or to highlight important information. It can be used to show the number of unread messages, notifications, or any other count that needs to be displayed prominently. It is a simple yet effective way to draw attention to specific information in your application.

badge


📦 Import

import Badge from '@madefordevs1999/ui-launch-native/system/atoms/Badge';

🧩 Usage

import Badge, { BadgeSizeEnum, BadgeTypeEnum, BadgeVariantEnum } from '@madefordevs1999/ui-launch-native/system/atoms/Badge';
import { View } from 'react-native';

const App = () => {
  return (
    <View style={{ padding: 20 }}>
      <Badge
        colorVariant={BadgeVariantEnum.Primary}
        size={BadgeSizeEnum.Large}
        type={BadgeTypeEnum.Solid}
        rounded
      >
        99+
    </View>
  );
};
export default App;

Results

badge-example

📜 Props

Prop NameTypeDefault ValueDescription
borderedbooleanfalseIf true, the badge will have a border white to separate the background from the badge background.
colorVariantBadgeVariantEnumPrimaryThe color variant of the badge.
sizeBadgeSizeEnumMediumThe size of the badge.
typeBadgeTypeEnumSolidThe type of the badge.
roundedbooleanfalseIf true, the badge will have rounded corners.
onPress() => voidundefinedFunction to be called when the badge is pressed.