This component allows you to display Minecraft-style text (that follow Minecraft's section sign formatted text) within React
- TypeScript Support
- Customize Prefix
- Custom Colors
- Supports ESM and CJS
- Supports Obfuscated Text
With NPM: npm install minecraft-formatted-text-react
With Yarn: yarn add minecraft-formatted-text-react
import MinecraftText from 'minecraft-formatted-text-react'
...
<MinecraftText>§lHello §cworld!</MinecraftText>
Name | Type | Description |
---|---|---|
colors |
ColorMap? |
An object containing the hexcodes of the Minecraft colors. |
prefix |
string? |
The prefix of the Minecraft formatting codes (default: § ) |