shadcn/ui
Add single icons with the shadcn CLI. Each one lands in your project as code you own, without a dependency.
Add an icon
npx shadcn@latest add @coolicons/calendar-eventThe icon lands in components/icons/calendar-event.tsx as a React component without dependencies. Change it like any other component in your project.
Styles and corners
Line with regular corners is the default. Put the style, and the corners if they are not regular, in front of the name:
@coolicons/calendar-event
@coolicons/fill/calendar-event
@coolicons/bulk/round/calendar-event
@coolicons/line/sharp/calendar-eventEvery combination gets its own folder, like components/icons/fill/calendar-event.tsx, so several can live side by side.
Registry
coolicons is listed in the shadcn registry directory, so the CLI knows @coolicons without any setup and adds it to components.json on the first install. Every item also has a full URL:
npx shadcn@latest add https://coolicons.cool/r/calendar-event.jsonUse
The icons are drawn on the same 24 by 24 grid with a 2 px stroke as the default shadcn/ui icons, so they fit buttons, menus and inputs without changes.
import { Button } from "@/components/ui/button";
import { CalendarEvent } from "@/components/icons/calendar-event";
export function ScheduleButton() {
return (
<Button variant="outline">
<CalendarEvent />
Schedule
</Button>
);
}The components take size, strokeWidth, title and, where an icon has a second path, secondaryColor and secondaryOpacity like @coolicons/react. Icons whose name JavaScript or the browser already uses keep the Icon suffix, like MapIcon.
Registry or package
Use the registry when you want the code in your project and only a few icons. Use @coolicons/react when you want many icons and updates through your package manager.