Every icon is available as a ready-to-use React component with full TypeScript types. Components accept all standard SVG props such as width, height, className, style, and onClick.
Key Details:
- Default Size: 24×24.
- Best Rendering: For maximum sharpness, use multiples of 24 (e.g., 24px, 48px, 72px, 96px).
- Naming Convention: Icon names use PascalCase matching the SVG filename (e.g.,
alarm-clock.svg becomes AlarmClock). If a name starts with a digit, it is prefixed with Icon (e.g., 4g.svg becomes Icon4G). - Tree-shaking: To keep bundles small, you can import icons individually from their specific path.
// Standard import
import { Heart, Home, Bell, Mail, Lock } from 'pixelarticons/react'
// Tree-shakeable per-icon import
import { Heart } from 'pixelarticons/react/Heart'
export default function App() {
return (
<div>
<Heart width={48} height={48} />
<Home className="text-blue-500" />
<Bell style={{ color: 'red' }} />
</div>
)
}