Input
Single-line text entry with error and success states.
Import
Section titled “Import”import { Input } from "@pelagornis/page/components";Example
Section titled “Example”The preview above renders this file. Copy it into src/components/ to start from it.
import { Input, Stack } from "@pelagornis/page/components";
export default function InputDemo() { return ( <Stack gap="sizeSmall" className="w-full max-w-sm"> <Input placeholder="Default" aria-label="Default" fullWidth /> <Input size="lg" placeholder="Large" aria-label="Large" fullWidth /> <Input error defaultValue="Invalid value" aria-label="Error" fullWidth /> <Input success defaultValue="Looks good" aria-label="Success" fullWidth /> <Input disabled placeholder="Disabled" aria-label="Disabled" fullWidth /> </Stack> );}Use in MDX
Section titled “Use in MDX”Input 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 { Input } from "@pelagornis/page/components";
<Input placeholder="you@example.com" aria-label="Email" />Use in Markdoc
Section titled “Use in Markdoc”pageMarkdoc() registers a input tag for this component. Add the preset once in markdoc.config.mjs (see Use in Markdoc), then write the tag in any .mdoc page.
{% input placeholder="you@example.com" ariaLabel="Email" /%}Attributes use the same names and values as the React props.
Variants
Section titled “Variants”Values the component accepts for each variant prop.
| Prop | Values |
|---|---|
size | sm md lg |
Anatomy
Section titled “Anatomy”Parts of the component and the data-refineui role each one renders.
| Part | Role |
|---|---|
root | input |
Reference
Section titled “Reference”- RefineUI · Input for design guidance and token detail.
- Use in MDX and Use in Markdoc for the general rules.