Skip to main content
Version: v1 (Current)

Message List

Generated from public Vue/TypeScript exports by pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commit fc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.

MessageList​

import { MessageList } from '@gxp-dev/app-ui'

Repository source

Props​

NameTypeRequired / defaultDescription
messages{ [key: string]: unknown; id: string; }[]Required—
hasMoreboolean | undefinedfalse—
isLoadingboolean | undefinedfalse—
emptyTextstring | undefined"No messages yet"—
loadingTextstring | undefined"Loading messages..."—

Events​

NameTypeRequired / defaultDescription
load-more[]——

Slots​

NameTypeRequired / defaultDescription
default{}——

Exposed methods and values​

NameTypeRequired / defaultDescription
scrollToBottom() => void——

Examples​

These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import MessageList from './MessageList.vue'
import { h } from 'vue'
{
render: (args) => ({
components: { MessageList },
setup() {
return { args, sampleMessages }
},
template: `
<MessageList v-bind="args" class="h-full">
<div v-for="msg in sampleMessages" :key="msg.id" class="flex gap-2 px-4 py-2 hover:bg-muted/50">
<span class="font-medium text-sm text-foreground">{{ msg.sender }}</span>
<span class="text-sm text-muted-foreground">{{ msg.content }}</span>
<span class="ml-auto text-xs text-muted-foreground">{{ msg.time }}</span>
</div>
</MessageList>
`,
}),
args: {
messages: sampleMessages,
},
}

Empty​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import MessageList from './MessageList.vue'
import { h } from 'vue'
{
args: {
messages: [],
emptyText: 'No messages yet. Start the conversation!',
},
render: (args) => ({
components: { MessageList },
setup() {
return { args }
},
template: '<MessageList v-bind="args" class="h-full" />',
}),
}

Loading​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import MessageList from './MessageList.vue'
import { h } from 'vue'
{
args: {
messages: [],
isLoading: true,
loadingText: 'Loading messages...',
},
render: (args) => ({
components: { MessageList },
setup() {
return { args }
},
template: '<MessageList v-bind="args" class="h-full" />',
}),
}