
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Import Paper JS using CDN.
import { PaperJSInterpreter } from 'https://cdn.jsdelivr.net/npm/paperjs';
import { PaperJSInterpreter } from 'https://cdn.jsdelivr.net/npm/paperjs@latest';
Install Paper JS using npm and node.
npm install paperjs
Import paperjs definitions from PaperJSInterpreter
.
index.js
import { PaperJSInterpreter } from './paperjs/import.min.js';
PaperJSInterpreter.interpret(paperjs);
Use the tree structure in your Javascript. That's it 🎉.
script.js
import { PaperJSInterpreter } from 'https://cdn.jsdelivr.net/npm/paperjs';
const paperjs = {
div: {
class: 'container',
styles: 'justify-content: center;display: flex;align-items: center;height: 100%;width: 100%;top: 0;left: 0;right: 0;bottom: 0;position: fixed;',
form: [
{
styles: 'width: 300px;',
input: [
{
type: 'email',
placeholder: 'Email',
styles: 'display: flex;width: 100%;height: 38px;',
},
{
type: 'password',
styles: 'margin-top: 12px;display: flex;width: 100%;height: 38px;',
placeholder: 'Password',
},
],
label: [
{
value: 'Join newsletter',
styles: 'display: flex;font-family: "Roboto", sans-serif;margin-top: 28px;width: 100%;',
input: [
{
type: 'checkbox',
id: 'checkbox',
styles: 'display: flex;margin-left: 10px;',
},
],
},
],
button: [
{
styles: 'margin-top: 20px;display: flex;width: 100%;align-items: center;height: 32px;justify-content: center;',
value: 'Reset',
type: 'reset',
class: 'reset-button',
},
],
},
],
},
};
PaperJSInterpreter.interpret(paperjs);
A basic form with PaperJS.
A simple sidebar with PaperJS.
Using the library with Material UI.
Licensed under the MIT License, Copyright © 2024-present Opensource-Paper.
See LICENSE for more information.
FAQs
Paper JS is a new way to write HTML entirely in your JavaScript.
We found that paperjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.