Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultScrollOutline Paint Reveal
Ink Drop LoaderBrowse all 182Wipe-Up Dial Slides
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Outline Paint Reveal

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

    Setup

    npm i gsap

    More like this

    • Section transition
    • Reveal
    • Line drawing
    • Canvas
    • WebGL

    Features.

    • The picture's outlines run out ahead of the paint, drawn straight from the picture itself
    • A ragged paint front floods in behind them, with a glow at the wet edge
    • The finished picture keeps a faint paper wobble
    • Starts once when the section scrolls into view, and hurries if you scroll past it
    • One small WebGL shader, no libraries
    • Pauses offscreen, survives a lost WebGL context
    • Falls back to the plain picture without WebGL and under prefers-reduced-motion

    How to get it right.

    Pick a picture with hard edges

    The lines come from brightness steps in the picture. Architecture, hard shadows and flat colour draw clean lines. Soft or busy pictures draw very few, or a scribble.

    Let it start below the fold

    The paint starts when the stage scrolls into view. Put a section above it, or it has already begun by the time anyone looks.

    Keep the picture on your own domain

    The picture is drawn into a canvas. A picture from another domain needs CORS headers and crossorigin="anonymous" on the <img>, or the plain picture stays.

    Match the line colour to the page

    The lines are drawn on the bare page before the paint arrives. --cnp-line should read against --cnp-bg.

    Variations.

    • Slower or faster — data-au-duration="6" or "2"
    • Rising from the bottom — data-au-from="bottom"; "left" and "right" sweep across
    • A clean front — data-au-ragged="0"; "2.5" tears it further
    • No glow — data-au-glow="0"
    • A still picture at the end — data-au-wobble="0"
    • Other colours — --cnp-line and --cnp-edge on the root
    • Not full screen — set a height or aspect-ratio on .cnp_stage

    Where it fits.

    • Landing pages — the picture section after a hero
    • Case studies — a lead picture that arrives with some ceremony
    • Editorial — chapter openers

    Frequently asked.

    No. Scrolling starts it, then it runs on its own clock. If the section is already half off the top of the screen it runs five times faster.

    Once per load. Call window.au.ContourPaint.refresh(el) to run it again.

    The plain picture. The same goes for reduced motion and for a picture the canvas isn't allowed to read.

    Yes. Add it inside .cnp_stage after the picture, with position: relative and a z-index. Give it a scrim: the text sits on a photograph.

    Related components.

    NewPro

    Arc Collage Hero

    Scroll

    Pro

    Rising Card on Scroll

    Scroll

    Pro

    Wipe-Up Dial Slides

    Scroll