@shapla/react-button

A simple button, in different colors, sizes, and states

Usage no npm install needed!

<script type="module">
  import shaplaReactButton from 'https://cdn.skypack.dev/@shapla/react-button';
</script>

README

Shapla React Button

A simple button, in different colors, sizes, and states

Table of contents

Installation

npm install --save @shapla/react-button

Usage

Styles

with Sass:

import '@shapla/react-button/src/index.scss';

with CSS:

import '@shapla/react-button/dist/button.css';

Javascript Instantiation

import React from 'react';
import Button from '@shapla/react-button';
 
class MyApp extends React.Component {
  render() {
    return (
      <Button theme="primary">Click Me!</Button>
    );
  }
}

Props

Property Type Required Default Description
theme String no default Value can be default or primary or secondary.
size String no normal Value can be normal or small or medium or large.
fullwidth Boolean no false If set true, button will take full width.
disabled Boolean no false If set true, disabled attribute will be added.
outline Boolean no false If set true, outline style will be used.
rounded Boolean no false If set true, rounded style will be used.
fab Boolean no false If set true, circle style will be used.
shadow Boolean no false If set true, box-shadow will be added around button.