Giter Club home page Giter Club logo

paperclip's Introduction

Join the Discord channel for the latest updates!

Paperclip enables you to design and build just about any kind of web application end-to-end. It can be used directly within Codespaces, enabling anyone easy access to make changes to web applications.

Split view

Designer setup

To get started with the designer, just create a new codespace and install the Paperclip extension. After that, you'll see a new toolbar icon that you can click in order to open the designer whenever you want.

After the designer is open, you're free to edit any Paperclip file (*.pc) and save directly to the codebase (probably through a pull-request).

Development setup

The develeopment tooling enables you to compile design files into application code (currently supporting vanilla React, HTML, and vanilla CSS). To get started, run the following command:

# TODO SH installation command
npx @paperclip-ui/cli init

This will run through the installation process for your project. After that, you can start using Paperclip locally with your existing codebase.

CLI Usage

You can use the CLI tool to compile and edit design files locally. Here are some example commands:

# Build all paperclip files
paperclip build

# Open the paperclip designer in a browser for visual development
paperclip designer

Design files

Paperclip's design files are in plain text and can be written by hand. Here's a kitchen sink example:

// You can define "variant" styles that contain behavior like media queries
// and other CSS selectors
variant isMobile {
  "@media screen and (max-width: 400px)"
}

// Tokens enable you to define individual CSS values that you can use
// throughout your app
public token gray0 #333
public token gray1 #CCC


// Tokens can be responsive to media queries, too
public token fontSize 12px variant {
  isMobile 32px
}

public token fontFamily Helvetica

// You can define groups of re-usable styles throughout
// your app
style defaultFont {

  // Tokens can be referenced by `var`
  font-family: var(fontFamily)
  font-size: var(fontSize)
}

/**
 * Metadata like this allows you to specific infomation about
 * your UIs that is used in the designer
 *
 * @bounds { width: 1024, height: 768 }
 */

public component Page {


  render div {

    // Styles can be defined inlined. You can also
    // include any style that you want like so
    style extends defaultFont

    // "header" is an ID that gives your element some meaning
    div pageHeader {

      style {
        width: 100%
        background: var(gray1)
      }

      // You can define areas of your components where elements are insertable
      slot header {

        // Slots also contain default children
        text "This is a default child"
      }
    }

    div pageContent {
      slot content
    }
  }
}

// You can specify component instances
Page {
  insert header {

    // If you want, Paperclip comes with a "strict" mode that
    // disallows cascading styles and requires you to define styles
    // on each element. This provides a UX similar to Figma.
    text "Some custom header" {
      style extends defaultFont
    }
  }
  insert content {
    text "Some custom content"
  }
}

Contributing

Right now, the main focus for the app is around the designer UI and UX. If you're a designer and would like to help out with that, awesome! The main thing that would be super helpful is to come up with suggestions and / or design around how to improve the designer to better suite your workflow.

You're welcome to use the designer, Figma, or any tool to submit suggestions. If they're accepted, we'll wire up your designs and include the new functionality in the designer.

Roadmap

There are a number of things on the horizon for Paperclip, not in order:

  • Visual regression coverage of all UI
  • Import directly from Figma
  • More compiler targets
    • Various frameworks: Svelte, Vue
    • Various design systems: MaterialUI, Radix, Chakra, etc.
    • More language: PHP, Java, Ruby, etc.
  • Ability to build and deploy apps built in Paperclip
  • More platform targets like iOS, Android (this is a big maybe)

paperclip's People

Contributors

crcn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.