@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
21 lines (20 loc) • 910 B
TypeScript
import { HTMLAttributes, JSX } from 'react';
export interface ScrollerProps extends HTMLAttributes<HTMLDivElement> {
/** Content to be displayed within the scroller. */
children?: React.ReactNode;
/** Scrolls the scroll area to the left either smooth or immediately.
* `{scrollPosition: number;`
* `isSmooth?: boolean;}`
*/
scrollToPosition?: {
scrollPosition: number;
isSmooth?: boolean;
};
}
/**
* The <DSScroller> component enables horizontal scrolling when a single item or a group of items
* exceeds the container width, allowing users to navigate content side-to-side seamlessly.
*
* Design in Figma: [Scroller](https://www.figma.com/design/Ie2r0R9QwjEc7O3nrFbXhV/Web-Pattern-Library?node-id=6338-35848&t=cIB1PZbp81CoCSvk-4)
*/
export declare const DSScroller: ({ children, className, scrollToPosition, ...rest }: ScrollerProps) => JSX.Element;