Info
Demo 2.4
JavaScript libraries make your life easier
Files in this demo
├─ index.html └─ script.js
Animating a burst of confetti from scratch would take a lot of code. Luckily, you don’t have to write it ~ a library is a bundle of pre-written code that someone else has shared for anyone to use.
To use one, you load it with a <script> tag that points to its address on the web (often a CDN). After it loads, you can call its features from your own code. This entire celebration is a single line: confetti().
There are libraries for almost everything ~ animation, sound, maps, 3D graphics, and more. You’ll find some in action in the other collections.
Keyboard Shortcuts
⌘ Z / ⌘ ⇧ ZCtrl Z / Ctrl ⇧ Z
Undo / redo
Tab / ⇧ TabTab / ⇧ Tab
Indent / unindent selection
⌘ ] / ⌘ [Ctrl ] / Ctrl [
Indent / unindent lines
⌘ ACtrl A
Select all
⌘ DCtrl D
Select next occurrence of selection
⌘ /Ctrl /
Comment / uncomment lines
Ctrl SpaceCtrl Space
Autocomplete
Ctrl EnterCtrl Enter
Reset layout
⌘ ⌥ [ / ⌘ ⌥ ]Ctrl ⇧ [ / Ctrl ⇧ ]
Fold / unfold block
Code
The editor didn't load — try refreshing the page. Navigation,
shortcuts and the info panel still work in the meantime.
Settings
View
Font size
14
Code
Preview
Delay
Zoom
Share
Reset
Preview
Currently previewing:
Dimensions0 × 0
Delay
Preview paused
Click to resume
Click to resume
The preview is disabled for this demo.
Use the console below.
Use the console below.
Console
›