About
TextInput collects short-form text like names, emails, or search queries. Use it for single-line values where the expected input is brief. Pair it with validation status to guide users through required or formatted fields. Astryx by Meta. Source: https://astryx.atmeta.com/components/TextInput
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Text Input to your project and fits it to your theme.
Code
How Astryx Text Input is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-text-input.tsx. */
import '@/components/ui/astryx-text-input-utils/astryx-preview.css';
import {useState} from 'react';
import {TextInput} from '@/components/ui/astryx-text-input';
function OfficialSample() {
const [value, setValue] = useState('');
return (
<div style={{width: '100%'}}>
<TextInput
label="Name"
value={value}
onChange={setValue}
placeholder="Enter your name"
/>
</div>
);
}
export default function Demo() {
return (
<div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
<div className="astryx-demo-content" data-centered style={{maxWidth: 390}}>
<OfficialSample />
</div>
</div>
);
}















