--- title: "Prompt Input" slug: prompt-input category: component type: examples version: 20.0.0 tokens: 1142 source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-prompt-input--examples.txt --- # Prompt Input ## Default ```tsx ``` ## Disabled ```tsx ``` ## Read Only ```tsx ``` ## Loading ```tsx ``` ## With Files ```tsx { const fakePdfFile = new File(["foo"], "loading-pdf-file.pdf", { type: "application/pdf" }); const fakeTextFile = new File(["bar"], "text-file.txt", { type: "text/plain" }); return ( ); } ``` ## In Form Field ```tsx { const maxLength = 60; const [inputValue, setInputValue] = useState("Some text that is almost hitting the length limit..."); return ( maxLength}> Here is a prompt input inside a form field: setInputValue(inputValue)} >
{inputValue?.length} / {maxLength}
Character limit exceeded
); } ``` ## Accessibility Aria Label ```tsx ``` ## Accessibility Buttons Labels ```tsx ``` ## Accessibility I18n ```tsx ``` ## Accessibility Loading State ```tsx ```