3.0.3 • Published 4 years ago

@orcden/od-spinner v3.0.3

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
4 years ago

Spinning component to indicate busy or loading

<od-spinner> is a simple component that will hijack the users experience and display a spinning loading cirlce instead.

Installation

  • Install with npm
npm i @orcden/od-spinner

Usage

import '@orcden/od-spinner';
<div style='height: 500px; position: relative;'>
    <od-spinner scoped size='100' bar-size='10' id='spinner'></od-spinner>
</div>

Attributes

AttributeTypeDefaultDescription
scopedBooleanfalseSet this so that the spinner doesn't take up the whole screen. Will scope itslef to the next parent element with position relative (in CSS)
activeBooleanfalseControls CSS to show/hide the spinner
sizeNumber40In pixels. Controls the width ( diameter ) of the spinner
bar-sizeNumber3In pixels. Controls the stroke width of the spinner

Properties

AttributeTypeDefaultDescription
scopedBooleanfalseSet this so that the spinner doesn't take up the whole screen. Will scope itslef to the next parent element with position relative (in CSS)
activeBooleanfalseControls CSS to show/hide the spinner
sizeNumber40In pixels. Controls the width ( diameter ) of the spinner
barSizeNumber3In pixels. Controls the stroke width of the spinner

Functions

NameParametersDescription
toggleActiveNonetoggles the spinner on and off

Styling

  • CSS variables are available to alter the default styling provided
Shadow PartsDescription
modalThe modal inside the component
circleThe circle HTML Element inside the component. Set Stroke to change the colour.

Development

Run development server and show demo

npm run demo

Run linter

npm run lint

Fix linter errors

npm run fix

Run tests

npm run test

Build for production

npm run build
3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.1

6 years ago

2.0.0

6 years ago