Skip to main content

Harshal V. LADHE

Building UI Components

Practical techniques for building common interface components — buttons, toolbars, tooltips and more — with semantic HTML and modern CSS.

Content tagged ui-components

  • Tutorial:Animating height: auto in CSS with interpolate-size

    Animate height to auto in pure CSS, no JavaScript.
    Animate height: auto in CSS with interpolate-size and calc-size(): smooth accordions and details panels without JavaScript, plus fallbacks and reduced motion.
    Published at:
    Categories:Animations
    Estimated reading time:9 min read
  • Tutorial:CSS-Only Tooltips with attr() and content

    Styled, keyboard-friendly tooltips from one HTML attribute — no JavaScript.
    Build CSS-only tooltips that read their text from an HTML attribute with content: attr() — positioned with a ::after pseudo-element, given an arrow, revealed on hover and keyboard focus, flipped below the element and kept gentle under reduced motion — plus the accessibility limits and pitfalls to know before shipping one.
    Published at:
    Categories:CSS
    Estimated reading time:11 min read
  • Tutorial:Pure CSS Carousels with ::scroll-marker and ::scroll-button()

    Build carousel dots and arrows with pure CSS.
    Build CSS-only carousel dots and prev/next arrows with ::scroll-marker, ::scroll-button() and :target-current: no JavaScript, plus accessibility and fallbacks.
    Published at:
    Categories:CSS
    Estimated reading time:9 min read
  • Snippet:SVG Marching Ants Border for Drop Zones and Selections

    Animate a marching dashed SVG border around any box.
    Build a marching ants border with an SVG rect and stroke-dashoffset: a seamless loop, a crisp overlay for any box size, and reduced-motion support.
    Published at:
    Categories:SVG
    Estimated reading time:7 min read