Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@radix-ui/react-icons
Advanced tools
@radix-ui/react-icons is a collection of high-quality, open-source icons for React applications. It provides a set of customizable and accessible icons that can be easily integrated into any React project.
Basic Icon Usage
This feature allows you to import and use individual icons from the @radix-ui/react-icons package. The example demonstrates how to import the CheckIcon and use it within a React component.
import { CheckIcon } from '@radix-ui/react-icons';
function App() {
return (
<div>
<CheckIcon />
</div>
);
}
Customizing Icon Size
This feature allows you to customize the size of the icons by passing width and height properties. The example shows how to set the size of the CheckIcon to 24x24 pixels.
import { CheckIcon } from '@radix-ui/react-icons';
function App() {
return (
<div>
<CheckIcon width={24} height={24} />
</div>
);
}
Styling Icons
This feature allows you to apply custom styles to the icons using the style prop. The example demonstrates how to change the color of the CheckIcon to green.
import { CheckIcon } from '@radix-ui/react-icons';
function App() {
return (
<div>
<CheckIcon style={{ color: 'green' }} />
</div>
);
}
react-icons is a popular library that provides a wide range of icons from various icon sets, including Font Awesome, Material Design, and more. It offers a larger variety of icons compared to @radix-ui/react-icons and is highly customizable.
heroicons-react is a React wrapper for the Heroicons icon set. It provides a collection of beautifully designed, hand-crafted SVG icons. While it offers a different style compared to @radix-ui/react-icons, it is also easy to use and customize.
A crisp set of 15×15 icons designed by the WorkOS team.
Visit icons.radix-ui.com to browse the icons.
All icons are available as individual React components.
Install Radix Icons from npm:
npm install @radix-ui/react-icons
Import the icons into your React project:
import { FaceIcon, ImageIcon, SunIcon } from '@radix-ui/react-icons';
function MyComponent() {
return (
<div>
<FaceIcon />
<SunIcon />
<ImageIcon />
</div>
);
}
Please follow our contributing guidelines.
Licensed under the MIT License, Copyright © 2022-present WorkOS.
See LICENSE for more information.
FAQs
Radix UI React Icon Set
The npm package @radix-ui/react-icons receives a total of 642,415 weekly downloads. As such, @radix-ui/react-icons popularity was classified as popular.
We found that @radix-ui/react-icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.