Install
Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code):
npx shadcn-vue@latest add https://beehexa.design/r/bubble.json
Use
<script setup lang="ts">
import { Bubble, BubbleContent, BubbleReactions } from '@/components/ui/bubble'
</script>
<template>
<Bubble variant="secondary">
<BubbleContent>All 240 products are in the online store.</BubbleContent>
<BubbleReactions>
<span aria-hidden="true">🎉 2</span><span class="sr-only">2 party reactions</span>
</BubbleReactions>
</Bubble>
</template>
Props
| Part | Prop | Values | Notes |
|---|---|---|---|
Bubble |
variant |
default, secondary, muted, tinted, outline, ghost, destructive |
See Usage › Variants |
Bubble |
align |
start (default), end |
Inside a Message, the message’s align already places it |
BubbleContent |
as, as-child |
element name, boolean | as="button" or a link with as-child for a bubble people can press |
BubbleReactions |
side |
bottom (default), top |
The edge it hangs over |
BubbleReactions |
align |
end (default), start |
The side it sits on |
BubbleGroup |
as, as-child |
element name, boolean | Bubbles sent one after another |
bubbleVariants and bubbleReactionsVariants are exported for custom parts.
Built on
Plain elements through reka-ui Primitive, with the shadcn-vue Bubble API. Beehexa adds the styles. The tinted variant keeps its name but uses color.background.brand.subtle with a brand edge: Beehexa does not derive tints from another colour, so its hover darkens the edge to color.border.brand instead of changing the fill.