Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dherault/react-apple-emojis
Apple emojis for React as images
https://github.com/dherault/react-apple-emojis
Last synced: 9 days ago
JSON representation
Apple emojis for React as images
- Host: GitHub
- URL: https://github.com/dherault/react-apple-emojis
- Owner: dherault
- License: mit
- Created: 2020-06-20T04:12:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-25T14:52:41.000Z (8 months ago)
- Last Synced: 2024-05-02T00:56:46.368Z (6 months ago)
- Language: TypeScript
- Size: 715 KB
- Stars: 27
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-apple-emojis
Apple emojis for React as images.
The package has a full list of emojis included in it. If you want your build to be lighter you can use your own list and use tree-shaking to reduce your bundle size.
## Installation
```
npm install --save react-apple-emojis
```or
```
yarn add react-apple-emojis
```## Usage
```jsx
import { EmojiProvider, Emoji } from "react-apple-emojis"
import emojiData from "react-apple-emojis/src/data.json"function App() {
return (
)
}
```The `Emoji` component renders to an `img` tag. So pass any prop you would normally pass to an `img`.
The complete list of names can be found on [Emojipedia](https://emojipedia.org/apple/). Just click on an emoji and look at the browser's URL to find its name.
**Relies on [Emojipedia](https://emojipedia.org)'s CDN, usage on heavy traffic pages is disadvised. To use your own CDN:**
```jsx
import { EmojiProvider, Emoji } from "react-apple-emojis"
import emojiData from "./emoji-data.json" // <-- Your own datafunction App() {
return (
)
}
```## Contributing
Yes, thank you.
## License
MIT