Giter Site home page Giter Site logo

codelift's Introduction

codelift  Version Downloads Release

A "No Code" GUI for your existing React app. – Launch Tweet

Next.js Example

Getting Started

Within your project:

  1. yarn add codelift --dev

  2. For create-react-app:

    yarn codelift start

    For Next.js:

    yarn codelift dev

    (codelift runs yarn ____ with whatever you provide)

  3. Add the following import "codelift/register" to the top of your src/index.tsx or pages/_app.tsx:

    import React from "react";
    import ReactDOM from "react-dom";
    
    import { register } from "codelift";
    register({ React, ReactDOM });

    codelift requires access to your application's copy of react and react-dom to support custom inspectors.

Examples

Features

  • Double-Click components & elements in the tree view to open in VS Code.

  • Tailwind Visual Inspector

    1. Hover & Select an element.
    2. Find-as-you-type CSS classes.
    3. Hover to preview before applying.
    4. Click to toggle in your source code.
  • CMD+' to toggle codelift and browse normally.

  • Custom Inspectors:

    Suppose you have Header component that accepts a title:

    export const Header = ({ title }) => {
      ...
    }

    Next, attach a custom Inspector component to your Header that accepts the current props and calls setProps when it changes:

    Header.Inspector = ({ props, setProps }) => {
      return (
        <input
          onChange={event => setProps({ title: event.target.value })}
          defaultValue={props.title}
        />
      );
    };

    Your Inspector will be rendered in a sidepanel when a Header is selected:

    Header Inspector

Contributing

  1. Clone this repo.
  2. yarn cra or yarn next to run the CRA or Next.js examples, respectively.

Author

  • Eric Clemmons

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Eric Clemmons

💻 📖 🚇

​Faizaan

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

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.