<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.
Note
At time of writing, only vanilla english translations are supported, non-vanilla or non-english messages may be rendered incorrectly with incorrect sizes.Attributes
Attribute | Value | Description | Example |
---|---|---|---|
src | path | Path to a text or JSON file that contains the component’s contents. | src="./text.json" |
type | string | Format 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>