On this page

Message

Install, props and the parts Message is built from.

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/message.json

Use

<script setup lang="ts">
import { Avatar, AvatarFallback } from '@/components/ui/avatar'
import { Bubble, BubbleContent } from '@/components/ui/bubble'
import { Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader } from '@/components/ui/message'
</script>

<template>
  <Message>
    <MessageAvatar>
      <Avatar><AvatarFallback>LT</AvatarFallback></Avatar>
    </MessageAvatar>
    <MessageContent>
      <MessageHeader>Linh Tran</MessageHeader>
      <Bubble variant="secondary">
        <BubbleContent>Order 10482 is not in the ERP yet.</BubbleContent>
      </Bubble>
      <MessageFooter>09:41</MessageFooter>
    </MessageContent>
  </Message>
</template>

Props

Part Prop Values Notes
Message align start (default), end end reverses the row for the current user’s messages. The reading order stays avatar, then content
Every part as, as-child element name, boolean Render as another element, such as as="li" in a list or as="time" in the footer
Every part class string Added after the Beehexa classes

Built on

Plain elements through reka-ui Primitive, with the shadcn-vue Message API. Beehexa adds the styles. One difference: with a footer, the avatar moves up space.300 (the 16 px footer line and the 8 px gap) instead of shadcn-vue’s 32 px, so it lines up with the bottom of the bubble.