diff --git a/examples/rafty-nextjs-pages-router-ts/README.md b/examples/rafty-nextjs-pages-router-ts/README.md index a75ac524..006ff970 100644 --- a/examples/rafty-nextjs-pages-router-ts/README.md +++ b/examples/rafty-nextjs-pages-router-ts/README.md @@ -1,40 +1,45 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Rafty UI - Next.js Pages Router example in TypeScript -## Getting Started +This is a [Next.js](https://nextjs.org/) project bootstrapped using [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with Rafty UI installed. -First, run the development server: +## How to use + +Download the example [or clone the repo](https://github.com/rhinobase/raftyui): + + ```bash +npx create-next-app rafty-nextjs-pages-router-ts --example https://github.com/rhinobase/raftyui/tree/main/examples/rafty-nextjs-pages-router-ts +cd rafty-nextjs-pages-router-ts +``` + +Install it and run: + +```bash +npm install npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. +or: -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs-pages-router-ts) -## Learn More +[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs-pages-router-ts) -To learn more about Next.js, take a look at the following resources: +## Learn more -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +To learn more about this example: -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +- [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Customizing Rafty UI](https://rafty.rhinobase.io) - approaches to customizing Rafty UI. -## Deploy on Vercel +## What's next? -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +You now have a working example project. +You can head back to the documentation and continue by browsing the [templates](https://rafty.rhinobase.io/docs/examples) section. diff --git a/examples/rafty-nextjs-pages-router/README.md b/examples/rafty-nextjs-pages-router/README.md index 5d98b1e5..20456e43 100644 --- a/examples/rafty-nextjs-pages-router/README.md +++ b/examples/rafty-nextjs-pages-router/README.md @@ -1,40 +1,45 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Rafty UI - Next.js Pages Router example -## Getting Started +This is a [Next.js](https://nextjs.org/) project bootstrapped using [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with Rafty UI installed. -First, run the development server: +## How to use + +Download the example [or clone the repo](https://github.com/rhinobase/raftyui): + + ```bash +npx create-next-app rafty-nextjs-pages-router --example https://github.com/rhinobase/raftyui/tree/main/examples/rafty-nextjs-pages-router +cd rafty-nextjs-pages-router +``` + +Install it and run: + +```bash +npm install npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. - -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. +or: -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs-pages-router) -## Learn More +[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs-pages-router) -To learn more about Next.js, take a look at the following resources: +## Learn more -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +To learn more about this example: -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +- [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Customizing Rafty UI](https://rafty.rhinobase.io) - approaches to customizing Rafty UI. -## Deploy on Vercel +## What's next? -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +You now have a working example project. +You can head back to the documentation and continue by browsing the [templates](https://rafty.rhinobase.io/docs/examples) section. diff --git a/examples/rafty-nextjs-ts/README.md b/examples/rafty-nextjs-ts/README.md index c4033664..1cb5a516 100644 --- a/examples/rafty-nextjs-ts/README.md +++ b/examples/rafty-nextjs-ts/README.md @@ -1,36 +1,45 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Rafty UI - Next.js App Router example in TypeScript -## Getting Started +This is a [Next.js](https://nextjs.org/) project bootstrapped using [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with Rafty UI installed. -First, run the development server: +## How to use + +Download the example [or clone the repo](https://github.com/rhinobase/raftyui): + + ```bash +npx create-next-app rafty-nextjs-ts --example https://github.com/rhinobase/raftyui/tree/main/examples/rafty-nextjs-ts +cd rafty-nextjs-ts +``` + +Install it and run: + +```bash +npm install npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +or: + + -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs-ts) -## Learn More +[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs-ts) -To learn more about Next.js, take a look at the following resources: +## Learn more -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +To learn more about this example: -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +- [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Customizing Rafty UI](https://rafty.rhinobase.io) - approaches to customizing Rafty UI. -## Deploy on Vercel +## What's next? -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +You now have a working example project. +You can head back to the documentation and continue by browsing the [templates](https://rafty.rhinobase.io/docs/examples) section. diff --git a/examples/rafty-nextjs/README.md b/examples/rafty-nextjs/README.md index 0dc9ea2b..3ca62437 100644 --- a/examples/rafty-nextjs/README.md +++ b/examples/rafty-nextjs/README.md @@ -1,36 +1,45 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Rafty UI - Next.js App Router example -## Getting Started +This is a [Next.js](https://nextjs.org/) project bootstrapped using [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with Rafty UI installed. -First, run the development server: +## How to use + +Download the example [or clone the repo](https://github.com/rhinobase/raftyui): + + ```bash +npx create-next-app rafty-nextjs --example https://github.com/rhinobase/raftyui/tree/main/examples/rafty-nextjs +cd rafty-nextjs +``` + +Install it and run: + +```bash +npm install npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file. +or: + + -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. +[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs) -## Learn More +[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/rhinobase/raftyui/tree/main/examples/rafty-nextjs) -To learn more about Next.js, take a look at the following resources: +## Learn more -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +To learn more about this example: -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +- [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Customizing Rafty UI](https://rafty.rhinobase.io) - approaches to customizing Rafty UI. -## Deploy on Vercel +## What's next? -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +You now have a working example project. +You can head back to the documentation and continue by browsing the [templates](https://rafty.rhinobase.io/docs/examples) section. diff --git a/examples/rafty-vite-ts/README.md b/examples/rafty-vite-ts/README.md index 1ebe379f..b57c52cc 100644 --- a/examples/rafty-vite-ts/README.md +++ b/examples/rafty-vite-ts/README.md @@ -1,27 +1,39 @@ -# React + TypeScript + Vite +# Rafty UI - Vite.js example in TypeScript -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +## How to use -Currently, two official plugins are available: +Download the example [or clone the repo](https://github.com/rhinobase/raftyui): -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: +```bash +npx degit https://github.com/rhinobase/raftyui/examples/rafty-vite-ts rafty-vite-ts +cd rafty-vite-ts +``` -- Configure the top-level `parserOptions` property like this: +Install it and run: -```js - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - project: ['./tsconfig.json', './tsconfig.node.json'], - tsconfigRootDir: __dirname, - }, +```bash +npm install +npm run dev ``` -- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` -- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list +or: + + + +[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rhinobase/raftyui/tree/main/examples/rafty-vite-ts) + +[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/rhinobase/raftyui/tree/main/examples/rafty-vite-ts) + +## The idea behind the example + +This example uses [Vite.js](https://github.com/vitejs/vite). +It includes [@rafty/ui](https://rafty.rhinobase.io) and its dev dependencies, `@rafty/plugin`, the default style engine in Rafty UI. + +## What's next? + + + +You now have a working example project. +You can head back to the documentation and continue by browsing the [templates](https://rafty.rhinobase.io/docs/examples) section. diff --git a/examples/rafty-vite/README.md b/examples/rafty-vite/README.md index f768e33f..30f1100e 100644 --- a/examples/rafty-vite/README.md +++ b/examples/rafty-vite/README.md @@ -1,8 +1,39 @@ -# React + Vite +# Rafty UI - Vite.js example -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +## How to use -Currently, two official plugins are available: +Download the example [or clone the repo](https://github.com/rhinobase/raftyui): -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + + +```bash +npx degit https://github.com/rhinobase/raftyui/examples/rafty-vite rafty-vite +cd rafty-vite +``` + +Install it and run: + +```bash +npm install +npm run dev +``` + +or: + + + +[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rhinobase/raftyui/tree/main/examples/rafty-vite) + +[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/rhinobase/raftyui/tree/main/examples/rafty-vite) + +## The idea behind the example + +This example uses [Vite.js](https://github.com/vitejs/vite). +It includes [@rafty/ui](https://rafty.rhinobase.io) and its dev dependencies, `@rafty/plugin`, the default style engine in Rafty UI. + +## What's next? + + + +You now have a working example project. +You can head back to the documentation and continue by browsing the [templates](https://rafty.rhinobase.io/docs/examples) section.