React Universal Interface
react-universal-interface
Universal Children Definition for React Components
Component Libraries
react
universal
interface
children
definition
ucd
universal-children
facc
render
prop
Stars
39
Weekly
2.9M
Open issues
1
Bundle
~25 kB
Installation
npm install react-universal-interfaceCode example
import { Button } from "react-universal-interface";
export function Example() {
return (
<div className="flex gap-2">
<Button>Primary</Button>
<Button variant="outline">Secondary</Button>
</div>
);
}Pros & cons
Pros
- Actively maintained by streamich
- 2.9M weekly downloads. Battle tested
- First-class TypeScript definitions
- Unknown licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 1 open issues on GitHub