Input
오류와 성공 상태가 있는 한 줄 입력입니다.
가져오기
섹션 제목: “가져오기”import { Input } from "@pelagornis/page/components";위 미리보기는 이 파일을 렌더링한 것입니다. src/components/에 복사해서 시작하세요.
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> );}MDX에서 사용
섹션 제목: “MDX에서 사용”Input 컴포넌트는 .mdx 페이지에 바로 쓸 수 있습니다. frontmatter 아래에서 가져오세요. 서버에서 렌더링되므로 client 지시어가 필요 없습니다.
---title: Example---
import { Input } from "@pelagornis/page/components";
<Input placeholder="you@example.com" aria-label="Email" />Markdoc에서 사용
섹션 제목: “Markdoc에서 사용”pageMarkdoc()가 이 컴포넌트의 input 태그를 등록합니다. markdoc.config.mjs에 프리셋을 한 번 추가한 뒤(Markdoc에서 사용 참고), 어느 .mdoc 페이지에서나 태그를 쓰세요.
{% input placeholder="you@example.com" ariaLabel="Email" /%}속성 이름과 값은 React props와 같습니다.
각 variant prop에 넣을 수 있는 값입니다.
| Prop | 값 |
|---|---|
size | sm md lg |
컴포넌트를 이루는 부분과 각 부분이 렌더링하는 data-refineui 역할입니다.
| 부분 | 역할 |
|---|---|
root | input |
- 디자인 가이드와 토큰 상세는 RefineUI · Input를 참고하세요.
- 공통 규칙은 MDX에서 사용과 Markdoc에서 사용을 참고하세요.