css-doodle/css-doodle

A web component for visual art and creative coding

JavaScript

6,059

1,710 commits

updated Oct 10, 2026

See the code

README

Rows of pastel circles, squares, and triangles with tiny eyes, drawn with css-doodle

css-doodle

A web component for visual art and creative coding with CSS. Write CSS rules for a grid of cells, mix in randomness and math, and draw generative patterns, backgrounds, icons and decorations.

npm MIT license Open Collective backers

Website · Getting started · Reference · Playground · Discover

Example

The code <css-doodle> @grid: 4 / 480px / blue +.75; border-radius: @pn(100% 0, 0 100%, 50%); background: #fff; </css-doodle> next to its result, a 4 by 4 grid of white leaf shapes and circles on blue

Tools

  • Playground: write and share doodles in the browser
  • Shapes: discover new CSS polygon shapes
  • SVG playground: generate SVG code with the same syntax
  • cssd: command-line preview and image/video export

Articles and talks

Who uses css-doodle

  • Tabbied: generated patterns for prints and wallpapers

Development

npm install
npm test         # unit tests
npm run build    # css-doodle.min.js

make runs both.

Support

css-doodle is free and MIT licensed. If it has been useful to you, consider backing it on Open Collective. Thank you! 🙏

creative-coding
css
css-doodle
generative
generative-art
patterns
visual-art
web-component

css-doodle/css-doodle

A web component for visual art and creative coding

JavaScript

6,059

1,710 commits

updated Oct 10, 2026

See the code

README

Rows of pastel circles, squares, and triangles with tiny eyes, drawn with css-doodle

css-doodle

A web component for visual art and creative coding with CSS. Write CSS rules for a grid of cells, mix in randomness and math, and draw generative patterns, backgrounds, icons and decorations.

npm MIT license Open Collective backers

Website · Getting started · Reference · Playground · Discover

Example

The code <css-doodle> @grid: 4 / 480px / blue +.75; border-radius: @pn(100% 0, 0 100%, 50%); background: #fff; </css-doodle> next to its result, a 4 by 4 grid of white leaf shapes and circles on blue

Tools

  • Playground: write and share doodles in the browser
  • Shapes: discover new CSS polygon shapes
  • SVG playground: generate SVG code with the same syntax
  • cssd: command-line preview and image/video export

Articles and talks

Who uses css-doodle

  • Tabbied: generated patterns for prints and wallpapers

Development

npm install
npm test         # unit tests
npm run build    # css-doodle.min.js

make runs both.

Support

css-doodle is free and MIT licensed. If it has been useful to you, consider backing it on Open Collective. Thank you! 🙏

creative-coding
css
css-doodle
generative
generative-art
patterns
visual-art
web-component

Project health

Overall

4.8/10

Maintained

10/10

Code review

0/10
OpenSSF Scorecard

Latest release

0.57.1 · Oct 10, 2026

Releases this year

19

Significant stargazers

(top 24 of 49)

小弟调调

9,435 followers · starred Jan 2023

Luke Edwards

5,087 followers · starred Apr 2020

Jared Forsyth

1,314 followers · starred Oct 2022

Keith Cirkel

1,809 followers · starred Jan 2023