ev

embed-visualizer

A React Component to render Discord-like embeds.

Showing:

Popularity

Downloads/wk

2

GitHub Stars

3

Maintenance

Last Commit

9mos ago

Contributors

4

Package

Dependencies

6

Size (min+gzip)

338.0KB

License

MIT

Type Definitions

Tree-Shakeable

Yes?

Readme

embed-visualizer

A React Component to render Discord-like embeds.

NPM JavaScript Style Guide

Install

npm install --save embed-visualizer

Usage

import React, { Component } from 'react'

import EmbedVisualizer, { parseContent, parseTitle } from 'embed-visualizer'
import 'embed-visualizer/dist/index.css'

const embed = {
  embed: {
    title: "Embed title",
    description: "👌 this supports [named links](https://discordapp.com) and __**markdown**__. ```\nyes, even code blocks```||you can also use spoilers||"
  }
}

export default class Example extends Component {
  render() {
    return <div className='content'>
      <div className='item'>
        <h1>Classic embed:</h1>
        <EmbedVisualizer embed={embed} />
      </div>
      <div className='item custom'>
        <h1>Custom content parsing:</h1>
        <div>
          <h3>{parseTitle(embed.embed.title)}</h3>
          <div>{parseContent(embed.embed.description)}</div>
        </div>
      </div>
    </div>
  }
}

Preview

Embed preview

License

MIT © gauthier-th

Created from embed-visualizer

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100