dottt
v1.0.11
Published
An open-source set of dot icons
Maintainers
Readme
Dottt Icons
A TypeScript icon library with tree-shaking support.
Features
- Full TypeScript support
- Tree-shakeable imports
- Optional props with sensible defaults
- Accessibility built-in
- Auto-generated exports
Installation
npm install dotttUsage
Individual imports (recommended)
import { Home, Mail } from "dottt";
function MyComponent() {
return (
<div>
<Home />
<Mail size={32} color="#3b82f6" className="nav-icon" />
</div>
);
}Bundle import
import { Home, Mail } from "dottt";Props
interface IconProps extends SVGProps<SVGSVGElement> {
size?: number | string; // default: 24
color?: string; // default: "currentColor"
}All standard SVG props are supported (className, style, onClick, etc.).
Development
Adding icons
- Add SVG files to the
svgs/directory - Run
pnpm svgrto generate components - Run
pnpm buildto build the package
Scripts
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
Bundle optimization
- ES modules for tree-shaking
- Individual exports for each icon
- TypeScript declarations included
- Source maps for debugging
Accessibility
Icons include role="img" and aria-hidden="true" by default.
Available icons
AlertCircle, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Home, Landmark, Loader, LogOut, Mail, MailCheck, Rows5, Search, Settings, Trash, TrendingDown, TrendingUp, Trophy, X
License
ISC
