Layout
ScrollArea
A scroll container with thin themed scrollbars (10px track, border-coloured thumb) that appear on hover.
Usage#
Use it for bounded lists inside panels, popovers and cards (members, history, logs). Whole pages scroll natively.
What you provide: a fixed height (className="h-44") and the content; ScrollBar orientation="horizontal" for wide content.
Facts#
ProductMax
FamilyLayout
Global
window.DigitalCrew.ScrollAreaSource
max-agent: src/components/ui/scroll-area.tsxImport in the app
import { ScrollArea } from "@/components/ui/scroll-area";API#
TypeScript declarations emitted from src/components/ui/scroll-area.tsx.
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): any;
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): any;
export { ScrollArea, ScrollBar };Code#
The preview above, as plain React.createElement against window.DigitalCrew with realistic data. Copy it into a page that loads the bundle.
<div id="root" class="p-6"></div>
<script>
(function () {
var h = React.createElement, DC = window.DigitalCrew, I = DC.Icons;
var NAMES = ["Axel Moreau", "Clara Bennett", "Emma Laurent", "Hugo Silva", "Iris Chen", "Jade Lin", "Leo Mercer", "Maya Brooks", "Nolan Park", "Nora Hale", "Orion Reed", "Simon Keller"];
function App() {
return h(DC.ScrollArea, { className: "h-44 w-72 rounded-md border" },
h("div", { className: "p-4" },
h("h4", { className: "mb-3 text-sm font-medium leading-none" }, "Crew"),
NAMES.map(function (n) { return h("div", { key: n }, h("div", { className: "text-sm py-1.5" }, n), h(DC.Separator, null)); })));
}
ReactDOM.createRoot(document.getElementById("root")).render(h(DC.TooltipProvider, { delayDuration: 80 }, h(App)));
})();
</script>More in Layout#
AccordionExpands in 250ms on the smooth-out ease
CardHeader, action, content and footer slots
CollapsibleShow and hide one region
ContentSectionSettings page section: title, description, rule, body
DataTableToolbarThe data-table kit driving a prospects table: search, facets, sort, pages
MainThe page body inside the app shell: padding and max width