17.0.0 • Published 4 months ago

angular-horizontal-scroll v17.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

📜 Angular Horizontal Scroller

Provide an angular component for a scrolling container horizontal.

🔗 Demo

Live Example

📦 Install

npm install angular-horizontal-scroll

⚙️ Usage

  1. Import the AngularHorizontalScroll in your module or standalone component:

    import { AngularHorizontalScroll } from "angular-horizontal-scroll";
  2. Include your content within the horizontal-scroll tags:

    <horizontal-scroll>
      <!-- Your content here -->
    </horizontal-scroll>
  3. Customize the component's appearance by adjusting the containerStyles API.

    import { ContainerStyles } from "angular-horizontal-scroll";

✨ API

⌨️ Component Parameters

ParamTypeDefaultDescription
[containerStyles]ContainerStyles-Styles for container
[buttonStyles]ButtonStyles-Styles for buttons
[headerTitleTemplate]string | TemplateRef-The title for the container
(onLeftBtnClick)EventEmitter-Left button click callback
(onRightBtnClick)EventEmitter-Right button click callback
(onScroll)EventEmitter-Scroll callback
[scrollAmount]'auto' | 'full' | number'auto'Control the scroll amount.
[scrollButtonPosition]'center' | 'top right''center'The placement of scrolls buttons
[scrollButtonTemplate]TemplateRef | undefined-Custom scroll button
[showScrollbar]booleanfalseOption to show scrollbar

🎨 Custom Styles

Container Styles

PropertyTypeDefaultDescription
containerGapnumber0Set the gap between header and container in px
elementsGapnumber16Set the gap between elements within the component in px
firstAndLastElementGapnumber16Set the gap between the first and last element and container in px
inlineStylestring""Set the inline styles for container

Button Styles

PropertyTypeDefaultDescription
arrowColorstring'#fff'Set the color of the arrow
btnBgColorstring'#0000004d'Set the background color of the button
btnSizenumber16Set the size of the button in px
inlineStylestring""Set the inline styles for buttons

🤝 Contributing

Contributions are welcome! If you find any issues or would like to add new features, feel free to open a pull request.

15.2.1

4 months ago

17.0.0

4 months ago

16.2.2

4 months ago

16.2.1

4 months ago

15.2.0

4 months ago

16.2.0

4 months ago

15.1.0

8 months ago

16.1.0

8 months ago

15.0.1

8 months ago

15.0.0

8 months ago

16.0.0

8 months ago

0.2.0

8 months ago

0.1.3

8 months ago

0.1.2

9 months ago

0.1.0

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago