@porsche-design-system/components-react
Version:
Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.
63 lines (62 loc) • 2.85 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { ScrollerAlignScrollIndicator, SelectedAriaAttributes, ScrollerAriaAttribute, ScrollerScrollToPosition } from '../types';
export type PScrollerProps = BaseProps & {
/**
* @deprecated since v4.0.0, will be removed with next major release, has no effect anymore.
* @default 'center'
*/
alignScrollIndicator?: ScrollerAlignScrollIndicator;
/**
* Sets ARIA role and attributes on the scroller's scroll container, useful for tablist navigation patterns and additional accessibility context.
*/
aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
/**
* Reduces the scroller's padding and the gap between slotted items for use in dense layouts.
*/
compact?: boolean;
/**
* @deprecated since v4.0.0, use native `scrollIntoView()` on the slotted element itself.
*/
scrollToPosition?: ScrollerScrollToPosition;
/**
* Shows the browser's native scrollbar inside the scroller, in addition to the scroll indicator arrows.
* @default false
*/
scrollbar?: boolean;
/**
* @experimental Makes the indicator sticky at the top or bottom while scrolling depending on the scroll direction.
* @default false
*/
sticky?: boolean;
};
export declare const PScroller: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
/**
* @deprecated since v4.0.0, will be removed with next major release, has no effect anymore.
* @default 'center'
*/
alignScrollIndicator?: ScrollerAlignScrollIndicator;
/**
* Sets ARIA role and attributes on the scroller's scroll container, useful for tablist navigation patterns and additional accessibility context.
*/
aria?: SelectedAriaAttributes<ScrollerAriaAttribute>;
/**
* Reduces the scroller's padding and the gap between slotted items for use in dense layouts.
*/
compact?: boolean;
/**
* @deprecated since v4.0.0, use native `scrollIntoView()` on the slotted element itself.
*/
scrollToPosition?: ScrollerScrollToPosition;
/**
* Shows the browser's native scrollbar inside the scroller, in addition to the scroll indicator arrows.
* @default false
*/
scrollbar?: boolean;
/**
* @experimental Makes the indicator sticky at the top or bottom while scrolling depending on the scroll direction.
* @default false
*/
sticky?: boolean;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;