cozumel/yii2-twemoji

Use Twemoji in Yii2.

Installs: 465

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.0.0 2018-04-21 03:14 UTC

This package is not auto-updated.

Last update: 2024-03-17 20:31:52 UTC


README

Latest Stable Version Total Downloads License

A simple way to add Twemoji support to your Yii2 project.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist cozumel/yii2-twemoji "*"

or add

"cozumel/yii2-twemoji": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

use cozumel\twemoji\TwemojiAsset;

TwemojiAsset::register($this);

CSS

Because every project will have different size requirements, the css is not part of the extension. The default size of the emojis is 72x72. You can change this easily with some css.

img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 .05em 0 .1em;
  vertical-align: -0.1em;
}