Multiline Minecraft text entry with native textarea semantics.
Preview
Example source could not be loaded: textarea-example. Reload this page to retry.Usage
Import Textarea from @/components/ui/textarea. Use a JavaScript string containing newlines for initial multiline content. The primary example controls value through onChange(event); defaultValue also works.
Composition
Pair the real textarea with Label and connect hints/errors using aria-describedby. readOnly permits selection without editing; disabled prevents interaction. For a send action alongside a multiline field, use InputGroupTextarea with a block-end addon in Input Group.
API and accessibility
The default size is 200 by 80 logical pixels with vertical resizing and the original six-pixel scrollbar appearance. spellCheck defaults false and autoCorrect off. Fixed ASCII/CJK coverage does not promise arbitrary glyph or RTL fidelity; retain the complete painter/font installation.
See the underlying API for shared semantics.
Read only
Example source could not be loaded: textarea-readonly-example. Reload this page to retry.Installation
Component source
This is the component implementation. Its supporting styles, helpers and resources are also required. See complete manual installation.
"use client";
import * as React from "react";
import { minecraftClasses as cn, minecraftStyle } from "./minecraft-render";
import { attachMinecraftTextarea } from "./minecraft-textarea-paint";
import "./minecraft-unifont-metrics.css";
import "./minecraft-textarea.css";
interface TextareaStyle extends React.CSSProperties {
"--mc-scale": number;