
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@choiceform/icons-library
Advanced tools
SVG icon library for the Choiceform project.
This package automatically generates React components from SVG files stored in the icons/
directory, providing a consistent and performant way to use icons across different Choiceform applications.
icons/
directory are automatically converted into React components.icon-name[tag1,tag2].svg
) to facilitate searching and organization.#000
) strokes/fills are converted to currentColor
, allowing color control via CSS.Install the package using npm, yarn, or pnpm:
# Using npm
npm install @choiceform/icons-library
# Using yarn
yarn add @choiceform/icons-library
# Using pnpm
pnpm add @choiceform/icons-library
There are two primary ways to use the icons:
Direct Import (Recommended for Tree-Shaking):
Import the specific icon component you need directly. This ensures that only the icons you use are included in your final bundle.
import { CheckCircle14, User } from "@choiceform/icons-library";
function MyComponent() {
return (
<div>
<User className="w-5 h-5 text-blue-500" />
<CheckCircle14 size={32} />
</div>
);
}
Component names are generated in PascalCase based on the SVG filename (excluding tags in []
). Folder structure translates to prefixes (e.g., icons/ui/check.svg
becomes UiCheck
).
.svg
files in the icons/
directory. You can create subdirectories for categorization (e.g., icons/ui/
, icons/logos/
).arrow-right.svg
)..svg
extension, separated by commas: arrow-right[navigation,direction,next].svg
.pnpm generate
(or pnpm build
, which includes the generate step) in the project root.pnpm generate
: Generates icon components and metadata into the src/generated/
directory.pnpm build
: Generates icon components and builds distributable files (.js
, .d.ts
) for the library into the dist/
directory.pnpm dev
: Watches the icons/
directory for changes and automatically runs the generate
command.Contributions to the icon library are welcome! Please follow the guidelines in the "Adding Icons" section above and submit a Pull Request.
FAQs
SVG icon library for Choiceform
We found that @choiceform/icons-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.