1.2.9 • Published 2 years ago

react-reusable-button-library v1.2.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Button

react-reusable-button-library is a performant built, highly customizable, production-ready React Component that renders an animated set of 3D UI buttons.

Documentation

Documentations

Installation

Install my-library with npm

npm i react-reusable-button-library

Import

import { Button } from 'react-reusable-button-library';

Styling with plain CSS

import { Button } from 'react-reusable-button-library';

function Button() { return <Button>Button</Button>; }

Accessibility

  • Button has role of button.

  • When Button has focus, Enter or Space activates it.

Button Sizes

Use the size prop to change the size of the button. You can set the value to xssmmd, or lg.

Button sizes

<Stack row wrap >
    <Button size="xs">Button</Button>
    <Button size="sm">Button</Button>
    <Button size="md">Button</Button>
    <Button size="lg">Button</Button>
</Stack>

Button Variants

Use the variant prop to change the visual style of the Button. You can set the value to  outlined.

Button variant

<Stack row >
    <Button>Button</Button>
    <Button variant="outlined">Button</Button>
</Stack>

Button Colors

Use the colorScheme prop to change the color scheme of the Button. You can set the value to any of the color scales from your design system,like grayredblue, or your custom color.

Button sizes

<Stack spacing={2} row wrap >
        <Button>Button</Button>
        <Button colorScheme="red" >Button</Button>
        <Button colorScheme="yellow" >Button</Button>
        <Button colorScheme="green" >Button</Button>
        <Button colorScheme="pink" >Button</Button>
        <Button colorScheme="blue" >Button</Button>
        <Button colorScheme="cyan" >Button</Button>
        <Button colorScheme="orange" >Button</Button>
        <Button colorScheme="purple" >Button</Button>
        <Button colorScheme="teal" >Button</Button>
        <Button colorScheme="linkdin" >Button</Button>
        <Button colorScheme="facebook" >Button</Button>
        <Button colorScheme="whatsapp" >Button</Button>
        <Button colorScheme="twitter" >Button</Button>
        <Button colorScheme="telegram" >Button</Button>
</Stack>

Social Buttons

We've included the colors for common social media platforms, and you can simply use their buttons via the colorScheme prop.

Social buttons

<Stack row >
  <Button colorScheme="facebook">
    Facebook
  </Button>

  <Button colorScheme="twitter"
    Twitter
  </Button>

  <Button colorScheme="telegram"
    Telegram
   </Button>

  <Button colorScheme="whatsapp">
    Whatsapp
   </Button>
</Stack>

Button with Icons

We've included the left and right icons button.

Social buttons

<Stack>
    <Button leftIcon={<IoMdArrowBack />}Button></Button>
    <Button rightIcon={<IoMdArrowForward />} >Button</Button>
</Stack>

Props

Button Props

Buttoncomposes the Button component, so you can pass all its props. These are props specific to the Buttoncomponent:

colorScheme

Type

"gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"

Default

"telegram"

size

Type

"lg" | "md" | "sm" | "xs"

Default

"md"

variant

Type

"outline" | "solid"

Default

"solid"

License

MIT

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago