Astryx

Astryx Text Input

Forms

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>
  );
}

Dependencies

More by Astryx

View all
  • Astryx Banner

    Astryx Banner

    61
  • Astryx Avatar

    Astryx Avatar

    34
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    32
  • Astryx Badge

    Astryx Badge

    30
  • Astryx Button Group

    Astryx Button Group

    29
  • Astryx Chat Composer Drawer

    Astryx Chat Composer Drawer

    27
  • Astryx Toggle Button

    Astryx Toggle Button

    17
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    10

More in Forms

View all
  • Contact Form

    Contact Form

    30
  • Form

    Form

    7
  • Premium Auth

    Premium Auth

    607
  • Book A Demo 1

    Book A Demo 1

    94
  • Card Studio

    Card Studio

    48
  • Contact Card

    Contact Card

    1.1K
  • Login 2

    Login 2

    16
  • Paper Plane

    Paper Plane

    30