@buun_group/brutalist-ui
Version:
A brutalist-styled component library
67 lines (66 loc) • 1.66 kB
TypeScript
/**
* @module ScrollArea
* @description A custom scrollable area component with brutalist-styled scrollbars. Provides consistent cross-browser scrolling with customizable scrollbar appearance.
*/
import React from 'react';
export interface ScrollAreaProps {
/**
* The content to be scrolled
*/
children: React.ReactNode;
/**
* Additional CSS classes
*/
className?: string;
/**
* Height of the scroll area
*/
height?: string | number;
/**
* Maximum height of the scroll area
*/
maxHeight?: string | number;
/**
* Width of the scroll area
*/
width?: string | number;
/**
* Whether to show horizontal scrollbar
* @default false
*/
horizontal?: boolean;
/**
* Whether to show vertical scrollbar
* @default true
*/
vertical?: boolean;
/**
* Scrollbar size variant
* @default 'md'
*/
scrollbarSize?: 'sm' | 'md' | 'lg';
/**
* Visual style variant
* @default 'default'
*/
variant?: 'default' | 'minimal' | 'brutal';
/**
* Whether to auto-hide scrollbars when not scrolling
* @default false
*/
autoHide?: boolean;
/**
* Whether to show a border around the scroll area
* @default true
*/
showBorder?: boolean;
/**
* Additional inline styles
*/
style?: React.CSSProperties;
/**
* Callback when scroll position changes
*/
onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
}
export declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;