Primary CTA button in a rounded pill shape with press flash animation.
Primitivesprimitivesbuttonpillctaanimation
Summary
PillButton is a rounded, gradient-filled call-to-action button with a flash feedback animation on press. The gradient is generated from two colors (inner and outer) into a 256 × 1 Texture2D that is set as the background image. A white overlay fades in briefly on tap to provide tactile feedback. The gradient texture is destroyed when the element detaches from the panel.
Typical use cases:
Primary call-to-action buttons (Continue, Submit, Get Started)
// Reflect form validity through button colorprivatevoidUpdateButtonState(boolisValid){if(isValid){_continueButton.SetInnerColor("#18cc6e");_continueButton.SetOuterColor("#0d7a42");_continueButton.Text="Submit";}else{_continueButton.SetInnerColor("#555555");_continueButton.SetOuterColor("#333333");_continueButton.Text="Fill all fields";}}