@pagedotapp/page-scroll-list
v0.0.0-alpha.14
Published
PageScrollList - A reusable React component
Readme
PageScrollList
A reusable scrolllist component for React applications.
Installation
npm install @pagedotapp/page-scroll-listUsage
import { PageScrollList } from "@pagedotapp/page-scroll-list"
function App() {
return (
<PageScrollList variant="primary" size="medium">
PageScrollList Content
</PageScrollList>
)
}Props
| Prop | Type | Default | Description |
| ----------- | --------------------------------------- | ----------- | ------------------------- |
| children | React.ReactNode | - | Component children |
| className | string | '' | Additional CSS class name |
| variant | 'default' \| 'primary' \| 'secondary' | 'default' | Component variant |
| size | 'small' \| 'medium' \| 'large' | 'medium' | Component size |
| disabled | boolean | false | Disabled state |
Examples
Variants
<PageScrollList variant="default">Default</PageScrollList>
<PageScrollList variant="primary">Primary</PageScrollList>
<PageScrollList variant="secondary">Secondary</PageScrollList>Sizes
<PageScrollList size="small">Small</PageScrollList>
<PageScrollList size="medium">Medium</PageScrollList>
<PageScrollList size="large">Large</PageScrollList>States
<PageScrollList disabled>Disabled</PageScrollList>Styling
The component uses CSS modules for styling. You can override styles by passing a custom className or by targeting the component's CSS classes in your global styles.
Development
To run the component in development mode:
npm run storybookTo run tests:
npm run testTo lint the component:
npm run lint