- Prop
messages- Type
readonly MessageScrollerMessage[] | undefined- Default
- —
- Requirement
- optional
Docs Components Advanced
MessageScroller
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
const messageScrollerFixture = { id: "message-scroller", label: "Incident response transcript", defaultScrollPosition: "last-anchor", messages: [ { id: "incident-01", content: "Can you summarize the incident timeline?" }, { id: "incident-02", content: "The alert fired at 09:14 after error rates crossed the paging threshold.", }, { id: "incident-03", content: "Was customer traffic affected before the on-call engineer responded?", }, { id: "incident-04", content: "Traffic began shifting to the healthy pool at 09:17.", }, { id: "incident-05", content: "What did the first diagnostic check reveal?" }, { id: "incident-06", content: "One application pool was returning stale dependency health checks.", }, { id: "incident-07", content: "Start the remediation summary here.", scrollAnchor: true, }, { id: "incident-08", content: "The unhealthy pool was drained without dropping active requests.", }, { id: "incident-09", content: "Fresh instances joined the load balancer and passed readiness checks.", }, { id: "incident-10", content: "Error rates returned to baseline at 09:21." }, { id: "incident-11", content: "Synthetic checks confirmed recovery from three regions.", }, { id: "incident-12", content: "Follow-up actions are documented and ready for review.", }, ],} as const; import { MessageScroller } from "@grassroot/ui-react/advanced"; export default function MessageScrollerDemo() { return ( <div className="h-56 w-full max-w-xl" data-testid="message-scroller-demo"> <MessageScroller messages={messageScrollerFixture.messages} label={messageScrollerFixture.label} autoScroll={false} defaultScrollPosition="start" showButton={false} /> </div> );}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">const messageScrollerFixture = { id: "message-scroller", label: "Incident response transcript", defaultScrollPosition: "last-anchor", messages: [ { id: "incident-01", content: "Can you summarize the incident timeline?" }, { id: "incident-02", content: "The alert fired at 09:14 after error rates crossed the paging threshold.", }, { id: "incident-03", content: "Was customer traffic affected before the on-call engineer responded?", }, { id: "incident-04", content: "Traffic began shifting to the healthy pool at 09:17.", }, { id: "incident-05", content: "What did the first diagnostic check reveal?" }, { id: "incident-06", content: "One application pool was returning stale dependency health checks.", }, { id: "incident-07", content: "Start the remediation summary here.", scrollAnchor: true, }, { id: "incident-08", content: "The unhealthy pool was drained without dropping active requests.", }, { id: "incident-09", content: "Fresh instances joined the load balancer and passed readiness checks.", }, { id: "incident-10", content: "Error rates returned to baseline at 09:21." }, { id: "incident-11", content: "Synthetic checks confirmed recovery from three regions.", }, { id: "incident-12", content: "Follow-up actions are documented and ready for review.", }, ],} as const; import { MessageScroller } from "@grassroot/ui-vue";</script> <template> <div class="h-56 w-full max-w-xl" data-testid="message-scroller-demo"> <MessageScroller :messages="messageScrollerFixture.messages" :label="messageScrollerFixture.label" :auto-scroll="false" default-scroll-position="start" :show-button="false" /> </div></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import { Component } from "@angular/core";const messageScrollerFixture = { id: "message-scroller", label: "Incident response transcript", defaultScrollPosition: "last-anchor", messages: [ { id: "incident-01", content: "Can you summarize the incident timeline?" }, { id: "incident-02", content: "The alert fired at 09:14 after error rates crossed the paging threshold.", }, { id: "incident-03", content: "Was customer traffic affected before the on-call engineer responded?", }, { id: "incident-04", content: "Traffic began shifting to the healthy pool at 09:17.", }, { id: "incident-05", content: "What did the first diagnostic check reveal?" }, { id: "incident-06", content: "One application pool was returning stale dependency health checks.", }, { id: "incident-07", content: "Start the remediation summary here.", scrollAnchor: true, }, { id: "incident-08", content: "The unhealthy pool was drained without dropping active requests.", }, { id: "incident-09", content: "Fresh instances joined the load balancer and passed readiness checks.", }, { id: "incident-10", content: "Error rates returned to baseline at 09:21." }, { id: "incident-11", content: "Synthetic checks confirmed recovery from three regions.", }, { id: "incident-12", content: "Follow-up actions are documented and ready for review.", }, ],} as const; import { GrassrootMessageScroller } from "@grassroot/ui-angular/message-scroller"; @Component({ selector: "app-message-scroller-demo", standalone: true, imports: [GrassrootMessageScroller], host: { style: "display: contents" }, template: ` <div class="h-56 w-full max-w-xl" data-testid="message-scroller-demo"> <grassroot-message-scroller [messages]="fixture.messages" [label]="fixture.label" [autoScroll]="false" defaultScrollPosition="start" [showButton]="false" /> </div> `,})export class MessageScrollerDemoComponent { protected readonly fixture = messageScrollerFixture;} export default MessageScrollerDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> const messageScrollerFixture = { id: "message-scroller", label: "Incident response transcript", defaultScrollPosition: "last-anchor", messages: [ { id: "incident-01", content: "Can you summarize the incident timeline?" }, { id: "incident-02", content: "The alert fired at 09:14 after error rates crossed the paging threshold.", }, { id: "incident-03", content: "Was customer traffic affected before the on-call engineer responded?", }, { id: "incident-04", content: "Traffic began shifting to the healthy pool at 09:17.", }, { id: "incident-05", content: "What did the first diagnostic check reveal?" }, { id: "incident-06", content: "One application pool was returning stale dependency health checks.", }, { id: "incident-07", content: "Start the remediation summary here.", scrollAnchor: true, }, { id: "incident-08", content: "The unhealthy pool was drained without dropping active requests.", }, { id: "incident-09", content: "Fresh instances joined the load balancer and passed readiness checks.", }, { id: "incident-10", content: "Error rates returned to baseline at 09:21." }, { id: "incident-11", content: "Synthetic checks confirmed recovery from three regions.", }, { id: "incident-12", content: "Follow-up actions are documented and ready for review.", }, ], } as const; import { MessageScroller } from "@grassroot/ui-svelte";</script> <div class="h-56 w-full max-w-xl" data-testid="message-scroller-demo"> <MessageScroller messages={messageScrollerFixture.messages} label={messageScrollerFixture.label} autoScroll={false} defaultScrollPosition="start" showButton={false} /></div>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */const messageScrollerFixture = { id: "message-scroller", label: "Incident response transcript", defaultScrollPosition: "last-anchor", messages: [ { id: "incident-01", content: "Can you summarize the incident timeline?" }, { id: "incident-02", content: "The alert fired at 09:14 after error rates crossed the paging threshold.", }, { id: "incident-03", content: "Was customer traffic affected before the on-call engineer responded?", }, { id: "incident-04", content: "Traffic began shifting to the healthy pool at 09:17.", }, { id: "incident-05", content: "What did the first diagnostic check reveal?" }, { id: "incident-06", content: "One application pool was returning stale dependency health checks.", }, { id: "incident-07", content: "Start the remediation summary here.", scrollAnchor: true, }, { id: "incident-08", content: "The unhealthy pool was drained without dropping active requests.", }, { id: "incident-09", content: "Fresh instances joined the load balancer and passed readiness checks.", }, { id: "incident-10", content: "Error rates returned to baseline at 09:21." }, { id: "incident-11", content: "Synthetic checks confirmed recovery from three regions.", }, { id: "incident-12", content: "Follow-up actions are documented and ready for review.", }, ],} as const; import { MessageScroller } from "@grassroot/ui-solid"; export default function MessageScrollerDemo() { return ( <div class="h-56 w-full max-w-xl" data-testid="message-scroller-demo"> <MessageScroller messages={messageScrollerFixture.messages} label={messageScrollerFixture.label} autoScroll={false} defaultScrollPosition="start" showButton={false} /> </div> );}Installation
API Reference
Import
import { MessageScroller } from "@grassroot/ui-react/advanced";
Props
Prop
Type
Default
Requirement
messagesreadonly MessageScrollerMessage[] | undefined—
optional
autoScrollboolean | undefined—
optional
defaultScrollPositionMessageScrollerDefaultScrollPosition | undefined—
optional
preserveScrollOnPrependboolean | undefined—
optional
scrollEdgeThresholdnumber | undefined—
optional
scrollMarginnumber | undefined—
optional
scrollPreviousItemPeeknumber | undefined—
optional
showButtonboolean | undefined—
optional
labelstring | undefined—
optional
busyboolean | undefined—
optional
- Prop
autoScroll- Type
boolean | undefined- Default
- —
- Requirement
- optional
- Prop
defaultScrollPosition- Type
MessageScrollerDefaultScrollPosition | undefined- Default
- —
- Requirement
- optional
- Prop
preserveScrollOnPrepend- Type
boolean | undefined- Default
- —
- Requirement
- optional
- Prop
scrollEdgeThreshold- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
scrollMargin- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
scrollPreviousItemPeek- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
buttonDirection- Type
MessageScrollerDirection | undefined- Default
- —
- Requirement
- optional
- Prop
showButton- Type
boolean | undefined- Default
- —
- Requirement
- optional
- Prop
buttonLabel- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
label- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
busy- Type
boolean | undefined- Default
- —
- Requirement
- optional
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { MessageScroller } from "@grassroot/ui-vue";
Props
Prop
Type
Default
Requirement
messagesreadonly MessageScrollerMessage[] | undefined() => []optional
autoScrollboolean | undefinedmessageScrollerDefaults.autoScrolloptional
defaultScrollPositionMessageScrollerDefaultScrollPosition | undefinedmessageScrollerDefaults.defaultScrollPositionoptional
preserveScrollOnPrependboolean | undefinedmessageScrollerDefaults.preserveScrollOnPrependoptional
scrollEdgeThresholdnumber | undefinedmessageScrollerDefaults.scrollEdgeThresholdoptional
scrollMarginnumber | undefinedmessageScrollerDefaults.scrollMarginoptional
scrollPreviousItemPeeknumber | undefinedmessageScrollerDefaults.scrollPreviousItemPeekoptional
showButtonboolean | undefinedmessageScrollerDefaults.showButtonoptional
labelstring | undefinedmessageScrollerDefaults.labeloptional
busyboolean | undefinedfalseoptional
classNamestring | undefined—
optional
- Prop
messages- Type
readonly MessageScrollerMessage[] | undefined- Default
() => []- Requirement
- optional
- Prop
autoScroll- Type
boolean | undefined- Default
messageScrollerDefaults.autoScroll- Requirement
- optional
- Prop
defaultScrollPosition- Type
MessageScrollerDefaultScrollPosition | undefined- Default
messageScrollerDefaults.defaultScrollPosition- Requirement
- optional
- Prop
preserveScrollOnPrepend- Type
boolean | undefined- Default
messageScrollerDefaults.preserveScrollOnPrepend- Requirement
- optional
- Prop
scrollEdgeThreshold- Type
number | undefined- Default
messageScrollerDefaults.scrollEdgeThreshold- Requirement
- optional
- Prop
scrollMargin- Type
number | undefined- Default
messageScrollerDefaults.scrollMargin- Requirement
- optional
- Prop
scrollPreviousItemPeek- Type
number | undefined- Default
messageScrollerDefaults.scrollPreviousItemPeek- Requirement
- optional
- Prop
buttonDirection- Type
MessageScrollerDirection | undefined- Default
messageScrollerDefaults.buttonDirection- Requirement
- optional
- Prop
showButton- Type
boolean | undefined- Default
messageScrollerDefaults.showButton- Requirement
- optional
- Prop
buttonLabel- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
label- Type
string | undefined- Default
messageScrollerDefaults.label- Requirement
- optional
- Prop
busy- Type
boolean | undefined- Default
false- Requirement
- optional
- Prop
className- Type
string | undefined- Default
- —
- Requirement
- optional
Content regions
default
Import
import { Component } from "@angular/core";
import { GrassrootMessageScroller } from "@grassroot/ui-angular/message-scroller";
Props
Prop
Type
Default
Requirement
messagesreadonly MessageScrollerMessage[][]optional
autoScrollbooleanmessageScrollerDefaults.autoScrolloptional
defaultScrollPositionMessageScrollerDefaultScrollPositionmessageScrollerDefaults.defaultScrollPositionoptional
preserveScrollOnPrependbooleanmessageScrollerDefaults.preserveScrollOnPrependoptional
scrollEdgeThresholdnumbermessageScrollerDefaults.scrollEdgeThresholdoptional
scrollMarginnumbermessageScrollerDefaults.scrollMarginoptional
scrollPreviousItemPeeknumbermessageScrollerDefaults.scrollPreviousItemPeekoptional
showButtonbooleanmessageScrollerDefaults.showButtonoptional
labelstringmessageScrollerDefaults.labeloptional
busybooleanfalseoptional
classNamestring—
optional
- Prop
messages- Type
readonly MessageScrollerMessage[]- Default
[]- Requirement
- optional
- Prop
autoScroll- Type
boolean- Default
messageScrollerDefaults.autoScroll- Requirement
- optional
- Prop
defaultScrollPosition- Type
MessageScrollerDefaultScrollPosition- Default
messageScrollerDefaults.defaultScrollPosition- Requirement
- optional
- Prop
preserveScrollOnPrepend- Type
boolean- Default
messageScrollerDefaults.preserveScrollOnPrepend- Requirement
- optional
- Prop
scrollEdgeThreshold- Type
number- Default
messageScrollerDefaults.scrollEdgeThreshold- Requirement
- optional
- Prop
scrollMargin- Type
number- Default
messageScrollerDefaults.scrollMargin- Requirement
- optional
- Prop
scrollPreviousItemPeek- Type
number- Default
messageScrollerDefaults.scrollPreviousItemPeek- Requirement
- optional
- Prop
buttonDirection- Type
MessageScrollerDirection- Default
messageScrollerDefaults.buttonDirection- Requirement
- optional
- Prop
showButton- Type
boolean- Default
messageScrollerDefaults.showButton- Requirement
- optional
- Prop
buttonLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
label- Type
string- Default
messageScrollerDefaults.label- Requirement
- optional
- Prop
busy- Type
boolean- Default
false- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
Content regions
default
Import
import { MessageScroller } from "@grassroot/ui-svelte";
Props
Prop
Type
Default
Requirement
messagesreadonly MessageScrollerMessage[]—
optional
autoScrollboolean—
optional
defaultScrollPositionMessageScrollerDefaultScrollPosition—
optional
preserveScrollOnPrependboolean—
optional
scrollEdgeThresholdnumber—
optional
scrollMarginnumber—
optional
scrollPreviousItemPeeknumber—
optional
showButtonboolean—
optional
labelstring—
optional
busybooleanfalseoptional
classNamestring—
optional
- Prop
messages- Type
readonly MessageScrollerMessage[]- Default
- —
- Requirement
- optional
- Prop
autoScroll- Type
boolean- Default
- —
- Requirement
- optional
- Prop
defaultScrollPosition- Type
MessageScrollerDefaultScrollPosition- Default
- —
- Requirement
- optional
- Prop
preserveScrollOnPrepend- Type
boolean- Default
- —
- Requirement
- optional
- Prop
scrollEdgeThreshold- Type
number- Default
- —
- Requirement
- optional
- Prop
scrollMargin- Type
number- Default
- —
- Requirement
- optional
- Prop
scrollPreviousItemPeek- Type
number- Default
- —
- Requirement
- optional
- Prop
buttonDirection- Type
MessageScrollerDirection- Default
- —
- Requirement
- optional
- Prop
showButton- Type
boolean- Default
- —
- Requirement
- optional
- Prop
buttonLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
label- Type
string- Default
- —
- Requirement
- optional
- Prop
busy- Type
boolean- Default
false- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
Content regions
children
Import
import { MessageScroller } from "@grassroot/ui-solid";
Props
Prop
Type
Default
Requirement
messagesreadonly MessageScrollerMessage[]—
optional
autoScrollboolean—
optional
defaultScrollPositionMessageScrollerDefaultScrollPosition—
optional
preserveScrollOnPrependboolean—
optional
scrollEdgeThresholdnumber—
optional
scrollMarginnumber—
optional
scrollPreviousItemPeeknumber—
optional
showButtonboolean—
optional
labelstring—
optional
busyboolean—
optional
classNamestring—
optional
ref(handle: MessageScrollerHandle | undefined) => void—
optional
- Prop
messages- Type
readonly MessageScrollerMessage[]- Default
- —
- Requirement
- optional
- Prop
autoScroll- Type
boolean- Default
- —
- Requirement
- optional
- Prop
defaultScrollPosition- Type
MessageScrollerDefaultScrollPosition- Default
- —
- Requirement
- optional
- Prop
preserveScrollOnPrepend- Type
boolean- Default
- —
- Requirement
- optional
- Prop
scrollEdgeThreshold- Type
number- Default
- —
- Requirement
- optional
- Prop
scrollMargin- Type
number- Default
- —
- Requirement
- optional
- Prop
scrollPreviousItemPeek- Type
number- Default
- —
- Requirement
- optional
- Prop
buttonDirection- Type
MessageScrollerDirection- Default
- —
- Requirement
- optional
- Prop
showButton- Type
boolean- Default
- —
- Requirement
- optional
- Prop
buttonLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
label- Type
string- Default
- —
- Requirement
- optional
- Prop
busy- Type
boolean- Default
- —
- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
- Prop
ref- Type
(handle: MessageScrollerHandle | undefined) => void- Default
- —
- Requirement
- optional
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.