1.2.2 • Published 5 years ago

creative-cp-bubble-sidebar v1.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

bubble-sidebar (React)

David David npm NPM

A creative component named BubbleSidebar.

Idea from

https://dribbble.com/shots/6094093-Dashboard-sidemenu-exploration

Website

https://creative-components.github.io/bubble-sidebar/

Screenshot | Demo

https://codepen.io/g1eny0ung/pen/JzvvzE

How to use

npm i creative-cp-bubble-sidebar --save
// or
yarn add creative-cp-bubble-sidebar

Docs

import

// ES Modules
import BubbleSidebar from 'creative-cp-bubble-sidebar'
// CSS
import 'node_modules/creative-cp-bubble-sidebar/style/BubbleSidebar.css'
// SCSS
import 'node_modules/creative-cp-bubble-sidebar/src/BubbleSidebar.scss'

// Common JS
const BubbleSidebar = require('creative-cp-bubble-sidebar')

For browser use:

<link
  rel="stylesheet"
  href="https://unpkg.com/creative-cp-bubble-sidebar/style/BubbleSidebar.css"
/>

...

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.8.4/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.8.4/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.7.2/prop-types.min.js"></script>
<script src="https://unpkg.com/creative-cp-bubble-sidebar"></script>

See ./docs/index.html for more details.

Props

defaultProps = {
  attached: false,
  width: 'normal',
  color: '#fff',
  background: '#000',
  sliderBackground: '#fff',
  activeIndex: 0,
  activeColor: '#000'
}

BubbleSidebar.attached

Tell BubbleSidebar is or not attach itself to container's left.

BubbleSidebar.width

BubbleSidebar's width. Three options: thin, normal, wide

BubbleSidebar.color

BubbleSidebar CSS Style: color.

BubbleSidebar.background

BubbleSidebar CSS Style: background.

BubbleSidebar.sliderBackground

BubbleSidebar's slider CSS Style: background.

BubbleSidebar.activeIndex

Tell BubbleSidebar which index of item will render at first.

BubbleSidebar.activeColor

Active item color of BubbleSidebar.

BubbleSidebar.onClick

Click event of BubbleSidebar.

License

Distributed under the The MIT License (MIT).

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

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