ValyroUI English version

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';

Пропсы

PropTypeDefault
size'sm' | 'md' | 'lg''md'Field height and text size.
leftIconReactNodeIcon inside the field, before the text.
rightIconReactNodeIcon inside the field, after the text and the clear/password buttons.
prefixReactNodeAttached text before the input, e.g. "https://".
suffixReactNodeAttached text after the input, e.g. ".vercel.app".
invalidbooleanfalseError border and aria-invalid on the input (an explicit aria-invalid wins).
clearablebooleanfalseShows a clear button while the input has a value.
labelsPartial<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 · Весь раздел «Формы и ввод»