Files
payload/examples/tailwind-shadcn-ui/README.md
Sasha 6b4842d44d feat(cpa): create project from example using --example CLI arg (#10172)
Adds the ability to create a project using an existing in the Payload
repo example through `create-payload-app`:

For example:
`pnpx create-payload-app --example custom-server` - creates a project
from the
[custom-server](https://github.com/payloadcms/payload/tree/main/examples/custom-server)
example.

This is much easier and faster then downloading the whole repo and
copying the example to another folder.
Note that we don't configure the payload config with the storage / DB
adapter there because examples can be very specific.
2024-12-27 20:16:34 +02:00

1.0 KiB

Payload with TailwindCSS and shadcn/ui

This is an example repo of Payload being setup with TailwindCSS and shadcn/ui components ready to be used in the admin panel itself.

Checkout our tutorial on our website

Quick Start

To spin up this example locally, follow these steps:

  1. Run the following command to create a project from the example:
  • npx create-payload-app --example tailwind-shadcn-ui
  1. cp .env.example .env to copy the example environment variables

    Adjust PAYLOAD_PUBLIC_SITE_URL in the .env if your front-end is running on a separate domain or port.

  2. pnpm dev, yarn dev or npm run dev to start the server

    • Press y when prompted to seed the database
  3. open http://localhost:3000 to access the home page

  4. open http://localhost:3000/admin to access the admin panel

That's it! Changes made in ./src will be reflected in your app. See the Development section for more details.