<chat-component> element

Element with content loaded from a JSON chat component.

This element lets you use a JSON text component for text content on a page.

Attributes

AttributeValueDescriptionExample
srcpathPath to a text or JSON file that contains the component’s contents.src="./text.json"
typestringFormat the text is stored in. Supported values: json, minimessage.type="json"

Default Styling

// None

Examples

<chat-component>
  {"text": "Hello, world!"}
</chat-component>
<chat-component>
  {"translate": "blocks.minecraft.stone", "bold": "true"}
</chat-component>
<chat-component>
  {"keybind": "key.right"}
</chat-component>