Skip to content
🌏 Translated with the assistance of DeepSeek and ChatGPT

Bubble

It shows the appearance of speaking; AI conversational interactions seem to like using it a lot.

Basic Usage

By default a Bubble is a theme-tinted bubble with its tail at the bottom-left, ready for the left side of a conversation. Set variant to 'primary' and tailPlacement to 'bottom-right' to get a solid, filled bubble on the right.

Hi! I am a bubble with a tail at the bottom-left corner.
Bubbles are great for chats, comments and annotations.
Hide source code

Colors

variant controls the style of Bubble: 'plain' (default) fills it with a tint of the theme color, and 'primary' fills it with the theme color itself.

theme sets the theme color and accepts 'primary' (default), 'sakura', 'success', 'warning', 'danger', 'info', and 'notice', where 'info' is the neutral grey. A custom color can be passed through color, which overrides theme.

plain
primary
sakura
success
warning
danger
info
notice
primary
primary
sakura
success
warning
danger
info
notice
color
#8b5cf6
#8b5cf6
Hide source code

Tail

Use tailPlacement to put the tail at any of the four corners of the bubble. Set tail: false to remove the tail; tailWidth and tailHeight control the base width and the height of the tail (px).

bottom-left
bottom-right
top-left
top-right
tail=false
tailWidth=4, tailHeight=3
Hide source code

Border Radius

shape offers two presets: 'rect' (default, square corners) and 'round' (fully rounded).

borderRadius controls the size of the four rounded corners. It accepts a single value or an array in [top-left, top-right, bottom-right, bottom-left] order — the same as the other components — and also supports percentages.

The corner the tail hangs from is always square.

Default (shape="rect")
shape="round"
round + borderRadius=8 (radius wins)
borderRadius=12
[16, 0, 16, 0]
The tail corner stays square
Hide source code

API

BubbleProps

AttributeTypeOptionalDefaultDescriptionVersion
variant'plain' | 'primary'True'plain'The style variant of Bubble.0.2.1
theme'primary' | 'sakura' | 'success' | 'warning' | 'danger' | 'info' | 'notice'True'primary'The theme color of Bubble.0.2.1
colorstringTrueA custom color, overrides theme.0.2.1
tailbooleanTruetrueWhether to draw the tail.0.2.1
tailPlacement'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'True'bottom-left'The corner the tail hangs from.0.2.1
tailWidthnumberTrue2The base width of the tail.0.2.1
tailHeightnumberTrue2The height of the tail.0.2.1
borderRadiusNumberOrPercentage | NumberOrPercentage[]TrueCorner radius, takes precedence over shape and behaves like CSS border-radius. A single value or an array of length 1 → applies to all four corners simultaneously; an array of length 2 → [top-left & bottom-right, top-right & bottom-left]; an array of length 3 → [top-left, top-right & bottom-left, bottom-right]; an array of length 4 → applies to the four corners in a clockwise order.0.2.1
shape'rect' | 'round'True'rect'The corner preset, lower priority than borderRadius.0.2.1
pollSizeChangebooleanTruefalseWhether to redraw when the container size changes.0.2.1

BubbleSlots

SlotParameterDescriptionVersion
defaultThe content of Bubble.0.2.1

NumberOrPercentage

ts
export type NumberOrPercentage = number | `${number}%`