Preview
Installation
Install the local ghost-kit source bundle while the registry runs at localhost:3110. It contains this component and its source dependencies. Prepare the local registry first so token dependencies also resolve locally.
Install
Basic usage
Use the exported component in the composition shown above. Keep labels, data, and callbacks in the consuming application.
Structure
Examples
Both scrollbars
Use a corner when content overflows in both directions.
Gradient scroll fade
Use a quiet edge fade when a reading surface needs a softer boundary.
Combining with Tabs
Keep each tab panel independently scrollable.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | ((state: BaseUI.ScrollAreaRootState) => string | undefined) | undefined | CSS class applied to the element, or a function that returns a class based on the component's state. | |
style | React.CSSProperties | ((state: BaseUI.ScrollAreaRootState) => React.CSSProperties | undefined) | undefined | Style applied to the element, or a function that returns a style object based on the component's state. | |
render | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | BaseUI.ComponentRenderFn<BaseUI.HTMLProps, BaseUI.ScrollAreaRootState> | undefined | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. | |
overflowEdgeThreshold | number | Partial<{ xStart: number; xEnd: number; yStart: number; yEnd: number; }> | undefined | The threshold in pixels that must be passed before the overflow edge attributes are applied. Accepts a single number for all edges or an object to configure them individually. |
This component wraps Base UI scroll-area for its behavior.