Installation

Getting started with PortUI.

1. Install utilities

All components use Tailwind CSS v4, so ensure it's installed in your project. Many components also use the cn utility function—install it with the following command:

bunx shadcn@latest add https://portui.vercel.app/r/utils.json
npx shadcn@latest add https://portui.vercel.app/r/utils.json
pnpm dlx shadcn@latest add https://portui.vercel.app/r/utils.json

2. That's it 🎉

We use lucide-icons for most components that include icons, along with some shadcn/ui components. These dependencies will be automatically installed when using the CLI.

For example, to add card-05 to your project, it will be as easy as:

bunx shadcn@latest add https://portui.vercel.app/r/card-05.json
npx shadcn@latest add https://portui.vercel.app/r/card-05.json
pnpm dlx shadcn@latest add https://portui.vercel.app/r/card-05.json

While we provide a convenient 'copy' button for the code, we strongly recommend using the CLI for installing components, as it ensures all necessary files are included.

Add to your page and it works!

import Card05 from "@/components/portui/card-05";

export default function Page() {
  return <Card05 />;
}

3. Blocks

Blocks are a set of components to make a complete block; they contain multiple files. To install them, it is mandatory to use the CLI. For example, if you'd like to install the ai-card-generation block:

bunx shadcn@latest add https://portui.vercel.app/r/ai-card-generation.json
npx shadcn@latest add https://portui.vercel.app/r/ai-card-generation.json
pnpm dlx shadcn@latest add https://portui.vercel.app/r/ai-card-generation.json

Then, add to your page and it works!

/**
 * AICardGeneration requires 5 additional components
 * that will be automatically installed with the CLI.
 */
import AICardGeneration from "@/components/portui/AICardGeneration";

export default function Page() {
  return <AICardGeneration />;
}

4. Optional Dependencies

Some components require additional libraries, listed at the bottom of each component. Make sure to install them to ensure the component works properly.

5. Monorepo

For monorepos, the shadcn/ui CLI contains the -c option to specify the path to your workspace. For example:

bunx shadcn@latest add https://portui.vercel.app/r/card-05.json -c ./apps/www
npx shadcn@latest add https://portui.vercel.app/r/card-05.json -c ./apps/www
pnpm dlx shadcn@latest add https://portui.vercel.app/r/card-05.json -c ./apps/www