All Projects β†’ charkour β†’ react-reactions

charkour / react-reactions

Licence: MIT license
😲 Create custom reaction pickers and counters or use your favorites!

Programming Languages

typescript
32286 projects
CSS
56736 projects

Projects that are alternatives of or similar to react-reactions

reactions
❀ A Flarum extension that adds reactions to your Flarum Community!
Stars: ✭ 17 (-50%)
Mutual labels:  emoji, reactions
no-facebook-emoji
Get rid of those ugly emojis now! [stopped working 😒]
Stars: ✭ 15 (-55.88%)
Mutual labels:  emoji, facebook
Listplaceholder
ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views.
Stars: ✭ 511 (+1402.94%)
Mutual labels:  facebook, custom
Wdt Emoji Bundle
Slack like emoji picker with apple/ios, twitter/twemoji, google, emojione, facebook, messenger emoji support
Stars: ✭ 411 (+1108.82%)
Mutual labels:  emoji, facebook
Fnreactionsview
FNReactionsView is a customizable control (based on UIView) to give people a way to show floating emoji like facebook does during live stream, easy way.
Stars: ✭ 87 (+155.88%)
Mutual labels:  emoji, facebook
Opensource Socialnetwork
Open Source Social Network (OSSN) is a social networking software written in PHP. It allows you to make a social networking website and helps your members build social relationships, with people who share similar professional or personal interests. It is available in 16 international languages.
Stars: ✭ 710 (+1988.24%)
Mutual labels:  emoji, facebook
Photoeditor
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
Stars: ✭ 3,105 (+9032.35%)
Mutual labels:  emoji, facebook
discord-reaction-role-bot
A Discord bot that allows users to self-assign roles using reactions.
Stars: ✭ 110 (+223.53%)
Mutual labels:  emoji, reactions
ReactButton
Android Library to make it easy to add ReactButton feature in your app with Multi Reactions like Facebook or Linkedin, you can add many reactions as you want, you can also split them into a number of columns, and also customize the colours and text for each reaction
Stars: ✭ 100 (+194.12%)
Mutual labels:  emoji, reactions
WeiboEmoji
Weibo Emoji is a repository for saving and sharing most Emoji images that are used/were previously used by the app Weibo.
Stars: ✭ 17 (-50%)
Mutual labels:  emoji
facebook-video-downloader
Facebook Video Downloader Website Script written in PHP
Stars: ✭ 22 (-35.29%)
Mutual labels:  facebook
emojimix
πŸ€– emojimix implemented in Svelte πŸ€–
Stars: ✭ 24 (-29.41%)
Mutual labels:  emoji
FrameBot
An open source template to kickstart your own facebook framebot!
Stars: ✭ 89 (+161.76%)
Mutual labels:  facebook
pokeai
Develop ultimate AI PokΓ©mon trainer
Stars: ✭ 18 (-47.06%)
Mutual labels:  pokemon
facebook-bot-autoresponder
Facebook bot that automatically responds to the comments of a certain post
Stars: ✭ 90 (+164.71%)
Mutual labels:  facebook
Skeleton
Skeleton is a Social Engineering tool attack switcher
Stars: ✭ 44 (+29.41%)
Mutual labels:  facebook
Fb Automated Birthday Wisher
Automatically wishes your selected fb friends on their Birthday
Stars: ✭ 39 (+14.71%)
Mutual labels:  facebook
PogoMap
PoGo Map using React Native
Stars: ✭ 59 (+73.53%)
Mutual labels:  pokemon
logd.me
Your personal and friendly life log!
Stars: ✭ 16 (-52.94%)
Mutual labels:  facebook
md-file-tree
Generate markdown list of all the files in a directory. Now also with emoji πŸ“‚ πŸ“„
Stars: ✭ 130 (+282.35%)
Mutual labels:  emoji

react-reactions

Create your own reaction bar or use one of your favorites!

  • 4 Different Selectors - Slack, Facebook, Pokemon and GitHub
  • 5 Different Counters - GitHub, YouTube, Facebook, Pokemon, and Slack

Downloads

Install via npm (or from the GitHub Package Registry):

npm i @charkour/react-reactions

This originated as a fork of casesandberg/react-reactions which is been modified under the MIT license to include additional features.

New Features

  • Add ability to pass custom icons
  • Fixed security vulnerabilities
  • CJS and ESM support
  • Add ref forwarding support
  • Zero dependencies
  • Built in Typescript and modern React (with TSDX)
  • Works with React 16.8+ and Next 10

Road Map

  • Update current Selectors and Counter to match 2021 styles
  • Add Discord Selector and Counter
  • Add unit testing
  • More??? Suggest a feature on Github Issues

Custom Selectors

Reaction Bar Selector

import React from 'react';
import { ReactionBarSelector } from '@charkour/react-reactions';

const Component = () => {
  return <ReactionBarSelector />;
};

Props:

iconSize?: number β€” String icon pixel size. Defaults to 38px

reactions?: Reaction[]; β€” Array of Reaction objects {label: "haha", node: <div>πŸ˜„</div>, key: "smile"} to display.

onSelect: (key: string) => void; β€” Function callback when emoji is selected

style?: React.CSSProperties - Pass a style object to the selector container

image

Also works with images.

image

Note: When passing an <img> as a Reaction. Specify the iconSize as the height of the image. <img height={iconSize} src="img-source" />

Reaction Counter

import React from 'react';
import { ReactionCounter } from '@charkour/react-reactions';

const Component = () => {
  return <ReactionCounter />;
};

Props:*

iconSize?: number - String icon pixel size. Defaults to 24px

bg?: string - String of hex color for outline of overlapping reactions. Defaults to #fff

reactions: ReactionCounterObject[] - Array of emoji to dispay

user?: string - String name of user so that user displays as You

important?: string[] - Array of strings for important users to display their name

showReactsOnly?: boolean - If true, only show the Reactions and no text. Defaults to false

showTotalOnly?: boolean - If true, only show the number of Reactions and no specific names. Defaults to false

showOthersAlways?: boolean - Will display "and 0 others" if you are the only person who reacted. Defaults to true

className?: string - Pass a string that applies to the counter container

onClick?: () => void - Pass a callback that is added to the onClick property to the counter container

style?: React.CSSProperties - Pass a style object to the counter container

image

Selectors

Slack Selector

import React from 'react';
import { SlackSelector } from '@charkour/react-reactions';

const Component = () => {
  return <SlackSelector />;
};

Props:

active: String of active tab. Defaults to mine

scrollHeight: String pixel height of scroll container. Defaults to 270px

removeEmojis: Array of emojis to remove from emoji list

frequent: Array of emojis to set Frequently Used. Defaults to ['πŸ‘', 'πŸ‰', 'πŸ™Œ', 'πŸ—Ώ', '😊', '🐬', '😹', 'πŸ‘»', 'πŸš€', '🚁', 'πŸ‡', 'πŸ‡¨πŸ‡¦']

onSelect: Function callback when emoji is selected


Github Selector

import React from 'react';
import { GithubSelector } from '@charkour/react-reactions';

const Component = () => {
  return <GithubSelector />;
};

Props:

reactions: Array of emoji to dispay. Defaults to ['πŸ‘', 'πŸ‘Ž', 'πŸ˜„', 'πŸŽ‰', 'πŸ˜•', '❀️']

onSelect: Function callback when emoji is selected


Facebook Selector

import React from 'react';
import { FacebookSelector } from '@charkour/react-reactions';

const Component = () => {
  return <FacebookSelector />;
};

Props:

reactions: Array of strings for reactions to display. Defaults to ['like', 'love', 'haha', 'wow', 'sad', 'angry']

iconSize: String icon pixel size. Defaults to 38px

onSelect: Function callback when emoji is selected


Pokemon Selector

import React from 'react';
import { PokemonSelector } from '@charkour/react-reactions';

const Component = () => {
  return <PokemonSelector />;
};

Props:

reactions: Array of strings for reactions to display. Defaults to ['like', 'love', 'haha', 'wow', 'sad', 'angry']

iconSize: String icon pixel size. Defaults to 38px

onSelect: Function callback when emoji is selected


Counters

Github Counter

import React from 'react';
import { GithubCounter } from '@charkour/react-reactions';

const Component = () => {
  return <GithubCounter />;
};

Props:

counters: Array of counter objects structured such that:

{
  emoji: 'πŸ‘', // String emoji reaction
  by: 'case', // String of persons name
}

user: String name of user so that user displays as You

onSelect: Function callback when emoji is selected

onAdd: Function callback when add reaction is clicked


Youtube Counter

import React from 'react';
import { YoutubeCounter } from '@charkour/react-reactions';

const Component = () => {
  return <YoutubeCounter />;
};

Props:

like: String number of likes

dislike: String number of dislikes

onLikeClick: Function callback when like is clicked

onDislikeClick: Function callback when dislike is clicked


Facebook Counter

import React from 'react';
import { FacebookCounter } from '@charkour/react-reactions';

const Component = () => {
  return <FacebookCounter />;
};

Props:

counters: Array of counter objects structured such that:

{
  emoji: 'like', // String name of reaction
  by: 'Case Sandberg', // String of persons name
}

user: String name of user so that user displays as You

important: Array of strings for important users to display their name

bg: String of hex color for outline of overlapping reactions. Defaults to #fff

onClick: Function callback when clicked

alwaysShowOthers: boolean. Will display "and 0 others" if you are the only person who reacted.


Pokemon Counter

import React from 'react';
import { PokemonCounter } from '@charkour/react-reactions';

const Component = () => {
  return <PokemonCounter />;
};

Props:

counters: Array of counter objects structured such that:

{
  emoji: 'like', // String name of reaction
  by: 'Charles Kornoelje', // String of persons name
}

user: String name of user so that user displays as You

important: Array of strings for important users to display their name

bg: String of hex color for outline of overlapping reactions. Defaults to #fff

onClick: Function callback when clicked

alwaysShowOthers: boolean. Will display "and 0 others" if you are the only person who reacted.


Slack Counter

import React from 'react';
import { SlackCounter } from '@charkour/react-reactions';

const Component = () => {
  return <SlackCounter />;
};

Props:

counters: Array of counter objects structured such that:

{
  emoji: 'πŸ—Ώ', // String emoji reaction
  by: 'case', // String of persons name
}

user: String name of user so that user displays as You

onSelect: Function callback when emoji is selected

onAdd: Function callback when add reaction is clicked


Animations

A simple animation can be done on the components using CSS. See this demo. More advaned animations can be done using dynamic styles. See this demo

Development

npm start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

Then run either Storybook or the example playground:

Storybook

Run inside another terminal:

npm run storybook

This loads the stories from ./stories.

NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.

Example

Then run the example inside another:

cd example
npm i
npm start

The default example imports and live reloads whatever is in /dist, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. No symlinking required, we use Parcel's aliasing.

To do a one-off build, use npm run build.

To run tests, use npm test.

Configuration

Code quality is set up for you with prettier, husky, and lint-staged. Adjust the respective fields in package.json accordingly.

Jest

Jest tests are set up to run with npm test.

GitHub Actions

  • main which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix

Pokemon Illustrations by Chris Owens

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].