1.0.8 • Published 4 years ago

react-social-media-buttons v1.0.8

Weekly downloads
65
License
MIT
Repository
github
Last release
4 years ago

React Social Media Buttons - RSMB

RSMB is a complete ready to use react component for displaying the most common Social Media icons and format them as you wish.

Getting started

npm install react-social-media-buttons

How to use

Check out the live demo here to get an idea on how it works!

Import the component SocialMediaButtons from the library and pass the props of your social links and CSS.

import SocialMediaButtons from 'react-social-media-buttons';

const MyComponent = () => {
  const links = ['https://github.com/jaumefapa', 'https://www.linkedin.com/in/jaume-fabrega/'];

  const buttonStyle = {
    backgroundColor: '#000000',
    borderRadius: '50%',
  };

  const iconStyle = { color: '#ffffff' };

  return (
    <div>
      <SocialMediaButtons buttonStyle={buttonStyle} iconStyle={iconStyle} />
    </div>
  );
};

Props

Prop nameTypeDefaultRequiredDescription
widthString!50pxfalse
heightString!50pxfalse
marginString!5pxfalse
backgroundColorString!#fffffffalse
borderRadiusString!50%false
borderString!2px solid #000000false
borderColorString!-false
borderThicknessString!-false
borderStyleString!-false

iconStyle

Prop nameTypeDefaultRequiredDescription
colorString!#000000trueColor of the icon

openNewTab

Prop nameTypeDefaultRequiredDescription
openNewTabBoolean!truefalseIndicate if open links in a new tab

Other examples

Custom Options

It's possible to pass options and style objects to customize the way you prefer.

<SocialMediaButtons
  links={
    [
      /* array of links */
    ]
  }
  buttonStyle={{
    width: '80px',
    height: '80px',
    border: '2px solid #000000',
    backgroundColor: '#919191',
  }}
  iconStyle={{
    color: '#ffffff',
  }}
/>

Contributing

To contribue please read the CONTRIBUTING.md

Contributors

Acknowledgments

  • To Leonardo Di Vittorio for the idea and the demo "inspiration" - GitHub
  • To Jake Trent from whom I fork the original repo with all the svg icons - GitHub
  • To my colleagues who contributed with ideas, feedback and some refactorization suggestions. Special mention to Erik Pastor for finding that bug (GitHub)

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago