This is a Next.JS webapp that uses Paste as the component library with typescript. Next.js and Paste have built-in TypeScript declarations, so we'll get autocompletion for their modules straight away.
We are connecting the Next.js _app.tsx
with Paste
's Theme Provider so the pages can have app-wide styles.
Note: Ensure node version compatibility. (node v20)
-
Install dependencies with: "npm install" or "yarn"
-
Run a local dev version: "npm run dev" or "yarn dev"
-
Create a production build: "npm build"
-
Run a local production version: "npm run start"
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example https://github.com/twilio-labs/paste/tree/main/templates/paste-nextjs-template my-paste-app
# or
yarn create next-app --example https://github.com/twilio-labs/paste/tree/main/templates/paste-nextjs-template my-paste-app
Deploy it to the cloud with Vercel (Documentation).