1.0.5 • Published 6 months ago

@nowt/premium-badge v1.0.5

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

🏷️ Nowt-UI PremiumBadge

A modern, premium-looking Badge component built with React.


You can explore the components at Nowt UI (click to visit)

🚀 Features

  • ✅ Simple and reusable
  • 🎨 Customizable variant, size, pill shape, and optional icon
  • 🌈 Looks elegant on light and dark themes
  • ⚡ Minimal dependencies (react-icons optional for icons)

📦 Installation

npm install react-icons

npm i @nowt/premium-badge

📚 Usage

import  PremiumBadge  from '@nowt/premium-badge';
import { HiSparkles } from 'react-icons/hi';

export default function App() {
  return (
    <div style={{ display: 'flex', gap: '1rem' }}>
      <PremiumBadge label="Pro User" variant="primary" icon={<HiSparkles />} />
      <PremiumBadge label="Verified" variant="success" pill size="sm" />
      <PremiumBadge label="Beta" variant="warning" size="lg" />
    </div>
  );
}

✨ Props

PropTypeDefaultDescription
labelstringrequiredText to be displayed inside the badge
variant'primary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'neutral''primary'The badge color theme
size'sm' \| 'md' \| 'lg''md'Size of the badge
pillbooleantrueIf true, renders a rounded (pill) shape badge
iconReact.ReactNodeundefinedOptional icon to render before the text

🎨 Variants

VariantDescription
primaryBlue (info/action)
successGreen (confirmed)
warningYellow (caution)
dangerRed (error/danger)
infoCyan (info)
neutralGray (default tone)

📏 Sizes

SizeFontPadding
sm0.75rem4px 10px
md0.85rem6px 14px
lg1rem8px 18px

💡 Examples

<PremiumBadge label="Basic" variant="neutral" />
<PremiumBadge label="Early Access" variant="info" size="lg" />
<PremiumBadge label="Error" variant="danger" pill={false} />

👨‍💻 Author

Made by Lokesh Choudhary — keep building Nowt-UI premium UI.