Bubble Component

Popover bubble attached to a host, with host-relative direction classes, visual variants, and theme colors.

Notes

Basic usage

Default bubble

Default bubble (top placement, bottom arrow)

Custom radius

Rounded bubble (12px)

Rich content

Title

Detailed content inside the bubble.

Direction

Direction is relative to the host (the trigger the bubble is attached to). bubble-top places the bubble above the host with the arrow at its bottom edge; bubble-bottom places it below the host with the arrow at its top edge; bubble-start / bubble-end place it at the host inline-start / inline-end (left / right in LTR).

Top (above host, arrow at bottom)

Top

Top-center

Top-start

Top-end

Bottom (below host, arrow at top)

Bottom

Bottom-center

Bottom-start

Bottom-end

Start (host inline-start / left in LTR)

Start

Start-center

Start-top

Start-bottom

End (host inline-end / right in LTR)

End

End-center

End-top

End-bottom

Center (no arrow)

Absolute centered, no arrow

Size

Size utilities only override the bubble width (and height for fullscreen); combine them with any direction, variant, or color class.

Scale — .bubble-scale / .bubble-scale-*

bubble-scale (1x)

bubble-scale-2 (2x)

bubble-scale-3 (3x)

bubble-scale-[1.5]

Numeric width — .bubble-* (spacing / arbitrary length)

bubble-48 (12rem)

bubble-[20rem]

Full — .bubble-full

bubble-full

Preview constrains --bubble-width-max to the demo column; the real value is calc(100dvw - var(--default-full-gap)*2).

Fullscreen — .bubble-fullscreen

bubble-fullscreen

Preview constrains both max variables; the real values are 100dvw / 100dvh minus the safe gaps. Positioning is unchanged — pair it with bubble-center or your own popover placement.

Variants

Default (border)

Default

Outline (.bubble-outline) — high contrast

Outline

Solid (.bubble-solid) — dark fill

Solid

Subtle (.bubble-subtle) — borderless tint

Subtle

Theme colors (default style)

Primary

Secondary

Tertiary

Success

Error

Info

Warning

Highlight

Ink

Title

Description

Caption

Disabled

Shorthand compound variants

Muted (.bubble-muted-*) — light border

Primary

Success

Error

Outline (.bubble-outline-*)

Primary

Success

Error

Solid (.bubble-solid-*)

Primary

Success

Error

Subtle (.bubble-subtle-*) — borderless tint

Primary

Success

Error

Custom colors

Multiple color formats are supported:

Solid with Tailwind colors

green-500

green-800

Outline with Tailwind colors

red-500

red-800

Muted with Tailwind colors

red-500

red-100

Subtle with Tailwind colors

blue-500

blue-100

Raw color values

[blue]

[#ff0000]

Use cases

Tooltip

This is a tooltip

Success notification

Operation completed

Error notification

Operation failed

Warning notification

Password expires soon