+++ # ----------------------------------------------------------------------- # Do not edit this file. It is automatically generated by API Documenter. # ----------------------------------------------------------------------- title = "CustomScrollbar" keywords = ["grafana","documentation","sdk","@grafana/ui"] type = "docs" +++ ## CustomScrollbar class Wraps component into component from `react-custom-scrollbars` Signature ```typescript export declare class CustomScrollbar extends Component ``` Import ```typescript import { CustomScrollbar } from '@grafana/ui'; ``` Constructors | Constructor | Modifiers | Description | | --- | --- | --- | | [constructor(props)](#constructor-props) | | Constructs a new instance of the CustomScrollbar class | Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [defaultProps](#defaultprops-property) | static | Partial<Props> | | | [renderThumb](#renderthumb-property) | | (thumb: 'thumb-horizontal' | 'thumb-vertical', passedProps: any) => JSX.Element | | | [renderThumbHorizontal](#renderthumbhorizontal-property) | | (passedProps: any) => JSX.Element | | | [renderThumbVertical](#renderthumbvertical-property) | | (passedProps: any) => JSX.Element | | | [renderTrack](#rendertrack-property) | | (track: 'track-vertical' | 'track-horizontal', hideTrack: boolean | undefined, passedProps: any) => JSX.Element | | | [renderTrackHorizontal](#rendertrackhorizontal-property) | | (passedProps: any) => JSX.Element | | | [renderTrackVertical](#rendertrackvertical-property) | | (passedProps: any) => JSX.Element | | | [renderView](#renderview-property) | | (passedProps: any) => JSX.Element | | Methods | Method | Modifiers | Description | | --- | --- | --- | | [componentDidMount()](#componentdidmount-method) | | | | [componentDidUpdate()](#componentdidupdate-method) | | | | [render()](#render-method) | | | | [updateAfterMount()](#updateaftermount-method) | | | | [updateScroll()](#updatescroll-method) | | | ### constructor(props) Constructs a new instance of the `CustomScrollbar` class Signature ```typescript constructor(props: Props); ``` Parameters | Parameter | Type | Description | | --- | --- | --- | | props | Props | | ### defaultProps property Signature ```typescript static defaultProps: Partial; ``` ### renderThumb property Signature ```typescript renderThumb: (thumb: 'thumb-horizontal' | 'thumb-vertical', passedProps: any) => JSX.Element; ``` ### renderThumbHorizontal property Signature ```typescript renderThumbHorizontal: (passedProps: any) => JSX.Element; ``` ### renderThumbVertical property Signature ```typescript renderThumbVertical: (passedProps: any) => JSX.Element; ``` ### renderTrack property Signature ```typescript renderTrack: (track: 'track-vertical' | 'track-horizontal', hideTrack: boolean | undefined, passedProps: any) => JSX.Element; ``` ### renderTrackHorizontal property Signature ```typescript renderTrackHorizontal: (passedProps: any) => JSX.Element; ``` ### renderTrackVertical property Signature ```typescript renderTrackVertical: (passedProps: any) => JSX.Element; ``` ### renderView property Signature ```typescript renderView: (passedProps: any) => JSX.Element; ``` ### componentDidMount method Signature ```typescript componentDidMount(): void; ``` Returns: `void` ### componentDidUpdate method Signature ```typescript componentDidUpdate(): void; ``` Returns: `void` ### render method Signature ```typescript render(): JSX.Element; ``` Returns: `JSX.Element` ### updateAfterMount method Signature ```typescript updateAfterMount(): void; ``` Returns: `void` ### updateScroll method Signature ```typescript updateScroll(): void; ``` Returns: `void`