Skip to content

A framework agnostic web component scroller that only uses CSS to mimic native-like behavior.

License

Notifications You must be signed in to change notification settings

dmbdesignpdx/native-scroller

Repository files navigation

Native Scroller

A framework agnostic web component scroller that only uses CSS to mimic native app behavior.

CodeFactor

Getting Started

Install

# npm
npm i native-scroller

# yarn
yarn native-scroller

# pnpm
pnpm native-scroller

Import just once, preferably in a root file.

import 'native-scroller';

Use wherever you use HTML

<native-scroller></native-scroller>

Props

  • inline (String) - How wide is each child relative to the scroller container. Default: '100%'.
  • gap (String) - The space between each child. Default: '15px'.

Example

<native-scroller
  inline="66.6%"
  gap="18px"
>
  <img src="..." alt="" />
  <img src="..." alt="" />
  <img src="..." alt="" />
  <img src="..." alt="" />
  <img src="..." alt="" />
</native-scroller>

About

A framework agnostic web component scroller that only uses CSS to mimic native-like behavior.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published