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 the example using Vercel:
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).