Glass Contact Pill
A liquid-glass contact chip with an avatar and name for messaging apps. The avatar peeks above the pill, or sits inline, and falls back to initials when no image is set.













AK
Alex Kostyniuk
import { GlassContactPill } from "@/components/ui/glasscn/glass-contact-pill"
export function ContactPillDemo() {
return (Installation
$ npx shadcn add @glasscn/glass-contact-pillVariants
top
AK
Alex Kostyniuk
top + caption
AK
onlineAlex Kostyniuk
top + initials
AK
onlineAlex Kostyniuk
leading
AK
Alex Kostyniuk
leading + caption
AK
onlineAlex Kostyniuk
leading + initials
AK
onlineAlex Kostyniuk
API
Prop
Type
Default
Description
GlassContactPill
nameReact.ReactNode-Primary label, e.g. the contact's name. Used to derive the fallback initials.
GlassContactPill
captionReact.ReactNode-Secondary line shown above the name, e.g. "Maybe:" or "online".
GlassContactPill
srcstring-Avatar image source. When absent or it fails to load, the fallback is shown.
GlassContactPill
fallbackReact.ReactNode-Avatar fallback content. Defaults to up-to-two initials from `name` (e.g. "YP").
GlassContactPill
avatarPlacement"top" | "leading""top"Places the avatar peeking above the pill or inline at its leading edge.
GlassContactPill
trailingReact.ReactNode-Optional trailing content after the label, e.g. a chevron or status dot.
GlassContactPill
liquidPropsOmit<LiquidGlassProps, "children">-Props forwarded to the underlying LiquidGlass surface (blur, refraction, bezel, saturation).
GlassContactPill
surfaceClassNamestring-Classes applied to the outer LiquidGlass surface.
GlassContactPill
...propsOmit<React.ComponentProps<"div">, "title">-Props from the underlying shadcn/ui primitive.