<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yizack Rangel</title>
    <description>The latest articles on DEV Community by Yizack Rangel (@yizack).</description>
    <link>https://dev.to/yizack</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F877362%2Ff707e0dc-6567-4ee7-b27e-0c315118e4a1.jpg</url>
      <title>DEV Community: Yizack Rangel</title>
      <link>https://dev.to/yizack</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yizack"/>
    <language>en</language>
    <item>
      <title>I Built an Open-Source project. It Became the Official MailChannels JS SDK</title>
      <dc:creator>Yizack Rangel</dc:creator>
      <pubDate>Thu, 13 Aug 2026 18:08:57 +0000</pubDate>
      <link>https://dev.to/yizack/i-built-an-open-source-project-it-became-the-official-mailchannels-js-sdk-1209</link>
      <guid>https://dev.to/yizack/i-built-an-open-source-project-it-became-the-official-mailchannels-js-sdk-1209</guid>
      <description>&lt;p&gt;&lt;em&gt;How an independent open-source project grew into a full TypeScript SDK and was eventually adopted by MailChannels.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Sometimes, open-source projects start with a very small problem.&lt;/p&gt;

&lt;p&gt;You build something because &lt;strong&gt;you need it yourself&lt;/strong&gt;, publish it because you think someone else might find it useful, and then keep improving it simply because you enjoy building software.&lt;/p&gt;

&lt;p&gt;That was the story behind &lt;code&gt;mailchannels-sdk&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What started as a small Nuxt integration eventually became a full &lt;a href="https://nodejs.org" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; and &lt;a href="https://www.typescriptlang.org" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt; SDK for &lt;a href="https://www.mailchannels.com" rel="noopener noreferrer"&gt;MailChannels&lt;/a&gt;. Along the way, I learned a lot from the &lt;a href="https://vuejs.org" rel="noopener noreferrer"&gt;Vue&lt;/a&gt;, &lt;a href="https://nuxt.com" rel="noopener noreferrer"&gt;Nuxt&lt;/a&gt;, and &lt;a href="https://unjs.io/" rel="noopener noreferrer"&gt;UnJS&lt;/a&gt; ecosystems, took inspiration from other developer-focused tools such as &lt;a href="https://resend.com/" rel="noopener noreferrer"&gt;Resend&lt;/a&gt;, and eventually had the opportunity to join MailChannels and get the project adopted and officially maintained.&lt;/p&gt;

&lt;p&gt;This is the story of how that happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Built a small Nuxt integration that evolved into a full TypeScript SDK for MailChannels.&lt;/li&gt;
&lt;li&gt;The SDK focuses on developer experience (camelCase, TypeScript types, local simulator) and covers 40+ endpoints.&lt;/li&gt;
&lt;li&gt;I joined MailChannels and now help maintain the SDK; contributions and feedback are welcome.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Why I built the SDK and the problems it solves&lt;/li&gt;
&lt;li&gt;How the project evolved from a Nuxt module into a Node.js SDK&lt;/li&gt;
&lt;li&gt;Key design choices and what's next&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Discovering MailChannels
&lt;/h2&gt;

&lt;p&gt;I first discovered MailChannels in 2022–2023 while working on several personal and professional projects that needed a simple and affordable way to send emails.&lt;/p&gt;

&lt;p&gt;I'm primarily a web application developer, and at the time I was working a lot with &lt;a href="https://www.cloudflare.com/products/workers/" rel="noopener noreferrer"&gt;Cloudflare Workers&lt;/a&gt;. Email was a common requirement: contact forms, welcome emails, registration notifications, and other transactional messages.&lt;/p&gt;

&lt;p&gt;MailChannels was a good fit for these projects because it was directly integrated in Cloudflare Workers at no cost, and using it also introduced me to parts of email infrastructure that I hadn't worked with deeply before.&lt;/p&gt;

&lt;p&gt;I started learning more about email delivery and security, including things like &lt;strong&gt;DKIM signing&lt;/strong&gt; and domain authentication.&lt;/p&gt;

&lt;p&gt;What started as a practical requirement gradually became something I was genuinely interested in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Cloudflare Workers problem
&lt;/h2&gt;

&lt;p&gt;I continued using MailChannels across several projects.&lt;/p&gt;

&lt;p&gt;Then, in October 2024, MailChannels announced the end of support for Cloudflare Workers.&lt;/p&gt;

&lt;p&gt;I had already built several applications around MailChannels, and replacing all of those integrations with another provider wasn't particularly appealing.&lt;/p&gt;

&lt;p&gt;Fortunately, MailChannels was offering its Email API with a free tier. I signed up, obtained an API key, and continued using MailChannels through the Email API.&lt;/p&gt;

&lt;p&gt;That solved the immediate problem.&lt;/p&gt;

&lt;p&gt;But it also exposed another one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The API was fine. My integrations weren't
&lt;/h2&gt;

&lt;p&gt;The MailChannels API gave me everything I needed, but I found myself repeatedly building the same request structures across different projects.&lt;/p&gt;

&lt;p&gt;You need to know how properties such as &lt;code&gt;personalizations&lt;/code&gt; work, remember the available options, construct the request correctly, and make sure the payload matches the API specification.&lt;/p&gt;

&lt;p&gt;Doing it once is easy.&lt;/p&gt;

&lt;p&gt;Doing it across multiple projects gets repetitive.&lt;/p&gt;

&lt;p&gt;I started thinking that TypeScript could make this experience much nicer.&lt;/p&gt;

&lt;p&gt;Instead of manually constructing API requests every time, I wanted something closer to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MailChannels&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mailchannels-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mailchannels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;MailChannels&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your-api-key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mailchannels&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;emails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Acme &amp;lt;hello@acme.com&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user@example.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Welcome!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;html&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;p&amp;gt;Thanks for joining&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The MailChannels Email API wasn't necessarily the problem.&lt;/p&gt;

&lt;p&gt;I wanted a better developer experience around it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting with Nuxt
&lt;/h2&gt;

&lt;p&gt;My first solution wasn't a Node.js SDK.&lt;/p&gt;

&lt;p&gt;I mainly use Nuxt in my own web projects, so I initially created a small Nuxt module (&lt;a href="https://www.npmjs.com/package/nuxt-mailchannels" rel="noopener noreferrer"&gt;nuxt-mailchannels&lt;/a&gt;) to make MailChannels easier to integrate into those applications.&lt;/p&gt;

&lt;p&gt;That small project solved my immediate problem.&lt;/p&gt;

&lt;p&gt;But working within the Nuxt ecosystem also influenced how I thought about the library.&lt;/p&gt;

&lt;p&gt;The Vue, Nuxt, and broader UnJS ecosystem has always been a big source of inspiration for me. There is a strong focus on developer experience, TypeScript, clean APIs, composability, portability, and making complicated things feel simple.&lt;/p&gt;

&lt;p&gt;Working with projects such as Nuxt, &lt;a href="https://nitro.build" rel="noopener noreferrer"&gt;Nitro&lt;/a&gt;, and other UnJS packages taught me a lot about how good JavaScript tooling can feel.&lt;/p&gt;

&lt;p&gt;I wanted to bring some of those ideas into the MailChannels integration.&lt;/p&gt;

&lt;p&gt;Eventually I started asking myself:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why should this only work for my Nuxt projects?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  From a Nuxt module to a Node.js SDK
&lt;/h2&gt;

&lt;p&gt;I had also been looking at other projects in the JavaScript ecosystem and was particularly inspired by how Resend structured its Node.js package.&lt;/p&gt;

&lt;p&gt;The API was simple and pleasant to use.&lt;/p&gt;

&lt;p&gt;That made me think:&lt;/p&gt;

&lt;p&gt;What if MailChannels had something similar?&lt;/p&gt;

&lt;p&gt;At that point, the project started becoming more ambitious.&lt;/p&gt;

&lt;p&gt;Instead of a small Nuxt module, I decided to build a proper Node.js SDK for MailChannels.&lt;/p&gt;

&lt;p&gt;The goal wasn't simply to wrap a few HTTP endpoints.&lt;/p&gt;

&lt;p&gt;I wanted to cover the MailChannels API as completely as possible while making the interface feel natural to JavaScript and TypeScript developers.&lt;/p&gt;

&lt;p&gt;Today, the SDK covers a broad range of MailChannels Email API functionality, with around +40 official endpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making an API feel like JavaScript
&lt;/h2&gt;

&lt;p&gt;One of the things I care about most in the SDK is the developer experience.&lt;/p&gt;

&lt;p&gt;The MailChannels API uses &lt;code&gt;snake_case&lt;/code&gt; for many of its properties. That's perfectly reasonable for an HTTP API, but JavaScript developers generally expect &lt;code&gt;camelCase&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So the SDK intentionally adapts the API to JavaScript conventions.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;some_property_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you generally work with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;somePropertyName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some properties are also grouped into nested objects or simplified when that makes the API easier to understand.&lt;/p&gt;

&lt;p&gt;The goal isn't to reproduce the HTTP API exactly.&lt;/p&gt;

&lt;p&gt;The goal is to create an API that feels like a JavaScript library.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building more than &lt;code&gt;send()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The project has grown considerably since those first experiments.&lt;/p&gt;

&lt;p&gt;Sending transactional emails is still at the heart of the SDK, but it now covers much more of the MailChannels platform.&lt;/p&gt;

&lt;p&gt;Some of the things you can do include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send transactional emails&lt;/li&gt;
&lt;li&gt;Check DKIM, SPF, and Domain Lockdown&lt;/li&gt;
&lt;li&gt;Custom tracking domains&lt;/li&gt;
&lt;li&gt;Configure DKIM keys&lt;/li&gt;
&lt;li&gt;Manage webhooks&lt;/li&gt;
&lt;li&gt;Manage sub-accounts&lt;/li&gt;
&lt;li&gt;Retrieve metrics&lt;/li&gt;
&lt;li&gt;Inspect webhook delivery batches&lt;/li&gt;
&lt;li&gt;Handle suppressions&lt;/li&gt;
&lt;li&gt;Run a local simulator for development and testing&lt;/li&gt;
&lt;li&gt;Nodemailer transport&lt;/li&gt;
&lt;li&gt;CLI commands&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The SDK also includes an AI-agent skill containing focused documentation and recipes for coding agents such as &lt;a href="https://claude.com/product/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://cursor.com/get-started" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt;, &lt;a href="https://openai.com/codex" rel="noopener noreferrer"&gt;Codex&lt;/a&gt;, and similar tools.&lt;/p&gt;

&lt;p&gt;These aren't features I originally planned when I created the first Nuxt module.&lt;/p&gt;

&lt;p&gt;They came naturally as the project evolved, joining forces officially with MailChannels, and we started thinking about what would make the SDK genuinely useful to other developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  I built it because I enjoy open source
&lt;/h2&gt;

&lt;p&gt;There wasn't a business plan behind this project.&lt;/p&gt;

&lt;p&gt;I built it because I enjoy coding.&lt;/p&gt;

&lt;p&gt;I enjoy publishing things on &lt;a href="https://www.github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, &lt;a href="https://www.npmjs.com" rel="noopener noreferrer"&gt;npm&lt;/a&gt;, experimenting with ideas, learning from other open-source projects, and seeing something I built become useful outside my own projects.&lt;/p&gt;

&lt;p&gt;Even without a direct monetary return, there's a lot of personal satisfaction in that.&lt;/p&gt;

&lt;p&gt;You solve a problem for yourself, turn the solution into a reusable project, and eventually someone else can benefit from it.&lt;/p&gt;

&lt;p&gt;That's one of the things I love about open source.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the project became more than my project
&lt;/h2&gt;

&lt;p&gt;One of the most rewarding parts of this journey was seeing the project evolve from something I created independently into something connected to the company whose API it was built for.&lt;/p&gt;

&lt;p&gt;What started as my own Nuxt integration eventually became a complete Node.js SDK for MailChannels.&lt;/p&gt;

&lt;p&gt;The project is now officially maintained with MailChannels involvement, and I'm the Lead Maintainer of the Node.js SDK at MailChannels.&lt;/p&gt;

&lt;p&gt;As the project became an official MailChannels SDK, it was migrated from my personal GitHub repository to the MailChannels organization on &lt;a href="https://bitbucket.org/mailchannels/mailchannels-email-api-sdk-js" rel="noopener noreferrer"&gt;Bitbucket&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That transition is something I never really planned when I published the first version.&lt;/p&gt;

&lt;p&gt;I was simply trying to make my own projects easier to maintain.&lt;/p&gt;

&lt;p&gt;It's a good reminder of one of the things I love about open source: you don't always know where a project is going when you publish the first version.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;The project is still actively developed.&lt;/p&gt;

&lt;p&gt;As the MailChannels Email API evolves, I'll continue keeping the SDK synchronized with it, refining the developer experience, and adding support for new capabilities.&lt;/p&gt;

&lt;p&gt;The underlying goal hasn't changed since the beginning:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make working with MailChannels feel natural for JavaScript and TypeScript developers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What started as a small Nuxt module for my own projects has grown into a full Node.js SDK.&lt;/p&gt;

&lt;p&gt;And for me, that's one of the most rewarding parts of building in open source.&lt;/p&gt;

&lt;p&gt;You don't necessarily start by trying to build something important.&lt;/p&gt;

&lt;p&gt;Sometimes you just build something you need.&lt;/p&gt;

&lt;p&gt;You publish it.&lt;/p&gt;

&lt;p&gt;You keep improving it.&lt;/p&gt;

&lt;p&gt;And eventually, it can become something meaningful to people beyond yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;If you're building a Node.js or TypeScript application that uses MailChannels, you can install the SDK with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;mailchannels-sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The project is open source, actively maintained, and feedback and contributions are welcome.&lt;/p&gt;

&lt;p&gt;Official documentation: &lt;a href="https://docs.mailchannels.com" rel="noopener noreferrer"&gt;https://docs.mailchannels.com&lt;/a&gt;&lt;br&gt;
Personal documentation: &lt;a href="https://mailchannels.yizack.com" rel="noopener noreferrer"&gt;https://mailchannels.yizack.com&lt;/a&gt;&lt;br&gt;
NPM: &lt;a href="https://www.npmjs.com/package/mailchannels-sdk" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/mailchannels-sdk&lt;/a&gt;&lt;br&gt;
Source: &lt;a href="https://bitbucket.org/mailchannels/mailchannels-email-api-sdk-js" rel="noopener noreferrer"&gt;https://bitbucket.org/mailchannels/mailchannels-email-api-sdk-js&lt;/a&gt;&lt;br&gt;
MailChannels: &lt;a href="https://www.mailchannels.com/" rel="noopener noreferrer"&gt;https://www.mailchannels.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
    <item>
      <title>nuxt-twemoji</title>
      <dc:creator>Yizack Rangel</dc:creator>
      <pubDate>Thu, 22 Jun 2023 00:42:17 +0000</pubDate>
      <link>https://dev.to/yizack/nuxt-twemoji-1mhc</link>
      <guid>https://dev.to/yizack/nuxt-twemoji-1mhc</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm1rinex8l6b30rqu1gwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm1rinex8l6b30rqu1gwa.png" alt="nuxt-twemoji" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Twemoji module for Nuxt. Render emojis as SVG elements or PNG images&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Yizack/nuxt-twemoji/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;✨ Release Notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackblitz.com/github/yizack/nuxt-twemoji?file=playground%2Fapp%2Fpages%2Findex.vue" rel="noopener noreferrer"&gt;🏀 Online playground&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Features&lt;/li&gt;
&lt;li&gt;Quick Setup&lt;/li&gt;
&lt;li&gt;Module configs&lt;/li&gt;
&lt;li&gt;Components&lt;/li&gt;
&lt;li&gt;
Usage (Twemoji)

&lt;ul&gt;
&lt;li&gt;Twemoji properties&lt;/li&gt;
&lt;li&gt;Rendering&lt;/li&gt;
&lt;li&gt;Definitions&lt;/li&gt;
&lt;li&gt;More examples&lt;/li&gt;
&lt;li&gt;Twemoji Default CSS&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Usage (Twemojify)

&lt;ul&gt;
&lt;li&gt;Twemojify properties&lt;/li&gt;
&lt;li&gt;Parser&lt;/li&gt;
&lt;li&gt;Twemojify Default CSS&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Usage (TwemojiParse)

&lt;ul&gt;
&lt;li&gt;TwemojiParse properties&lt;/li&gt;
&lt;li&gt;DOM parser&lt;/li&gt;
&lt;li&gt;TwemojiParse Default CSS&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Credits&lt;/li&gt;

&lt;li&gt;Development&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Nuxt 4 ready&lt;/li&gt;
&lt;li&gt;Emoji 17.0 support&lt;/li&gt;
&lt;li&gt;Render emoji by character&lt;/li&gt;
&lt;li&gt;Render emoji by codepoint&lt;/li&gt;
&lt;li&gt;Render emoji by definition object&lt;/li&gt;
&lt;li&gt;SVG rendering by default&lt;/li&gt;
&lt;li&gt;SVG caching with localStorage&lt;/li&gt;
&lt;li&gt;PNG image render option&lt;/li&gt;
&lt;li&gt;Twitter Emoji assets from ex-Twitter author (&lt;a href="https://github.com/jdecked/twemoji" rel="noopener noreferrer"&gt;jdecked/twemoji&lt;/a&gt;) fork repository&lt;/li&gt;
&lt;li&gt;Assets from the &lt;a href="https://www.jsdelivr.com/" rel="noopener noreferrer"&gt;jsDelivr&lt;/a&gt; CDN&lt;/li&gt;
&lt;li&gt;Multiples ways of use&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Setup
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add &lt;code&gt;nuxt-twemoji&lt;/code&gt; dependency to your project
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nuxi@latest module add twemoji
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add &lt;code&gt;nuxt-twemoji&lt;/code&gt; to the &lt;code&gt;modules&lt;/code&gt; section of &lt;code&gt;nuxt.config.ts&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineNuxtConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nuxt-twemoji&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! You can now use &lt;code&gt;nuxt-twemoji&lt;/code&gt; in your Nuxt app ✨&lt;/p&gt;

&lt;h2&gt;
  
  
  Module configs
&lt;/h2&gt;

&lt;p&gt;You can configure the module by adding the &lt;code&gt;twemoji&lt;/code&gt; property to the &lt;code&gt;nuxt.config.ts&lt;/code&gt; file. The following are the default configurations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineNuxtConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;twemoji&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;maxAge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;3.154&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="c1"&gt;// SVG cache expiration time in seconds (1 year)&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;svg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// Default rendering mode. 'svg' or 'png'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Components
&lt;/h2&gt;

&lt;p&gt;You can make use of any of these available components according to your Nuxt app needs.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;SSR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Twemoji&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Renders Twemojis by emoji characters, codepoint or definition.&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Twemojify&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Parses a text and replaces all emoji characters with Twemoji svg elements or png images.&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;TwemojiParse&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wrap elements with the component and it will parse all emoji characters found with Twemoji svg or png image elements.&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Usage (&lt;code&gt;Twemoji&lt;/code&gt;)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Find emojis from &lt;a href="https://emojipedia.org/" rel="noopener noreferrer"&gt;emojipedia&lt;/a&gt;, &lt;a href="https://getemoji.com/" rel="noopener noreferrer"&gt;getemoji&lt;/a&gt; or &lt;a href="https://unicode.org/emoji/charts-17.0/full-emoji-list.html" rel="noopener noreferrer"&gt;unicode emoji list&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;In your project, use the component &lt;code&gt;&amp;lt;Twemoji emoji="" /&amp;gt;&lt;/code&gt;, where &lt;code&gt;emoji&lt;/code&gt; is the emoji character or codepoint.&lt;/li&gt;
&lt;li&gt;If you employ SSR (Server Side Rendering) in your Nuxt application, this module will inject the emoji &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; element into the output code during your project's build/generate process. Alternatively, if SSR is not used, the emojis will dynamically render during client runtime.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Twemoji&lt;/code&gt; properties
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;emoji&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;string&lt;/code&gt; or &lt;code&gt;EmojiDefinition&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1em&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;svg&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Rendering
&lt;/h3&gt;

&lt;p&gt;Use the emoji property to render an emoji by character.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Render SVG element --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"🚀"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Resize --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"🚀"&lt;/span&gt; &lt;span class="na"&gt;size=&lt;/span&gt;&lt;span class="s"&gt;"2em"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Render PNG &amp;lt;img&amp;gt; element --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"🚀"&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the emoji property to render an emoji by codepoint.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"1F60A"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;emoji=&lt;/span&gt;&lt;span class="s"&gt;"U+1F60A"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the emoji property to render an emoji by &lt;a href="https://github.com/Yizack/nuxt-twemoji/blob/main/src/runtime/assets/emojis.ts" rel="noopener noreferrer"&gt;definition&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;twSmilingFaceWithSmilingEyes&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nuxt-twemoji/emojis&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;Twemoji&lt;/span&gt; &lt;span class="na"&gt;:emoji=&lt;/span&gt;&lt;span class="s"&gt;"twSmilingFaceWithSmilingEyes"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The emojis file has been generated using the self made &lt;a href="https://github.com/Yizack/nuxt-twemoji/blob/main/scripts/generateEmojis.js" rel="noopener noreferrer"&gt;&lt;code&gt;generateEmojis.js&lt;/code&gt;&lt;/a&gt; script, which fetches emojis data from the &lt;a href="https://home.unicode.org/" rel="noopener noreferrer"&gt;Unicode&lt;/a&gt; public Emoji 17.0 file available at &lt;a href="https://unicode.org/Public/17.0.0/emoji/emoji-test.txt" rel="noopener noreferrer"&gt;https://unicode.org/Public/17.0.0/emoji/emoji-test.txt&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Definitions
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;EmojiDefinition&lt;/code&gt; type represents objects that have these specific three string properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;code&lt;/code&gt; represents the code associated with the emoji.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;emoji&lt;/code&gt; represents the actual emoji.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt; represents the name of the emoji.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;EmojiDefinition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;emoji&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  More examples
&lt;/h3&gt;

&lt;p&gt;Check out the &lt;a href="https://stackblitz.com/github/yizack/nuxt-twemoji?file=playground%2Fapp%2Fpages%2Findex.vue" rel="noopener noreferrer"&gt;🏀 Online playground&lt;/a&gt; for more examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Twemoji&lt;/code&gt; Default CSS
&lt;/h3&gt;

&lt;p&gt;Both the &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags will have the &lt;code&gt;.twemoji&lt;/code&gt; class assigned to them. These are the default styles, but you can add your own styles by using the class name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.twemoji&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;middle&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage (&lt;code&gt;Twemojify&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;This component parses a string text and replaces all emoji characters with Twemoji svg elements or png images.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the project, use the component &lt;code&gt;&amp;lt;Twemojify text="" /&amp;gt;&lt;/code&gt;, where &lt;code&gt;text&lt;/code&gt; is a string.&lt;/li&gt;
&lt;li&gt;If you employ SSR (Server Side Rendering) in your Nuxt application, this module will inject the emoji &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; element into the output code during your project's build/generate process. Alternatively, if SSR is not used, the emojis will dynamically render during client runtime.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Twemojify&lt;/code&gt; properties
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;text&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;svg&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Parser
&lt;/h3&gt;

&lt;p&gt;This component uses the &lt;code&gt;@twemoji/parser&lt;/code&gt; package by &lt;a href="https://github.com/jdecked" rel="noopener noreferrer"&gt;jdecked&lt;/a&gt; for identifying emoji entities within a string.&lt;/p&gt;

&lt;p&gt;Use the text property to parse all the emoji characters inside a string&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Replaces ❤️ and 🚀 with SVG elements --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemojify&lt;/span&gt; &lt;span class="na"&gt;text=&lt;/span&gt;&lt;span class="s"&gt;"I ❤️ Nuxt 🚀"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Replaces ❤️ and 🚀 with PNG images --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Twemojify&lt;/span&gt; &lt;span class="na"&gt;text=&lt;/span&gt;&lt;span class="s"&gt;"I ❤️ Nuxt 🚀"&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;Twemojify&lt;/code&gt; Default CSS
&lt;/h3&gt;

&lt;p&gt;Both the &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags will have the &lt;code&gt;.twemojify&lt;/code&gt; class assigned to them. These are the default styles, but you can add your own styles by using the class name.&lt;/p&gt;

&lt;p&gt;These style rules make sure that parsed emojis will have the same size as the wrapper element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.twemojify&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.05em&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-0.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage (&lt;code&gt;TwemojiParse&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;This component will parse all emoji characters found.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wrap elements inside the &lt;code&gt;&amp;lt;TwemojiParse&amp;gt; &amp;lt;/TwemojiParse&amp;gt;&lt;/code&gt; component&lt;/li&gt;
&lt;li&gt;If you want to parse emojis with png images, use the &lt;code&gt;mode&lt;/code&gt; configuration or property with the component, otherwise it will parse svg images by default.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: This component has a drawback as it does not support SSR (Server-Side Rendering) because it is executed during the mounted Vue lifecycle, functioning solely on the client-side.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;TwemojiParse&lt;/code&gt; properties
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mode&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;svg&lt;/code&gt; \&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  DOM parser
&lt;/h3&gt;

&lt;p&gt;This component uses the &lt;code&gt;@twemoji/api&lt;/code&gt; package by &lt;a href="https://github.com/jdecked" rel="noopener noreferrer"&gt;jdecked&lt;/a&gt; and its DOM parser api.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Replaces 🚀 with SVG image --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;TwemojiParse&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Nuxt Twemoji 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/TwemojiParse&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Replaces 🚀 with PNG image --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;TwemojiParse&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Nuxt Twemoji 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/TwemojiParse&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- You can wrap any amount of emojis inside the component --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;TwemojiParse&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Nuxt Twemoji 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;I ❤️ Nuxt 🚀&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/TwemojiParse&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;TwemojiParse&lt;/code&gt; Default CSS
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tags will have the &lt;code&gt;.twemojiParse&lt;/code&gt; class assigned to them. These are the default styles, but you can add your own styles by using the class name.&lt;/p&gt;

&lt;p&gt;These style rules make sure that parsed emojis will have the same size as the wrapper element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;img&lt;/span&gt;&lt;span class="nc"&gt;.twemojiParse&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.05em&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-0.1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Twitter Emoji assets from &lt;a href="https://github.com/jdecked/twemoji" rel="noopener noreferrer"&gt;jdecked/twemoji&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Default CDN &lt;a href="https://www.jsdelivr.com/" rel="noopener noreferrer"&gt;jsDelivr&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://home.unicode.org/" rel="noopener noreferrer"&gt;Unicode&lt;/a&gt; public &lt;a href="https://unicode.org/Public/17.0.0/emoji" rel="noopener noreferrer"&gt;Emoji 17.0&lt;/a&gt; files&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/nuxt/nuxt" rel="noopener noreferrer"&gt;Nuxt&lt;/a&gt;, the JavaScript framework for creating SSR Vue applications and its &lt;a href="https://nuxt.com/docs/guide/going-further/modules" rel="noopener noreferrer"&gt;Module Author Guide&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Development
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
pnpm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Generate type stubs&lt;/span&gt;
pnpm dev:prepare

&lt;span class="c"&gt;# Develop with the playground&lt;/span&gt;
pnpm dev

&lt;span class="c"&gt;# Build the playground&lt;/span&gt;
pnpm dev:build

&lt;span class="c"&gt;# Run ESLint&lt;/span&gt;
pnpm lint

&lt;span class="c"&gt;# Run Vitest&lt;/span&gt;
pnpm &lt;span class="nb"&gt;test
&lt;/span&gt;pnpm &lt;span class="nb"&gt;test&lt;/span&gt;:watch

&lt;span class="c"&gt;# Run typecheck&lt;/span&gt;
pnpm &lt;span class="nb"&gt;test&lt;/span&gt;:types

&lt;span class="c"&gt;# Release new version&lt;/span&gt;
pnpm release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nuxt</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Display a card with your Gists on your GitHub README.md</title>
      <dc:creator>Yizack Rangel</dc:creator>
      <pubDate>Fri, 07 Oct 2022 23:56:00 +0000</pubDate>
      <link>https://dev.to/yizack/display-a-card-with-your-gists-on-your-github-readmemd-1kgn</link>
      <guid>https://dev.to/yizack/display-a-card-with-your-gists-on-your-github-readmemd-1kgn</guid>
      <description>&lt;h1&gt;
  
  
  GitHub Gists Readme (gists-readme)
&lt;/h1&gt;

&lt;p&gt;Display a card with your Gists on your GitHub README.md&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Gists List Card

&lt;ul&gt;
&lt;li&gt;Example 1&lt;/li&gt;
&lt;li&gt;Example 2&lt;/li&gt;
&lt;li&gt;Example 3&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Gist Pin

&lt;ul&gt;
&lt;li&gt;Example 1&lt;/li&gt;
&lt;li&gt;Example 2&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Generate your card here: &lt;a href="https://gists-readme.yizack.com" rel="noopener noreferrer"&gt;https://gists-readme.yizack.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gists List Card
&lt;/h2&gt;

&lt;p&gt;Display a list of your gists&lt;/p&gt;

&lt;h3&gt;
  
  
  Parameters
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Optional&lt;/th&gt;
&lt;th&gt;Default value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your GitHub profile username.&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;theme&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set the theme of the card.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;default&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;n&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Number of Gists to display.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set the title of the card.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;My Gists&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Card Example 1
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;theme&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dark&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%3Fuser%3Dyizack%26theme%3Ddark" alt="gists-readme" width="445" height="150"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api?user=yizack&amp;amp;theme=dark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Card Example 2
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%3Fuser%3Dyizack%26n%3D2" alt="gists-readme" width="445" height="100"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api?user=yizack&amp;amp;n=2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Card Example 3
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Cy4Bot&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n&lt;/td&gt;
&lt;td&gt;&lt;code&gt;20&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;title&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Cy4Bot Gists&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Cy4Bot" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%3Fuser%3DCy4Bot%26n%3D20%26title%3DCy4Bot%2BGists" alt="gists-readme" width="445" height="325"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api?user=Cy4Bot&amp;amp;n=20&amp;amp;title=Cy4Bot+Gists&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Cy4Bot)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Gists Pin
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Parameters
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Optional&lt;/th&gt;
&lt;th&gt;Default value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your GitHub profile username.&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;id&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your Gist ID&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;owner&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows the owner of the gist,&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;theme&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sets the theme of the pin.&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;default&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Pin Example 1
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bbfce31e0217a3689c8d961a356cb10d&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack/bbfce31e0217a3689c8d961a356cb10d" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%2Fpin%3Fuser%3Dyizack%26id%3Dbbfce31e0217a3689c8d961a356cb10d" alt="gists-readme" width="400" height="195"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api/pin?user=yizack&amp;amp;id=bbfce31e0217a3689c8d961a356cb10d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack/bbfce31e0217a3689c8d961a356cb10d)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pin Example 2
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yizack&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td&gt;&lt;code&gt;8a84dabef525fed523573b47258880e0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;owner&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;theme&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dark&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Result
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/Yizack/8a84dabef525fed523573b47258880e0" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgists-readme.yizack.com%2Fapi%2Fpin%3Fuser%3Dyizack%26id%3D8a84dabef525fed523573b47258880e0%26owner%3Dtrue%26theme%3Ddark" alt="gists-readme" width="400" height="120"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![gists-readme&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gists-readme.yizack.com/api/pin?user=yizack&amp;amp;id=8a84dabef525fed523573b47258880e0&amp;amp;owner=true&amp;amp;theme=dark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://gist.github.com/Yizack/8a84dabef525fed523573b47258880e0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspired by &lt;a href="https://github.com/anuraghazra/github-readme-stats" rel="noopener noreferrer"&gt;anuraghazra/github-readme-stats&lt;/a&gt;.&lt;br&gt;
Hosted on &lt;a href="https://vercel.com/" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt; with Node.js.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>github</category>
      <category>tutorial</category>
      <category>node</category>
    </item>
    <item>
      <title>Embeddable Music Player</title>
      <dc:creator>Yizack Rangel</dc:creator>
      <pubDate>Wed, 15 Jun 2022 05:49:11 +0000</pubDate>
      <link>https://dev.to/yizack/embeddable-music-player-1p53</link>
      <guid>https://dev.to/yizack/embeddable-music-player-1p53</guid>
      <description>&lt;p&gt;Embed a simple HTML music player from local audio on your website using &lt;a href="https://www.mediaelementjs.com/" rel="noopener noreferrer"&gt;MediaElement.js&lt;/a&gt; and &lt;a href="https://lokeshdhakar.com/projects/color-thief/" rel="noopener noreferrer"&gt;Color Thief&lt;/a&gt;. Inspired by Spotify's embed player.&lt;/p&gt;

&lt;p&gt;(Fullscreen Live &lt;a href="https://embeddable-music-player.yizack.com/player/just-stay.html" rel="noopener noreferrer"&gt;Demo&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/yizack/embed/KKQJQej?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommended requeriments
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Mp3 audio source.&lt;/li&gt;
&lt;li&gt;Square image.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Clone or download my repository (&lt;a href="https://github.com/Yizack/embeddable-music-player" rel="noopener noreferrer"&gt;Yizack/embeddable-music-player&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the file &lt;a href="https://github.com/Yizack/embeddable-music-player/blob/master/player/song.html" rel="noopener noreferrer"&gt;&lt;code&gt;/player/song.html&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste your song name in &lt;code&gt;{SONG-NAME}&lt;/code&gt; for the title of your page.&lt;/li&gt;
&lt;li&gt;Paste your audio file URL in &lt;code&gt;{MP3-SOURCE}&lt;/code&gt; for the audio that will be played when you press the play button.&lt;/li&gt;
&lt;li&gt;Paste your image URL in &lt;code&gt;{ARTWORK}&lt;/code&gt; for the image that will be displayed.&lt;/li&gt;
&lt;li&gt;You can also rename or create a new html file to have different players, for example for the live demo I have &lt;a href="https://embeddable-music-player.yizack.com/player/just-stay.html" rel="noopener noreferrer"&gt;&lt;code&gt;/player/just-stay.html&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Color Thief will detect automatically the dominant color of your song image for your player.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Use the code below, replace &lt;code&gt;{YOUR-HTML-PLAYER}&lt;/code&gt; with your HTML filename inside the folder &lt;a href="https://github.com/Yizack/embeddable-music-player/blob/master/player" rel="noopener noreferrer"&gt;&lt;code&gt;/player&lt;/code&gt;&lt;/a&gt; and paste it on your site where you want your audio player to appear.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/player/{YOUR-HTML-PLAYER}.html"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"300"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"385"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Example of use on a website using iframes: &lt;a href="https://dimatis.yizack.com" rel="noopener noreferrer"&gt;Dimatis Website&lt;/a&gt;)&lt;br&gt;
  &lt;a href="https://dimatis.yizack.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgxswuigwwo0w09hozvq0.jpg" alt="Live Demo" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thanks to the responsiveness you can play with the width and height as you want.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/player/{YOUR-HTML-PLAYER}.html"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"450"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Another example of use on a website using iframes: &lt;a href="https://dimatis.yizack.com/music/fly-again" rel="noopener noreferrer"&gt;Dimatis - Fly Again&lt;/a&gt;)&lt;br&gt;
  &lt;a href="https://dimatis.yizack.com/music/fly-again" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9vxng4r6m71p8m8dcdry.jpg" alt="Live Demo" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>javascript</category>
      <category>css</category>
      <category>music</category>
    </item>
  </channel>
</rss>
