Input

Form

Trường nhập liệu hỗ trợ label, icon, validation và auto-toggle password. Xây dựng trên Base UI Field.

Cài đặt

Import

Mặc định

Biến thể

3 kiểu hiển thị khác nhau.

Với Icon

Icon ở đầu hoặc cuối input.

Password

Tự động hiện toggle hiển thị mật khẩu.

Validation

Hiển thị lỗi và mô tả bổ sung.

Email không hợp lệ

Tên hiển thị công khai

API Reference

PropTypeDefaultMô tả
variant"default" | "filled" | "flushed""default"Kiểu hiển thị input
labelstringLabel hiển thị phía trên input
placeholderstringPlaceholder text
typestring"text"Loại input HTML. Khi type="password" tự động hiện toggle ẩn/hiện mật khẩu
iconReactNodeIcon hiển thị bên trái input
endIconReactNodeIcon hiển thị bên phải (bị bỏ qua khi type="password")
requiredbooleanĐánh dấu trường bắt buộc, hiển thị dấu * đỏ sau label
disabledbooleanVô hiệu hóa input
errorstringThông báo lỗi, áp dụng màu danger cho border và text
descriptionstringMô tả bổ sung bên dưới input (ẩn khi có error)
classNamestringClass CSS tuỳ chỉnh cho thẻ input