GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

08Apply CTA — a badge that computes days left until deadline on every load

Subtracting the current time from a deadline Date object, dividing the millisecond gap by a day's worth of milliseconds, and rounding up with Math.ceil computes the remaining days as an integer; once that number drops to three or below the badge color flips and aria-live announces the change, and the same math flips to a "closed" label once the result goes negative.

Best forHiring-deadline badges, application countdown banners

DateMath.ceilaria-live
Apply CTA — a badge that computes days left until deadline on every load
Open in a new tab

08 Apply CTA — a badge that computes days left until deadline on every load — Measured area 37.419% · moving frames 10/23Original by GODRICH · SCSS and React ship in the zip · 9 Team Page Design Patterns (Copy-Paste)

The post this demo lives in

9 Team Page Design Patterns (Copy-Paste) - preview of all 9 demos9 Team Page Design Patterns (Copy-Paste)Nine team-page sections that compute their layout: columns balance by headcount, bios get read-more only past overflow, See all demos in this post

If you like this effect - similar demos