@mihcm/icons
v0.1.4
Published
Universal Lucide icon wrapper. Same import works in React, Next.js, and React Native.
Readme
@mihcm/icons
Universal Lucide icon exports for MiHCM applications.
The same import path works in React, Next.js, and React Native. Platform resolution selects the correct Lucide implementation.
Current release
Current published version: 0.1.3.
Currently aligned with the @mihcm/[email protected] release train on public npm. Remains the approved icon import surface for web and native components.
Install
pnpm add @mihcm/iconsInstall the platform peer you use:
pnpm add lucide-react
# or for native
pnpm add lucide-react-nativeUsage
import { Search, Settings, Bell } from '@mihcm/icons';
import { Button } from '@mihcm/ui/Button';
export function Toolbar() {
return (
<Button variant="outline" leadingIcon={<Search className="size-4" />}>
Search
</Button>
);
}Icon-only buttons must provide an accessible name:
import { IconButton } from '@mihcm/ui/Button';
import { Settings } from '@mihcm/icons';
<IconButton aria-label="Open settings">
<Settings className="size-4" />
</IconButton>;What is included
- Named Lucide exports for web.
- Native-compatible exports through the package
react-nativecondition. - A single icon import surface for component docs, Storybook, MCP examples, and consuming applications.
Recent additions and fixes
- Documentation examples now prefer icon-bearing buttons and icon-only controls where the component pattern calls for them.
- TopBar, MainSidebar, TransferList, Breadcrumb, Button, Popper, and menu examples use icons through this package instead of inline SVG.
Icon rules
- Use icons from this package before adding custom SVG.
- Keep decorative icons
aria-hidden. - Provide
aria-labelor visible text for icon-only interactive controls. - Use tokenized size classes such as
size-4,size-5, or component-provided icon slots. - Do not hardcode icon colors unless the component docs explicitly call for a semantic token class.
Maintainer checklist
When updating icon support:
- Keep web/native export parity.
- Verify package exports still resolve for both bundlers.
- Update docs examples that mention new icon patterns.
- Add a changeset before publishing.
Build
cd src
pnpm -F @mihcm/icons build
pnpm -F @mihcm/icons typecheck