1.0.5 • Published 18 days ago

react-ladda-button v1.0.5

Weekly downloads
142
License
MIT
Repository
github
Last release
18 days ago

react-ladda-button

Hooks based ladda buttons port in typescript with hooks

This is a port of Ladda by Hakim El Hattab

NPM JavaScript Style Guide

Live Demo

Install

npm install --save react-ladda-button

Usage

import React, { Component } from 'react'

import LaddaButton, {EXPAND_LEFT} from 'react-ladda-button'
import 'react-ladda-button/dist/ladda-themeless.min.css'

class Example extends Component {
  render() {
    return <LaddaButton data-style={EXPAND_LEFT}>I'm a button!</LaddaButton>
  }
}

More examples in the Live Demo. The API is virtually identical to Ladda.

considerations

The spinner style attributes are only used on first spinner creation, then the spinner is cached. This seems like something that likely never changes. If you need these to change, use a key to force the button to get recreated. This isn't an oversight its a conscious choice.

License

MIT © RickeyWard

Contributing

this library was bootstrapped with create-react-library and yarn

yarn start

then in another terminal

cd example && yarn start
1.0.5

18 days ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago