Textarea
Multi-line text entry.
Import
Section titled “Import”import { Textarea } from "@pelagornis/page/components";Example
Section titled “Example”The preview above renders this file. Copy it into src/components/ to start from it.
import { Stack, Textarea } from "@pelagornis/page/components";
export default function TextareaDemo() { return ( <Stack gap="sizeSmall" className="w-full max-w-sm"> <Textarea placeholder="Write a comment…" rows={4} aria-label="Comment" fullWidth /> <Textarea error defaultValue="Too short" rows={2} aria-label="Error" fullWidth /> </Stack> );}Use in MDX
Section titled “Use in MDX”Textarea can be written straight in an .mdx page. Import it below the frontmatter. It renders on the server, so no client directive is needed.
---title: Example---
import { Textarea } from "@pelagornis/page/components";
<Textarea placeholder="Write a comment…" rows={4} aria-label="Comment" />Use in Markdoc
Section titled “Use in Markdoc”pageMarkdoc() registers a textarea tag for this component. Add the preset once in markdoc.config.mjs (see Use in Markdoc), then write the tag in any .mdoc page.
{% textarea placeholder="Write a comment…" rows=4 ariaLabel="Comment" /%}Attributes use the same names and values as the React props.
Anatomy
Section titled “Anatomy”Parts of the component and the data-refineui role each one renders.
| Part | Role |
|---|---|
root | textarea |
Reference
Section titled “Reference”- RefineUI · Textarea for design guidance and token detail.
- Use in MDX and Use in Markdoc for the general rules.