Activity feed
Constrain a long list inside a dashboard panel.
Components / Layout
A styled native scrolling viewport with reactive edge state.
Last changed in version 0.13.0: Add avatar groups and chips, expand the block gallery, and improve component colors, spacing, and motion.
bunx --bun @getweini/cli@latest add scroll-areaImport the files copied by the install command, then place the component in your Vue template. The text and values in the example belong to your app; change them to fit your task.
<script setup lang="ts">
import ScrollArea from './components/ui/scroll-area/ScrollArea.vue'
import ScrollAreaViewport from './components/ui/scroll-area/ScrollAreaViewport.vue'
const events = ['Created workspace', 'Invited Ada', 'Published report', 'Updated billing']
</script>
<template>
<ScrollArea class="h-48">
<ScrollAreaViewport aria-label="Recent activity">
<ul>
<li v-for="event in events" :key="event">{{ event }}</li>
</ul>
</ScrollAreaViewport>
</ScrollArea>
</template>Native wheel, touch, keyboard, and momentum scrolling are preserved. The root exposes viewport, edges, and scrollTo().
Constrain a long list inside a dashboard panel.
Keep a strip of wide cards scrollable on small screens.
The viewport preserves native scrolling behavior.
<script setup lang="ts">
import ScrollArea from './components/ui/scroll-area/ScrollArea.vue'
import ScrollAreaViewport from './components/ui/scroll-area/ScrollAreaViewport.vue'
const events = ['Created workspace', 'Invited Ada', 'Published report', 'Updated billing']
</script>
<template>
<ScrollArea class="h-48">
<ScrollAreaViewport aria-label="Recent activity">
<ul>
<li v-for="event in events" :key="event">{{ event }}</li>
</ul>
</ScrollAreaViewport>
</ScrollArea>
</template>Choose horizontal orientation for wide content.
<script setup lang="ts">
import ScrollArea from './components/ui/scroll-area/ScrollArea.vue'
import ScrollAreaViewport from './components/ui/scroll-area/ScrollAreaViewport.vue'
</script>
<template>
<ScrollArea orientation="horizontal" class="w-full">
<ScrollAreaViewport aria-label="Featured projects">
<div class="flex w-max gap-4">
<article v-for="n in 6" :key="n" class="w-48">Project {{ n }}</article>
</div>
</ScrollAreaViewport>
</ScrollArea>
</template>Every public prop, model, event, slot, and exposed member of the installed Vue parts is listed below. “Not set” means you can leave that value out; “Required” means you must provide it. Native HTML attributes also work where the component uses a native element.
| Name | Type or signature | Default | What it does |
|---|---|---|---|
orientationprop | ScrollAreaOrientation | undefined | "vertical" | Arrange items horizontally or vertically. |
defaultslot | (props: { edges: ScrollAreaEdges; }) => unknown | Required | Content shown inside ScrollArea. |
viewportexposed | HTMLElement | null | — | Access viewport from a component template ref. |
edgesexposed | { top: boolean; right: boolean; bottom: boolean; left: boolean; start: boolean; end: boolean; } | — | Access edges from a component template ref. |
scrollToexposed | (options: ScrollToOptions) => void | — | Access scroll to from a component template ref. |
| Name | Type or signature | Default | What it does |
|---|---|---|---|
defaultslot | (props: { edges: ScrollAreaEdges; }) => unknown | Required | Content shown inside ScrollAreaViewport. |
elementexposed | HTMLElement | null | — | Reference to the underlying HTML element. |
edgesexposed | ScrollAreaEdges | — | Access edges from a component template ref. |
scrollToexposed | (options: ScrollToOptions) => void | undefined | — | Access scroll to from a component template ref. |
// packages/frameworks/vue/components/scroll-area/types.ts
// ------- TYPES -------
export type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both'
export interface ScrollAreaEdges {
top: boolean
right: boolean
bottom: boolean
left: boolean
start: boolean
end: boolean
}
export interface ScrollAreaProps {
orientation?: ScrollAreaOrientation
}