UI
Learn about installing shadcn/ui compnents and how to use type-safe icons.
ship.pluv.io templates are built with shadcn/ui, allowing you to quickly install components that you can customize to your liking.
Installing shadcn/ui components
You can install shadcn/ui components by installing them with the shadcn/ui CLI.
- Navigate to the
/packages/uidirectory. - Find a component you want to install (e.g. https://ui.shadcn.com/docs/components/checkbox)
- Run the CLI installation command
pnpm dlx shadcn@latest add checkboxThis package already has the shadcn/ui CLI installed, so you can choose to run the following command instead:
pnpm shadcn add checkboxUsing type-safe icons
There are 2 ways to use type-safe icons in your project:
Using lucide-react
import { RocketIcon } from "lucide-react";
<RocketIcon className="size-6" height={24} width={24} />Using @workspace/icons
You can generate type-safe icons as React components without having to mess with Webpack loaders by generating them with svgr.
- Go to the
/packages/iconsdirectory. - Add an svg file to the
/packages/icons/svgsdirectory (e.g. "MyCustomIcon.svg").
Note
The file name of the svg file will be used as the name of the icon component.
- Run the following command to generate the icon component:
pnpm build- Use the icon component in your project:
import { MyCustomIcon } from "@workspace/icons";
<MyCustomIcon className="size-6" height={24} width={24} />