Crosshatch
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initSliderCrosshatch(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/slider-crosshatchAbout this component
A shading slider drawn in pen on a strip of paper: the fill is hatching, and the darker you take it the more layers go down, one direction after another (diagonal, cross-diagonal, across, down), each fading in as the tone passes its quarter, the lines wobbling slightly as a hand draws them.
- Dependencies
- None
- Difficulty
- Intermediate
- Reduced motion
- Respected
- Theme
- Light and dark
- Follows page color-scheme
Triggers3
- State change
- Fill
- Draw
Techniques4
- Gradient
- SVG filter
- CSS variables
- Pseudo elements
Accessibility
Keyboard and screen readers
A native range input named Shading with the percentage as its value text; the paper is aria-hidden.
Use it in anything you build, commercial and client work included. Licence