rsnext/examples/with-paste-typescript/README.md

26 lines
1.3 KiB
Markdown
Raw Normal View History

# Example app with Paste and TypeScript
This example features how to use [Paste](https://paste.twilio.design) as the component library within a Next.js app with [TypeScript](https://www.typescriptlang.org/).
Next.js and Paste have built-in TypeScript declarations, so you'll get autocompletion for their modules straight away.
[`pages/_app.tsx`](pages/_app.tsx) is used to connect `Paste`'s Theme Provider so the pages can have app-wide styles.
## Deploy your own
Deploy the example using [Vercel](https://vercel.com):
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/with-paste-typescript)
## How to use
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
```bash
npx create-next-app --example with-paste-typescript with-paste-typescript-app
# or
yarn create next-app --example with-paste-typescript with-paste-typescript-app
```
Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).