Casso Brand Kit
Tải trọn bộ logo
Mục lục

Components

Input

Dựng từ contract Input/Text-Field, gồm 36 variant, properties Size × State.

Không phải State nào trong 9 State của Figma cũng là pseudo-class CSS. Có State thuộc tương tác (Hover, Focused), nội dung (Typing, Inputted), thuộc tính (Read-Only, Disabled) hoặc lỗi (Inputted-Error, Blank-Error). Vì thế, trạng thái ghi bằng data-state.

Color scheme
Brand
Density
Radius
Emphasis
Type scale

API

Props

PropertyValuesDefaultDescription
sizemedium · large · xlarge · smallmedium
labeltextSố tài khoản
optionalbooleanfalseThêm chữ "(không bắt buộc)" cạnh nhãn
placeholdertextNhập số tài khoản
valuetext
helpTexttextTối đa 20 ký tự
errorbooleanfalse
readOnlybooleanfalse
disabledbooleanfalse
clearablebooleantrueNút Clear chỉ hiện ở State Typing / Inputted / Inputted-Error, theo contract
leadingIcon26 icon names, see Iconography
trailingIcon26 icon names, see Iconography
state9 icon names, see IconographydefaultÉp trạng thái, chỉ dùng khi chụp tài liệu

Section 01

Default

Tối đa 20 ký tự

Section 02

Inputted

Tối đa 20 ký tự

Section 03

Inputted-Error

Số tài khoản phải có 10 chữ số

Section 04

Blank-Error

Trường bắt buộc

Section 05

Read-Only

Mã hệ thống cấp

Section 06

Disabled

Tối đa 20 ký tự

Section 07

With Icons

Tối đa 20 ký tự

Section 08

Sizes

Size

size = medium
size = large
size = xlarge
size = small

Section 09

All States (9)

Tối đa 20 ký tự
Tối đa 20 ký tự
Tối đa 20 ký tự
Tối đa 20 ký tự
Tối đa 20 ký tự
Tối đa 20 ký tự
Tối đa 20 ký tự
Số tài khoản phải có 10 chữ số
Số tài khoản phải có 10 chữ số

Nút Clear chỉ hiện ở Typing / Inputted / Inputted-Error. Ở hai state lỗi, icon đổi từ info sang cảnh báo. Code trong input.js đọc hai điều kiện này từ contract bằng partExists(), không gõ tay.