Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 1.66 KB

README.md

File metadata and controls

31 lines (18 loc) · 1.66 KB

Example app with Paste and Typescript

This example features how to use Paste as the component library within a Next.js app 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.

Deploy your own

Deploy the example using Vercel:

Edit paste-cra in Codesandbox

Deploy with Vercel

Deploy with Netlify

How to use

Using create-next-app

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/packages/paste-nextjs-template my-paste-app
# or
yarn create next-app --example https://github.com/twilio-labs/paste/tree/main/packages/paste-nextjs-template my-paste-app

Deploy it to the cloud with Vercel (Documentation).