{"id":13421922,"url":"https://github.com/rcaferati/react-awesome-button","last_synced_at":"2025-05-14T23:06:37.537Z","repository":{"id":37706499,"uuid":"89107446","full_name":"rcaferati/react-awesome-button","owner":"rcaferati","description":"React button component. Awesome button is a 3D UI, progress, social and share enabled, animated at 60fps, light weight, performant, production ready react UI button component. 🖥️ 📱 ","archived":false,"fork":false,"pushed_at":"2024-07-16T17:21:06.000Z","size":11816,"stargazers_count":1333,"open_issues_count":46,"forks_count":133,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-01T13:01:57.482Z","etag":null,"topics":["animated","animation","button","component","progress","react","share","social"],"latest_commit_sha":null,"homepage":"https://awesome-button.caferati.me","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rcaferati.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-23T00:26:36.000Z","updated_at":"2025-04-13T10:34:52.000Z","dependencies_parsed_at":"2024-01-12T04:47:21.267Z","dependency_job_id":"5443daf2-6db3-49ba-826c-af8401cc10ff","html_url":"https://github.com/rcaferati/react-awesome-button","commit_stats":{"total_commits":234,"total_committers":7,"mean_commits":33.42857142857143,"dds":0.02991452991452992,"last_synced_commit":"4c59852f50f27b0cc389212da491e6d299dd09fa"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Freact-awesome-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Freact-awesome-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Freact-awesome-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Freact-awesome-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcaferati","download_url":"https://codeload.github.com/rcaferati/react-awesome-button/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101581,"owners_count":22014905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animated","animation","button","component","progress","react","share","social"],"created_at":"2024-07-30T23:00:33.974Z","updated_at":"2025-05-14T23:06:37.468Z","avatar_url":"https://github.com/rcaferati.png","language":"SCSS","funding_links":[],"categories":["UI Components","Web version","SCSS"],"sub_categories":["Buttons","Full event control","Extra Content placement"],"readme":"# React \u0026lt;AwesomeButton /\u0026gt; UI Component\n\n[![Travis](https://img.shields.io/travis/rcaferati/react-awesome-button/master.svg)](https://travis-ci.org/rcaferati/react-awesome-button) ![NPM](https://img.shields.io/npm/v/react-awesome-button.svg)\n\n`react-awesome-button` is a performant, extendable, highly customisable, production ready React Component that renders an animated set of 3D UI buttons. Bundled together with a _social share_ and _progress enabled_ components.\n\n[\u003cimg width=\"480\" alt=\"react-awesome-button demo\" src=\"https://caferati.me/images/awesome-button.gif\"\u003e](https://awesome-button.caferati.me)\n\n## Key Features\n\n- 60fps 3D animated button\n- Animated **progress** button\n- **Social icons** and network specific **share methods**\n- OnPress ripple effect\n- Look and feel customisable and extendable in two ways: via **CSS custom properties** or **SASS** variables and lists ([scss config file](https://github.com/rcaferati/react-awesome-button/blob/master/src/styles/default.scss)).\n- Use it with **CSSModules** or \\*\\*Plain CSS\n\n## Live demo\n\nCheckout the live demo with the `CSS customizer` at \u003ca title=\"React Awesome Button - CSS Customizer\" href=\"https://awesome-button.caferati.me/\" target=\"_blank\"\u003eawesome-button.caferati.me\u003c/a\u003e.\n\n[\u003cimg src=\"https://caferati.me/images/github/awesome-button-web.png\" width=\"800\" /\u003e](https://awesome-button.caferati.me)\n\n## Figma File\n\nImport it directly into your [Figma](https://www.figma.com/file/Ug8sNPzmevU3ZQus9Klu5aHq/react-awesome-button-theme-blue) project.\n\n[\u003cimg src=\"https://caferati.me/images/github/figma-awesome-button.png\" width=\"800\" /\u003e](https://www.figma.com/file/Ug8sNPzmevU3ZQus9Klu5aHq/react-awesome-button-theme-blue)\n\nYou can run the storybook locally on `6006` by cloning this repository and running `npm run storybook`\n\n## Installation\n\n```\nnpm install --save react-awesome-button\n```\n\n## Styling with plain CSS and CSS Modules\n\n### Plain CSS\n\n```jsx\nimport { AwesomeButton } from 'react-awesome-button';\nimport 'react-awesome-button/dist/styles.css';\n\nfunction Button() {\n  return \u003cAwesomeButton type=\"primary\"\u003eButton\u003c/AwesomeButton\u003e;\n}\n```\n\n### CSS Modules\n\n```jsx\nimport { AwesomeButton } from 'react-awesome-button';\nimport AwesomeButtonStyles from 'react-awesome-button/src/styles/styles.scss';\n\nfunction Button() {\n  return (\n    \u003cAwesomeButton cssModule={AwesomeButtonStyles} type=\"primary\"\u003e\n      Button\n    \u003c/AwesomeButton\u003e\n  );\n}\n```\n\n### `AwesomeButton` rendered with a button tag\n\nRenders the component with a `button` HTML tag and an `onPress` prop called on animation release.\n\n```jsx\nimport { AwesomeButton } from 'react-awesome-button';\nimport AwesomeButtonStyles from 'react-awesome-button/src/styles/styles.scss';\n\nfunction Button() {\n  return (\n    \u003cAwesomeButton\n      cssModule={AwesomeButtonStyles}\n      type=\"primary\"\n      onPress={() =\u003e {\n        // do something\n      }}\u003e\n      Button\n    \u003c/AwesomeButton\u003e\n  );\n}\n```\n\n### `AwesomeButton` rendered with an anchor tag\n\nRender the component with an `anchor` HTML tag setting the `href` attribute.\n\n```jsx\nimport { AwesomeButton } from 'react-awesome-button';\nimport AwesomeButtonStyles from 'react-awesome-button/src/styles/styles.scss';\n\nfunction Button() {\n  return (\n    \u003cAwesomeButton\n      cssModule={AwesomeButtonStyles}\n      type=\"primary\"\n      href=\"https://google.com\"\u003e\n      Button\n    \u003c/AwesomeButton\u003e\n  );\n}\n```\n\n### `AwesomeButton` props\n\n| Attribute      |     Type     |  Default  | Description                                                                                              |\n| :------------- | :----------: | :-------: | :------------------------------------------------------------------------------------------------------- |\n| type           |   `string`   | `primary` | Render a specific button type, styled by the `.scss` type list                                           |\n| size           |   `string`   |  `auto`   | Render a specific button size, styled by the `.scss` size list                                           |\n| element        |    `node`    |  `null`   | Overwrites the default container element renderer, useful for using it with react-router Link component. |\n| disabled       |    `bool`    |  `false`  | Render the disabled button                                                                               |\n| visible        |    `bool`    |  `true`   | Toggle button visibility                                                                                 |\n| ripple         |    `bool`    |  `false`  | Sets up the button with the onPress ripple effect                                                        |\n| placeholder    |    `bool`    |  `true `  | Should render the animated placeholder on empty `children`                                               |\n| onPress        |  `function`  |  `null`   | Default `pressRelease` event function                                                                    |\n| onPressed      |  `function`  |  `null`   | Event function triggered only on full button press                                                       |\n| onReleased     |  `function`  |  `null`   | Event function triggered on button full animation release                                                |\n| onMouseDown    |  `function`  |  `null`   | Event function coupled with the element's `onMouseDown`                                                  |\n| onMouseUp      |  `function`  |  `null`   | Event function coupled with the element's `onMouseUp`                                                    |\n| href           |   `string`   |  `null`   | Forces the button to be rendered on an `anchor` container and sets the href to the specified value       |\n| className      |   `string`   |  `null`   | Adds a `className` to the button container element                                                       |\n| style          |   `object`   |  `null`   | Passes a `style` object to the container element                                                         |\n| containerProps |   `object`   |  `null`   | Exposes an option for freely adding props to the button container element                                |\n| cssModule      |   `object`   |  `null`   | Accepts a css module configuration from the themed `module.scss` files                                   |\n| target         |   `string`   |  `null`   | When used together with `href` renders an anchor with a specific target attribute                        |\n| before         | `React.Node` |  `null`   | Render a `node` before the main content `span` container; useful for setting icons                       |\n| after          | `React.Node` |  `null`   | Render a `node` after the main content `span` container; useful for setting icons                        |\n| between        |   `string`   |  `null`   | Sets the content elements relation to `space-between`; useful for setting icons                          |\n| active         |    `bool`    |  `false`  | When set to `true` activates the pressIn animation                                                       |\n\n### `AwesomeButtonProgress` basic example\n\nCheckout this example live on the [storyboard](https://caferati.me/demo/react-awesome-button/storybook/?selectedKind=AwesomeButtonProgress\u0026selectedStory=Success).\n\n```jsx\nimport { AwesomeButtonProgress } from 'react-awesome-button';\nimport AwesomeButtonStyles from 'react-awesome-button/src/styles/styles.scss';\n\nfunction Button() {\n  return (\n    \u003cAwesomeButtonProgress\n      cssModule={AwesomeButtonStyles}\n      type=\"primary\"\n      onPress={(event, release) =\u003e {\n        // do a sync/async task then call `release()`\n      }}\u003e\n      Button\n    \u003c/AwesomeButtonProgress\u003e\n  );\n}\n```\n\n### `AwesomeButtonProgress` specific props\n\nBeing a wrapper on the **`AwesomeButton`** component, it accepts its props plus the following ones.\n\n| Attribute    |    Type    |  Default   | Description                                                                      |\n| :----------- | :--------: | :--------: | :------------------------------------------------------------------------------- |\n| onPress      | `function` |   `null`   | Default `onPress` function returning the `event` and a button `release` strategy |\n| loadingLabel |  `string`  | `Wait ..`  | Progress button loading label text                                               |\n| resultLabel  |  `string`  | `Success!` | Progress button success label text                                               |\n| releaseDelay |  `number`  |    500     | Delay for releasing the button after the progress animation                      |\n\n### `AwesomeButtonSocial` basic example\n\nIf nothing is passed on the `sharer` prop, the component automatically gets the page's own `title` and `og:image` properties; otherwise, it's setup by the `sharer`.\n\n```jsx\n  import { AwesomeButtonSocial } from 'react-awesome-button';\n  import AwesomeButtonStyles from 'react-awesome-button/src/styles/styles.scss'\n\n  function Button() {\n    return (\n      \u003cAwesomeButtonSocial\n        cssModule={AwesomeButtonStyles}\n        type=\"facebook\"\n        sharer={{\n          url=\"https://caferati.me\"\n        }}\n      \u003e\n        Button\n      \u003c/AwesomeButton\u003e\n    );\n  }\n```\n\n### `AwesomeButtonSocial` whatsapp example\n\n```jsx\n  import { AwesomeButtonSocial } from 'react-awesome-button';\n  import AwesomeButtonStyles from 'react-awesome-button/src/styles/styles.scss'\n\n  function Button() {\n    return (\n      \u003cAwesomeButtonSocial\n        cssModule={AwesomeButtonStyles}\n        type=\"whatsapp\"\n        sharer={{\n          phone: '############',\n          message: 'Whatsapp init message'\n        }}\n      \u003e\n        Button\n      \u003c/AwesomeButton\u003e\n    );\n  }\n```\n\n### `AwesomeButtonSocial` specific props\n\nBeing a wrapper on the **`AwesomeButton`** component, it accepts its props plus the following ones.\n\n| Attribute      |          Type          | Default | Description                                                                                                                                 |\n| :------------- | :--------------------: | :-----: | :------------------------------------------------------------------------------------------------------------------------------------------ |\n| type           |        `string`        | `null`  | Render a button type (Facebook, Instagram, Twitter, Github, Youtube, Linkedin, Pinterest, Reddit, Messenger, Whatsapp)                      |\n| icon           | `bool` or `Dimensions` | `true`  | Setting to `false` avoids icon rendering; if the dimensions type is passed in `{width: number, height: number}`, configures the button size |\n| sharer.url     |        `string`        | `null`  | Url string to be used on the sharer                                                                                                         |\n| sharer.image   |        `string`        | `null`  | Image url to be rendered on the sharer                                                                                                      |\n| sharer.message |        `string`        | `null`  | Message string to be rendered on the shared post                                                                                            |\n| sharer.phone   |        `string`        | `null`  | Phone number to be used when using the `Whatsapp` sharer type                                                                               |\n| sharer.user    |        `string`        | `null`  | Username to be redirected when using the `Messenger` sharer type                                                                            |\n\n## React Native Version\n\nCheckout the React Native version of the Awesome Button UI Component at [rcaferati/react-native-really-awesome-button](https://github.com/rcaferati/react-native-really-awesome-button)\n\n\u003cimg width=\"280\" src='https://caferati.me/images/demo-button-cartman.gif' /\u003e\n\n## Author\n\n#### Rafael Caferati\n\n- Checkout my \u003ca href=\"https://caferati.me\" title=\"Full-Stack Web Developer, UI/UX Javascript Specialist\" target=\"_blank\"\u003eFull-Stack Web Developer Website\u003c/a\u003e\n- Other open source projects @ \u003ca title=\"Web Software Developer Code Laboratory\" target=\"_blank\" href=\"https://caferati.me/labs\"\u003eCode Laboratory\u003c/a\u003e\n- A scope of my work @ \u003ca title=\"Web Software Developer Portfolio\" target=\"_blank\" href=\"https://caferati.me/portfolio\"\u003eWeb Developer Portfolio\u003c/a\u003e\n\n## License\n\nMIT. Copyright (c) 2019 Rafael Caferati.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcaferati%2Freact-awesome-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcaferati%2Freact-awesome-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcaferati%2Freact-awesome-button/lists"}