Feedback
Glass Badge
A small tinted glass label for status, counts and categories.
Preview
LiveNewBetaPausedFailedDraft
Demos ready. Update 0.
The preview runs the React version. On iOS 26 and later, the React Native version uses the system’s own glass. See it on a phone.
Installation
For React 19+ apps with Tailwind CSS 4.
npx shadcn@4.14.1 add @glassyui/glass-badgeAdds 5 files to components/glassyui and installs clsx.
Usage
Usage
import { GlassBadge } from "@/components/glassyui/glass-badge";
export function BadgeDemo() {
return <GlassBadge tone="green" dot>Live</GlassBadge>;
}React Native usage
import { View } from 'react-native';
import { GlassBadge } from '@/components/glassyui/glass-badge';
export default function BadgeExample() {
return (
<View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8 }}>
<GlassBadge dot tone="green">
Online
</GlassBadge>
<GlassBadge tone="blue">New</GlassBadge>
<GlassBadge tone="red">3 unread</GlassBadge>
</View>
);
}
Examples
Tones
<GlassBadge>Draft</GlassBadge>
<GlassBadge tone="blue">New</GlassBadge>
<GlassBadge tone="orange">Beta</GlassBadge>
<GlassBadge tone="red">3 failed</GlassBadge>
<GlassBadge tone="blue">Pro</GlassBadge>API reference
GlassBadge
A span with no client JavaScript, so it works in Server Components.
| Prop | Type | Default | Description |
|---|---|---|---|
tone | 'neutral' | 'blue' | 'green' | 'orange' | 'red' | 'purple' | 'neutral' | Tint and text colour. |
dot | boolean | false | Adds a leading dot in the tone colour. |
Also accepts HTML span attributes.
- Types
GlassBadgePropsGlassBadgeTone
The React Native props and exports are in the component’s source.