28 CSS Input Fields
28 hand-coded CSS input fields for sign-up, checkout, SaaS onboarding, and HIPAA portals — floating label, notched outline, :has()-driven password strength, 6-digit OTP, tag chip, inline edit, voice search, credit card formatter, and field-sizing: content autogrow textarea. 18 pure CSS + 10 vanilla JS with native form semantics (correct autocomplete tokens) so password managers and iOS SMS autofill just work. Scoped under .if-NN for no-collision pasting, prefers-reduced-motion guarded, framework-agnostic.
Related20 CSS Form Validation16 CSS Floating Label Inputs30 CSS Login Forms20 CSS Custom Select Dropdowns28 Tailwind CSS Input Fields
Course pickPartner: Zero to Mastery
Affiliate linkWant to build production-ready CSS layouts, animations and UI from scratch?
You just browsed 28 inputs. Learn the Flexbox, Grid and animation thinking behind them, so the next component starts in your head, not in a copy-paste.
Every ZTM course in one membership: $25/month, paid yearly at $299 · 30‑day money-back guarantee
The CSS Bootcamp. We may earn a commission, at no extra cost to you.
02. Underline Sweep (opens in a new tab)
:focus-within.03. Neon Glow (opens in a new tab)
04. Glass Frosted (opens in a new tab)
backdrop-filter blur and an inner highlight — an elegant fit for hero sections.05. Notched Outline (opens in a new tab)
06. Liquid Border (opens in a new tab)
07. Inline Validation (opens in a new tab)
:valid / :invalid feedback. Green tick when correct, red cross when not — driven by :has() and pseudo-elements, no JavaScript required.08. Search with Clear (opens in a new tab)
:placeholder-shown.09. Password Strength (opens in a new tab)
:has(input:valid/:invalid) — zero scoring JavaScript.10. OTP Code (opens in a new tab)
<fieldset>. Auto-advance, backspace step-back, and full paste-to-fill — autocomplete="one-time-code" drives SMS auto-suggest.11. Rotating Placeholder (opens in a new tab)
12. Tag Input (opens in a new tab)
13. Phone with Country (opens in a new tab)
<select> for the country dialling code. Semantic, accessible by default, and styled to match the input seamlessly.14. Stepper Number (opens in a new tab)
<input type="number"> underneath keeps keyboard arrows, validation, and screen-reader semantics intact.15. File Drop Zone (opens in a new tab)
<input type="file"> underneath, the visible filename appearing via :has() — accessible, keyboard-friendly, and minimal.16. Currency Input (opens in a new tab)
$ prefix. inputmode="decimal" brings up the right mobile keyboard; :focus-within lights the prefix to match the field accent.17. Date Picker Native (opens in a new tab)
<input type="date"> keeps every native picker behaviour (keyboard, accessibility, browser/OS calendars) while the chrome matches the rest of your form. ::-webkit-calendar-picker-indicator is recoloured to match the accent.18. Time Range (opens in a new tab)
<input type="time"> paired with a typographic → divider. Single visual unit while remaining two independent fields for keyboard nav and form submission.19. Color Picker (opens in a new tab)
<input type="color"> swatch chip paired with a hex text field — both accept the same name and submit value via the underlying form. Sibling-+ selectors mirror the swatch state.20. Search with Voice (opens in a new tab)
<input type="search"> so AT announces it as a search field.21. Email with Suggestions (opens in a new tab)
@, common email domains are suggested in a keyboard-navigable dropdown. aria-controls + aria-expanded + role="listbox" make it a proper combobox.22. Auto-Grow Textarea (opens in a new tab)
<textarea> that grows with its content using field-sizing: content — no JS observer needed. Falls back to a min-height on browsers without support.23. Inline Edit (opens in a new tab)
24. Range Slider Pro (opens in a new tab)
<input type="range"> with custom track/thumb styling and a live value bubble that follows the thumb. Honest accessibility — keyboard arrows, screen-reader announcement, real form value.25. URL with Protocol (opens in a new tab)
https:// prefix that visually integrates with the field. Submit value is the full URL; users only type the host portion.26. Credit Card (opens in a new tab)
inputmode="numeric" on mobile; pattern validation; autocomplete="cc-number".27. Toggle Password (opens in a new tab)
type="password" ↔ type="text". aria-pressed reflects state for screen readers; autocomplete="new-password" for sign-up flows.28. Brutalist Input (opens in a new tab)
Build your own
Tweak the exact look in our visual generators — no signup, instant copy-paste.
Frequently asked questions
How do I style a CSS input field?
Are these CSS input fields accessible?
What's the most accessible way to do a floating label?
Do these inputs need JavaScript?
Will autofill and password managers work with these inputs?
How do I build a HIPAA patient intake form or healthcare portal signup with these input fields?
Which input field pattern fits a Stripe / Shopify / WooCommerce e-commerce checkout?
Which input field pattern fits a SaaS signup, Stripe Atlas onboarding, or Notion / Linear / Vercel product tour?
Related collections
15 CSS 3D Tilt Hover Cards
15 mouse-aware 3D tilt hover cards — e-commerce product spotlight, glassmorphism parallax team card, interactive pricing tier, holographic NFT collectible, pop-out mascot, dark tech grid with border glow, media player album art, blog article preview, cyberpunk neon glow, dashboard KPI widget, minimalist real estate, flip-to-back tilt, mobile app showcase, course learning card, and a Pure CSS touch-friendly tilt. Vanilla JS writes --rx/--ry/--mx/--my; all rendering stays in CSS on the GPU.
24 CSS Animated Cards
24 hand-coded CSS animated card patterns organised by what triggers the motion, not by card style. Scroll and entrance triggers: staggered grid reveals, @starting-style mount-in, scroll-driven scale and fade on animation-timeline: view(), View Transitions API card-to-detail morphs, blur-to-sharp lazy image loading, and FLIP re-layout when a filter changes. State-change triggers: add-to-cart success morph, like and save particle burst, expand and collapse to intrinsic height with calc-size(), swipe-to-dismiss on Pointer Events, and skeleton-to-loaded crossfade. Data-driven triggers: count-up KPI metrics, SVG sparkline draw-on-enter, and progress ring fill on load. Ambient idle loops: breathing glow, floating drift, animated gradient mesh backgrounds, conic rotating borders, auto-cycling testimonial decks, and live status pulses. Plus four hover patterns where the effect is the topic itself: cursor spotlight, holographic foil glare, corner ribbon slide, and horizontal accordion expand. Every card is scoped under a .ac-NN prefix for no-collision pasting, guards prefers-reduced-motion, animates compositor-only properties, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.
22 CSS Avatars
22 hand-coded CSS avatars for chat apps, team dashboards, comment threads, account menus, and social profiles. Covers circular and squircle shapes, gradient and conic story rings, hexagon clip-path crops, online status dots, notification count badges, verified checkmarks, stacked facepiles with plus-N overflow, initials fallbacks for users without photos, broken-image recovery, avatar pickers, and a size scale system where the ring, badge, and status dot all scale from a single custom property.



























