For a guide to component composition patterns, the strongest matches are vasanthk/react-bits (React Bits is a comprehensive collection of architectural patterns), acdlite/recompose (Recompose is a React utility library that implements higher-order) and krasimir/react-in-patterns (This repository is a comprehensive guide to React patterns). reactjs/react-modal and unovue/reka-ui round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
We curate open-source GitHub repositories matching “component composition patterns”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
React Bits is a comprehensive collection of architectural patterns, design strategies, and coding standards for building maintainable user interfaces. It functions as a guide for structuring complex applications through modular component composition, declarative state management, and consistent data flow techniques. The project distinguishes itself by providing a library of established design patterns and optimization techniques that address common development challenges. It emphasizes the identification and resolution of suboptimal coding practices, offering reliable alternatives to improve
React Bits is a comprehensive collection of architectural patterns and design strategies for React, directly providing reusable component composition examples like higher-order components, render props, hooks-based composition, and compound components, which matches the need for a pattern library demonstrating UI composition.
Recompose is a suite of toolsets for implementing higher-order component composition, context extraction, render optimization, and external state integration. It provides a library of utilities to wrap components in reusable logic and behavioral layers, allowing developers to chain functional wrappers and reduce nesting within a component tree. The project focuses on the composition of functional wrappers to inject properties and behavior into components. It includes a set of helpers for extracting values from component context and passing them as direct properties, as well as tools for integ
Recompose is a React utility library that implements higher-order component composition and render prop transformations, which fits the search for a component composition pattern collection, though it does not cover hooks-based or compound-component patterns.
This project is a comprehensive guide to architectural patterns and design techniques for building modular user interfaces with React. It focuses on structuring component hierarchies, implementing state management patterns, and decoupling services to ensure applications remain maintainable and scalable. The collection emphasizes strategies for dependency injection and the separation of business logic from presentation layers. It provides detailed approaches for utilizing containers, higher-order components, and module registries to isolate external services and third-party libraries from the
This repository is a comprehensive guide to React patterns including higher-order components and render props, making it a relevant pattern collection for component composition even if it may not cover every requested pattern like hooks-based composition or compound components in full detail.
This project is an accessible modal component for React applications. It provides a dialog window that overlays main content and manages keyboard focus to ensure compatibility with assistive technologies. The component integrates a portal wrapper to render modal content into a separate DOM node, avoiding layout nesting issues. It uses a focus-trapping system to restrict keyboard navigation to the dialog window and prevent users from tabbing into background page content. The library covers visibility control, custom portal mounting, and visual styling for dialog windows and overlays. It also
This is a modal component, not a collection of component composition patterns — it demonstrates one pattern (portal) in a single-use component rather than covering multiple patterns like render props, HOCs, or compound components.
Reka UI is a Vue headless component library that implements composition patterns like controlled/uncontrolled and compound components, but it is not a pattern collection resource and does not target React, which the visitor specifically asked for.
react-select is a customizable select input for React applications that supports single and multiple value selection with integrated search. It functions as a form input library providing a selection interface capable of fetching and displaying options from remote APIs dynamically as a user types. The library is distinguished by a component-injection architecture that allows users to replace internal UI fragments with custom React components. It further enables deep visual customization through prop-based style merging, allowing user-defined CSS objects to override internal defaults for brand
React-Select is a single, feature-rich select component that illustrates patterns like component injection and controlled/uncontrolled usage, but it is a practical UI component library rather than a dedicated collection or demonstration of general composition patterns like render props or compound components.
React Autosuggest is a fully controlled React component that provides an autocomplete input with a dropdown of suggestions as the user types. It delegates all state management to the parent component through callbacks, making it compatible with state management patterns like Flux or Redux. The component implements WAI-ARIA accessibility patterns, including keyboard navigation with arrow keys, Enter, and Escape, along with live region integration for screen reader announcements. The component offers extensive customization through render-prop functions, allowing developers to replace the defau
This is a single React autosuggest component that uses render props and a controlled pattern, but it is not a collection or library of multiple composition patterns such as higher-order components, hooks-based composition, or compound components that the visitor is seeking.
React Sortable Hoc is a library for building drag-and-drop reorderable lists and grids within web applications. It provides a set of reusable components designed to integrate into the component-based architecture of React, allowing users to rearrange elements through mouse or touch input. The library utilizes a higher-order component pattern to inject drag-and-drop state management into existing list components without requiring modifications to the underlying implementation. It employs portal-based ghost rendering to move elements outside the normal document flow, while using hardware-accele
This repository is a dedicated drag-and-drop sorting library that internally uses higher-order components and portal rendering, but it is a single-purpose component rather than a resource that demonstrates or collects a range of component composition patterns like compound components, render props, or hooks-based composition.
Reui is a React UI component library and front-end framework distributed under the MIT license. It provides a collection of reusable, pre-built React components for building modern web application interfaces. The library is built on a component-based architecture that uses declarative rendering through JSX, with state management handled by React Hooks. It employs CSS Modules for scoped styling and Tailwind CSS for utility-first styling, while TypeScript provides static type checking across the codebase. The project organizes components using a file-based structure and uses a module bundler bu
Reui is a React UI component library with pre-built components, not a dedicated collection or demonstration of composition patterns like render props, HOCs, or compound components; while it may use some of these patterns internally, it is organized as a design system rather than a pattern resource.
This library provides a collection of reusable hooks designed to manage state, side effects, and browser interactions within React applications. It functions as a toolkit for handling asynchronous data fetching and complex component logic, offering a set of type-safe utilities that reduce boilerplate code and improve maintainability. The library distinguishes itself through its focus on isomorphic lifecycle synchronization, ensuring consistent behavior across client and server environments to prevent hydration mismatches. It employs ref-based closure stabilization to ensure that asynchronous
This is a utility hooks library for managing state and side effects in production React apps, not a curated collection that demonstrates or educates on component composition patterns like render props, compound components, or slots.
Formik is a React form management library and state management tool. It serves as a client-side form validator for checking user entries against defined rules and managing associated error messages before submission. The library synchronizes user input values across multiple fields into a single object for retrieval and manipulates the transition of form data from initial entry through validation and final submission. It provides capabilities for tracking complex form state, managing form submissions, and validating user inputs to ensure data integrity.
Formik is a form management library that extensively uses render props, higher-order components, and hooks internally, but it is a focused form tool rather than a general-purpose collection demonstrating component composition patterns for building UI.
Recoil is an atomic state management framework and library for React. It functions as a state container that breaks application data into independent units called atoms to minimize unnecessary component re-renders. The system integrates with React hooks to provide a reactive state store. It utilizes a graph-based approach to data flow, employing a dependency graph to track relationships between state units and propagate updates automatically. The library coordinates global state across complex component trees, enabling independent components to communicate and share data without manual prop
Recoil is an atomic state management library for React, not a collection of reusable component composition patterns; it focuses on hooks-based state management and doesn't demonstrate render props, HOCs, compound components, or other patterns the visitor is seeking.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| vasanthk/react-bits | 17.4K | — | CC-BY-4.0 | |
| acdlite/recompose | 14.8K | JavaScript | MIT | |
| krasimir/react-in-patterns | 13.6K | JavaScript | MIT | |
| reactjs/react-modal | 7.4K | JavaScript | MIT | |
| unovue/reka-ui | 6.6K | Vue | MIT | |
| jedwatson/react-select | 28K | TypeScript | MIT | |
| moroshko/react-autosuggest | 5.9K | JavaScript | MIT | |
| clauderic/react-sortable-hoc | 10.9K | JavaScript | mit | |
| keenthemes/reui | 2.6K | TypeScript | mit | |
| alibaba/hooks | 15K | TypeScript | MIT |