iwillreku3206 / minecraft-formatted-text-react

A React component that renders Minecraft-formatted text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minecraft Formatted Text

This component allows you to display Minecraft-style text (that follow Minecraft's section sign formatted text) within React

Features

  • TypeScript Support
  • Customize Prefix
  • Custom Colors
  • Supports ESM and CJS
  • Supports Obfuscated Text

Installation

With NPM: npm install minecraft-formatted-text-react

With Yarn: yarn add minecraft-formatted-text-react

Example

import MinecraftText from 'minecraft-formatted-text-react'
...
<MinecraftText>§lHello §cworld!</MinecraftText>

Options (Props)

Name Type Description
colors ColorMap? An object containing the hexcodes of the Minecraft colors.
prefix string? The prefix of the Minecraft formatting codes (default: §)

About

A React component that renders Minecraft-formatted text

License:MIT License


Languages

Language:TypeScript 89.2%Language:JavaScript 10.8%