Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Builder | 4,687 | 4 | 38 | 3 days ago | 634 | September 23, 2022 | 337 | mit | TypeScript | |
Drag and drop headless CMS for React, Vue, Svelte, Qwik, Angular, and more | ||||||||||
Plasmic | 2,386 | 3 days ago | 31 | mit | TypeScript | |||||
Visual page builder and web design tool for any website or web app tech stack | ||||||||||
Uix Page Builder | 20 | 4 months ago | gpl-3.0 | JavaScript | ||||||
Uix Page Builder is a design system that it is simple content creation interface. | ||||||||||
Uswds | 9 | 13 days ago | 71 | March 24, 2022 | 6 | osl-3.0 | JavaScript | |||
JavaScript Powered Forms for the United States Web Design System |
Drag and drop your own code components. Let non-developers create stunning content, and free up developers from pixel-pushing.
Step 1. Install Plasmic into your codebase (exact package depends on your framework).
npm install @plasmicapp/loader-nextjs
Step 2 (optional). Make components from your app or design system available for drag-and-drop in the visual editor:
// Take any component from your app or design system...
export default function HeroSection({ children }) {
return <div className="hero-section">{children}</div>;
}
// ...and make it available for drag-and-drop, along with any props you want to
// expose.
PLASMIC.registerComponent(HeroSection, {
props: {
children: "slot",
},
});
Step 3. Add placeholders that render pages/components made in the visual editor anywhere in your app:
// pages/index.tsx
import {
PlasmicRootProvider,
PlasmicComponent,
} from "@plasmicapp/loader-nextjs";
import { PLASMIC } from "../plasmic-init";
// Here we fetch dynamically on the client, but you can also fetch and render
// components server-side in SSG/SSR frameworks, such as via getStaticProps
// in Next.js.
export default function IndexPage() {
return (
<PlasmicRootProvider plasmic={PLASMIC}>
<PlasmicComponent component="Summer22LandingPage" />
</PlasmicRootProvider>
);
}
Step 4. Non-developers (or developers!) can now create new pages, sections, or components that ship directly into the app/website.
Step 5. When you hit Publish, changes get picked up via webhooks that trigger rebuilds, or more specific mechanisms such as incremental static revalidation or dynamic fetching from the Plasmic CDN.
Plasmic is a platform that contains a few things:
Plasmic's main feature is its visual builder for the web. Developers integrate this into their codebase, and anyone (including non-developers) can build pages or parts of pages.
The goal is to empower and unblock non-developers such as marketers and designers, while freeing up developers from pixel-pushing content, thus letting the whole team move faster.
Plasmic as a page builder and “visual CMS” is its simplest and most common use case. Editors can create and update content in Plasmic without code, and publish this into their production site without needing to block on developers.
A key capability is that Plasmic lets you drag and drop your own components. There are multiple ways to use Plasmic--editors can:
Beyond website content, Plasmic can even be used to create frontends for complex web applications (such as Plasmic itself, which was built in Plasmic). This is a more advanced use case.
Learn more on our website and our docs. Or check out comparisons of Plasmic vs other tools.
Or check out our Next.js-based talk and demo at Next.js Conf 2021:
Connect with the Plasmic team and with other Plasmic users on the Plasmic Community Slack.
A smattering of interesting highlights about Plasmic:
Plasmic is used by companies ranging from Fortune 500s to boutique brands to solo makers. It's used for websites ranging from headless commerce storefronts to marketing websites to logged-in app content.
Check out the Case Studies and Community Showcase.
(Read the full technical overview.)
The main way to integrate Plasmic into a codebase is via the Headless API. The Headless API lets developers fetch and render into your existing codebase, without touching your code base besides the initial setup. This allows your Plasmic users to build designs and pages, and publish directly to production, without involving the development team.
You can think of Plasmic as a CMS, but where editors get to edit HTML/CSS rather than JSON data. Developers then just render the content as-is.
Plasmic does not host your site; your site continues to run on your existing infrastructure and tech stack.
For static site generators and server-rendered pages, Plasmic content is loaded at build-time or server-side and thus pre-rendered, optimizing page load performance. For other sites that fetch and render client-side, Plasmic content is loaded from the AWS Cloudfront CDN.
New pages can automatically just show up. The codebase integration can be configured such that as users create pages and routes in Plasmic Studio, they will be auto-loaded into your app without developer involvement.
You can register your own arbitrary custom React components for use as building blocks within Plasmic Studio. Learn more about code components.
Besides the Headless API, you can also generate React code into your codebase. This is a powerful way to use Plasmic as a UI builder for creating rich interactive web applications—one example of this is Plasmic Studio itself. See the application development tutorials to learn more.
This repo contains the code for all Plasmic component store packages (@plasmicpkgs/*
), client libraries/SDKs (@plasmicapp/*
), and examples (under the examples/
dir).
(For hacking on code components or plasmicpkgs
, see specific additional instructions further down.)
We use lerna
to help us manage dependencies among all the packages.
In general, we follow the "fork-and-pull" Git workflow.
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
yarn lerna bootstrap # inter-links all the lerna-managed packages together
We also make use of Verdaccio to locally test packages. This just stands up a local npm registry that you can publish your test packages to.
yarn global add verdaccio
verdaccio & # Runs the verdaccio server at http://localhost:4873
You'll need to update the verdaccio config file, at ~/.config/verdaccio/config.yaml
, to instruct verdaccio to not use npmjs for our test packages:
packages:
'@plasmicapp/isomorphic-unfetch':
access: $all
publish: $authenticated
unpublish: $authenticated
proxy: npmjs
'@plasmicapp/*':
access: $all
publish: $all
unpublish: $all
'@plasmicpkgs/*':
access: $all
publish: $all
unpublish: $all
Then kill and restart the verdaccio server:
verdaccio &
Finally, in order to publish, you may be required to have a user login. Create this one-time in your Verdaccio--it doesn't matter what user/password/email you input:
npm --registry=http://localhost:4873 adduser
Make some changes!
If you're ready to test, run yarn local-publish YOURPKG
. This unpublishes YOURPKG and its dependencies from your verdaccio, re-builds them, and publishes them to your local verdaccio. Note that this does not bump versions! We are using nx under the hood, so if your dependencies haven't changed, this should be fast.
Install the canary version into wherever you're trying to test, via yarn add ... --registry=http://localhost:4873
.
If you are not seeing bundles update, clear the relevant caches in the environment you're testing in. For instance, if you are testing a plasmicpkg in a Next.js app, try rm -rf .next/
.
(You can quickly create a test target app to install into with npx create-plasmic-app
).
You can publish an individual package with, for instance:
cd plasmicpkgs/SOMETHING
yarn publish --registry=http://localhost:4873
# Or with more options: yarn publish --canary --yes --include-merged-tags --no-git-tag-version --no-push --registry=http://localhost:4873 --force-publish
As a hack, you can also temporarily edit package.json
to list just the desired project + dependencies in workspaces
, if you need to develop/test across multiple packages.
As an alternative to verdaccio, you can also use yalc
.
Your mileage may vary.
It tends to work when there are fewer dependencies/moving parts.
yalc publish # from the packages/ or plasmicpkgs/ dir
yalc add @plasmicpkgs/PACKAGENAME # from your test app
npm i
npm run dev
plasmicpkgs
)The above general contribution instructions also apply to plasmicpkgs, so read that if you haven't done so.
Before starting, we recommend reading our docs for Code Components:
Skip this if you are just updating an existing package.
To create a new plasmicpkg, the easiest approach is to clone one of the existing packages (like react-slick) and fix up the names in package.json and README. Then author your registration code in src. Please use yarn
for package management.
The directory name should be the same name as the main package you'll be using to import the React components. Your package must be named @plasmicpkgs/{package-name}
and start with version 1.0.0. It should have the most recent version of @plasmicapp/host
as a peerDependency.
Ensure you can start running/testing a package before starting to make any code changes.
(One-time) Set up a normal repo with an app host, as documented here. You can do this with:
npx create-plasmic-app # Just create a Next.js app using PlasmicLoader
Now each time you want to try out a change, install your plasmicpkg into the app host repo using yalc
.
From your plasmicpkg/PACKAGENAME directory, run:
npm run local-canary
From your app host directory, run:
npm install @plasmicpkgs/[email protected]
Restart your app host, and reload the project in Studio:
npm run dev
The package must work for both codegen and loader users. This means that the register functions must have a optional parameter for the loader. It should also have an optional metadata parameter for users that want to use their own custom metadata.
export function registerFooBar(
loader?: { registerComponent: typeof registerComponent },
customFooBarMeta?: ComponentMeta<FooBarProps>
) {
if (loader) {
loader.registerComponent(FooBar, customFooBarMeta ?? FooBarMeta);
} else {
registerComponent(FooBar, customFooBarMeta ?? FooBarMeta);
}
}
Feel free to create wrapper components if it makes the final result better for the user. You also don't need to register all the props available for the component, only the ones that will be used in the studio.
Remember to export any wrapper components/types used to register the component. Everything should be also exported from the index.ts
file, so all the imports are from @plasmicpkgs/{package-name}
.
We recommend a registerAll()
function for an easy way to register all the available components in the package.
Checklist to test:
Remember that your package will be used by a wide variety of users, so it's important to have easy-to-use components, with good descriptions.
After testing in the Studio, it's also good to test both the available code options: loader and codegen. Testing codegen ensures your import paths are correct.
Feel free to join our Slack Community and ask us anything! We're here to help and always welcome contributions.