1.0.5 • Published 5 years ago

@matrix-scrollbar/vue v1.0.5

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

@matrix-scrollbar/vue 🔭👩‍🚀

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's dependencies:

npm install --save @matrix-scrollbar/vue

This package also depends on vue. Please make sure you have it installed as well.

Example

Try it out in the browser

<template>
  <div id="app">
    <matrix-scrollbar className="styledBox">
      <ul class="sizeOfList">
        <li
          v-for="(item, index) in items"
          :key="`item-${index}`"
          class="list-item"
        >
          {{ index }}
        </li>
      </ul>
    </matrix-scrollbar>
  </div>
</template>

<script>
import { MatrixScrollbar } from "@matrix-scrollbar/vue";

export default {
  name: "app",
  components: {
    MatrixScrollbar
  },
  data() {
    return {
      items: new Array(100).fill(null)
    };
  }
};
</script>


<style>
  ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .sizeOfList {
    height: 300px;
    width: 250px;
  }

  .styledBox {
    width: auto;
    height: auto;
    border: 1px solid #e8e8e8;
    background-color: white;
    display: inline-flex;
    box-shadow: 0 16px 18px -4px rgba(0, 0, 0, 0.1);
  }

  .list-item {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 10px;
  }

  .list-item:nth-of-type(odd) {
    background-color: #995cc92e;
  }
</style>

Props/Settings

keydefaultdescription
autoHideThumbtrueboolean
minThumbHeight30number
viewportIdoptionalstring, if the first element is not the viewport
totalHeightoptionalnumber: rare cases to help with the calculation
classoptionalstring: setting class to the most outer element

Styling

classactive (appended)
matrixScrollbar__thumbmatrixScrollbar__thumb-active
matrixScrollbar__railmatrixScrollbar__rail-active
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago