Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)75k · #2894

input-types

Skill này làm gì

Skill này rà soát các trường biểu mẫu để kiểm tra chúng có dùng loại input phù hợp nhất và thiết lập autocomplete hay không. Skill dành cho lập trình viên xây biểu mẫu đăng ký, thanh toán và liên hệ.

Khi nào nên dùng

  • ✓Khi trường email hoặc số điện thoại chỉ hiện bàn phím thường trên di động.
  • ✓Khi trình duyệt không tự điền được tên, địa chỉ hoặc thông tin thanh toán.
  • ✓Khi bạn làm biểu mẫu mới và muốn người dùng dễ điền trên điện thoại.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/input-types/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/input-types/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể kiểm tra các trường biểu mẫu của tôi và đặt đúng loại input cho di động không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra từng phần tử input và gợi ý các loại ngữ nghĩa như email, tel và number. Agent cũng thêm giá trị autocomplete để trình duyệt có thể điền các thông tin đã lưu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Use semantic input type attributes

Using type=text for every input forces mobile users to switch keyboards manually for email, phone, and number entry. The correct type also enables browser autofill to correctly identify fields for name, address, and payment data. Combined with autocomplete attributes, semantic types can make form completion 40% faster for returning users.

Quick Reference

  • type=email shows the @ keyboard on mobile and enables email format validation
  • type=tel shows the numeric phone keypad on mobile
  • type=number shows a numeric keypad; use inputmode=numeric for fields that look like numbers but aren't
  • type=date/time renders native pickers and returns standardized values

Check

Audit all input elements in this HTML file. Check whether each uses the most appropriate type attribute and autocomplete value.

Fix

Update input type attributes to semantic values and add appropriate autocomplete attributes for autofill support.

Explain

Explain the different HTML input types, what each one does on mobile keyboards, and how to combine them with autocomplete attributes.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Use semantic input type attributes. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/input-types

Câu hỏi thường gặp

type email thay đổi gì trên điện thoại?

Skill nói nó hiện bàn phím có ký tự @, và bật kiểm tra định dạng email.

Khi nào nên dùng inputmode numeric?

Skill gợi ý dùng cho các trường trông như số nhưng không phải số, chẳng hạn mã xác nhận.

Điều này có giúp điền biểu mẫu nhanh hơn không?

Skill nói các loại ngữ nghĩa kết hợp với autocomplete có thể giúp người dùng quay lại điền biểu mẫu nhanh hơn.

Chi tiết

Mô tả gốc của tác giả

Use when reviewing templates, rendered HTML, or shared components related to Use semantic input type attributes. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2894
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự