Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@radix-ui/primitive
Advanced tools
The @radix-ui/primitive package provides foundational utilities for building accessible design systems and component libraries. It includes a set of low-level UI primitives that can be composed to create complex user interfaces with a focus on accessibility and customization.
Accessibility
Provides hooks like `useId` to generate unique IDs for accessibility purposes, ensuring elements such as labels and inputs are properly associated.
{"useId": () => { const id = useId(); return <div id={id}>Accessible Element</div>; }}
State Management
Offers utilities like `createContext` for state management within a component tree, allowing for shared state and context without prop drilling.
{"createContext": () => { const [MyContext, useMyContext] = createContext('MyContext'); return <MyContext.Provider value={/* some value */}><MyComponent /></MyContext.Provider>; }}
Styling
Includes a `styled` utility for theming and styling components, enabling a consistent design system across a UI.
{"styled": () => { const StyledComponent = styled('div', { color: 'red' }); return <StyledComponent>This is a styled component</StyledComponent>; }}
Reakit is a library that provides accessible, composable, and customizable components for React. It is similar to @radix-ui/primitive in its focus on accessibility and low-level primitives but also includes a more extensive set of pre-built components.
Downshift is a set of primitives to build simple, flexible, WAI-ARIA compliant enhanced input React components. Its focus is primarily on autocomplete, dropdown, and combobox components, and it compares to @radix-ui/primitive by providing a similar level of accessibility and customization.
React Aria provides a collection of React Hooks that manage state and accessibility for common UI components. It is similar to @radix-ui/primitive in its focus on accessibility and low-level functionality but is more focused on providing hooks for common patterns rather than a full suite of utilities.
primitive
$ yarn add @radix-ui/primitive
# or
$ npm install @radix-ui/primitive
This is an internal utility, not intended for public usage.
FAQs
Unknown package
The npm package @radix-ui/primitive receives a total of 4,290,256 weekly downloads. As such, @radix-ui/primitive popularity was classified as popular.
We found that @radix-ui/primitive demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.