Text Input
Текстовые поля. Бесплатно, MIT · Формы и ввод › Текст
Установка
npx valyro-cli@latest add text-input
npx shadcn@latest add https://valyro.xyz/r/text-input.json
npm install valyro-ui
import 'valyro-ui/styles.css';
import { TextInput } from 'valyro-ui';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'md' | Field height and text size. |
leftIcon | ReactNode | Icon inside the field, before the text. | |
rightIcon | ReactNode | Icon inside the field, after the text and the clear/password buttons. | |
prefix | ReactNode | Attached text before the input, e.g. "https://". | |
suffix | ReactNode | Attached text after the input, e.g. ".vercel.app". | |
invalid | boolean | false | Error border and aria-invalid on the input (an explicit aria-invalid wins). |
clearable | boolean | false | Shows a clear button while the input has a value. |
labels | Partial<TextInputLabels> | Accessible names of the clear and show/hide password buttons. |
Похожие компоненты
- Textarea — Многострочный ввод
- Search Input — Поисковая строка
- Mentions Input — Текст с @упоминаниями и #тегами, асинхронные подсказки
- Tags Input — Ввод тегов
- Select — Выбор из списка
- Multi Select — Множественный выбор
- Combobox — Поиск и выбор
- Listbox — Список вариантов на странице: один или несколько, диапазоны с Shift
- Chip Group — Группа чипов с иконками: один или несколько вариантов
- Checkbox Tree — Дерево с чекбоксами: каскад, частичная отметка, клавиатура
- Checkbox — Флажки
- Checkbox Group — Флажки с общей подписью, подсказкой, ошибкой и обязательностью
Назад: Tour · Далее: Textarea · Весь раздел «Формы и ввод»