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";}}
Demonstrated In
Content Explorer — A full content-browsing screen that composes scroll-snap, collapsible sections, inputs, a loading state and toasts into one layout.
Dropdown Phone Entry — A phone-number entry form that pairs a country-code dropdown picker with pill input fields.
Image Crop Overlay — Pick an avatar image, then pan, pinch-zoom and crop it inside a full-screen modal overlay.
Notification List — A scrollable notification feed with unread-count badges and an elastic, swipe-to-load-more list.
Registration Form — A complete mobile-style registration flow with input validation and shake feedback on errors.
Scroll Snap & Dots — A paged onboarding carousel — a swipeable scroll-snap container kept in sync with page-dot indicators.
Social Links — An editable social-links section with add/remove rows and a platform picker that hides already-used platforms.
Step Wizard — A multi-step wizard flow with a step progress bar and per-step inputs.
Toast Notifications — Queued toast messages with swipe-to-dismiss gesture handling.