Forms Inputs

dylantarre/animation-principles/skills/07-by-ui-element/forms-inputs

作者 dylantarre83597134ba8f無授權條款99 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫9 個月前更新

Use when animating form fields, inputs, textareas, selects, or interactive form elements to improve usability and feedback

僅含說明Design & Creative
AI 產生的概覽

運用迪士尼十二項動畫原則,為表單欄位與輸入元件提供動畫指引。

功能
這項技能為輸入框、文字區域、下拉選單、核取方塊與送出按鈕等表單元素的動畫提供設計指引。它把迪士尼十二項動畫原則對應到表單互動上,給出聚焦、驗證與標籤浮動等效果的時長、緩動曲線與 CSS 範例。產出是動畫規格與範例 CSS,而不是可直接使用的元件。
適用情境
在為表單控制項加入動態效果或微互動,以提升可用性與回饋時使用。適合設計師或開發者定義網頁表單的聚焦、驗證、錯誤與成功動畫。
執行需求
不需要指令碼或工具,內容僅為說明。套用其中的 CSS 範例需要支援 CSS 的網頁前端環境。

Form & Input Animation Principles

Apply Disney's 12 principles to forms for clear feedback and delightful interactions.

Principles Applied to Form Elements

1. Squash & Stretch

Input fields can subtly expand on focus (1-2px height). Submit button compresses on click. Checkboxes bounce on toggle.

2. Anticipation

Label floats up before user types. Focus ring appears before content entry. Prepares user for input action.

3. Staging

Focused input should be visually prominent: border color, shadow, label position. Other fields can slightly dim. Guide attention.

4. Straight Ahead & Pose to Pose

Define input states: default, focus, filled, valid, invalid, disabled. Clear poses for each state with smooth transitions.

5. Follow Through & Overlapping Action

Floating label settles after reaching final position. Validation icon can bounce slightly. Character counter updates with subtle motion.

6. Ease In & Ease Out

Focus transitions: ease-out. Validation feedback: ease-in-out. Label float: cubic-bezier(0.4, 0, 0.2, 1).

7. Arcs

Floating labels should arc slightly during upward movement, not straight line. Adds organic feel to mechanical action.

8. Secondary Action

While border highlights (primary), label floats (secondary), helper text appears (tertiary). Coordinate without overwhelming.

9. Timing

  • Focus border: 100-150ms
  • Label float: 150-200ms
  • Validation feedback: 200ms
  • Error shake: 300ms (3-4 cycles)
  • Success check: 250ms
  • Checkbox toggle: 150ms

10. Exaggeration

Error states can shake (4-6px, 2-3 times). Success states can pulse green briefly. Invalid inputs deserve clear, noticeable feedback.

11. Solid Drawing

Maintain border-radius consistency. Label typography should stay crisp during transform. Icons should scale proportionally.

12. Appeal

Responsive forms feel modern. Micro-animations guide users. Satisfying feedback reduces form abandonment. Worth the investment.

CSS Implementation

css
.input-field {  transition: border-color 150ms ease-out,              box-shadow 150ms ease-out;}
.floating-label {  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),              font-size 200ms ease-out,              color 150ms ease-out;}
.input-field:focus + .floating-label {  transform: translateY(-24px) scale(0.85);}
@keyframes shake {  0%, 100% { transform: translateX(0); }  25% { transform: translateX(-5px); }  75% { transform: translateX(5px); }}

Key Properties

  • transform: translateY (label), translateX (shake)
  • border-color: state indication
  • box-shadow: focus rings
  • color: label/text states
  • opacity: helper text, icons

來源與署名

來源:dylantarre/animation-principles位於skills/07-by-ui-element/forms-inputs提交8359713

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架