A TypeScript icon library with tree-shaking support.
- Full TypeScript support
- Tree-shakeable imports
- Optional props with sensible defaults
- Accessibility built-in
- Auto-generated exports
npm install dotttimport { Home, Mail } from "dottt";
function MyComponent() {
return (
<div>
<Home />
<Mail size={32} color="#3b82f6" className="nav-icon" />
</div>
);
}import { Home, Mail } from "dottt";interface IconProps extends SVGProps<SVGSVGElement> {
size?: number | string; // default: 24
color?: string; // default: "currentColor"
}All standard SVG props are supported (className, style, onClick, etc.).
- Add SVG files to the
svgs/directory - Run
pnpm svgrto generate components - Run
pnpm buildto build the package
pnpm svgr- Convert SVGs to React componentspnpm transform- Transform existing componentspnpm generate-exports- Generate package exportspnpm build- Build the librarypnpm dev- Build in watch mode
- ES modules for tree-shaking
- Individual exports for each icon
- TypeScript declarations included
- Source maps for debugging
Icons include role="img" and aria-hidden="true" by default.
AlertCircle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Home, Landmark, Loader, LogOut, Mail, MailCheck, Rows5, Search, Settings, Trash, TrendingDown, TrendingUp, Trophy, X
ISC