React Theme Provider screenshot

React Theme Provider

Author Avatar Theme by Callstack
Updated: 1 Aug 2023
471 Stars

A set of utilities that help you create your own React theming system in few easy steps

Categories

Overview

@callstack/react-theme-provider is a library that provides utilities for creating a theming system in React and React Native. With this library, you can customize colors, fonts, and other styling elements easily. It offers features such as theming components, accessing theme data, and overriding default themes.

Features

  • Works in React and React Native
  • Allows you to create theming using the createTheming function
  • Provides the ThemeProvider component for wrapping your code and making the theme available to all components
  • Includes the withTheme Higher Order Component (HOC) for accessing the theme data in your components
  • Offers the useTheme React Hook for accessing the theme data in functional components

Installation

To install @callstack/react-theme-provider, you can use either npm or yarn. Here are the installation commands:

Using npm:

npm install @callstack/react-theme-provider

Using yarn:

yarn add @callstack/react-theme-provider

Once installed, you can import the necessary components and functions from the library.

Summary

@callstack/react-theme-provider is a useful library for creating a theming system in React and React Native applications. It provides easy-to-use utilities for customizing colors, fonts, and other styling elements. With its features such as the ThemeProvider component, withTheme HOC, and useTheme Hook, you can easily implement and access the theme data in your components. It also allows you to override default themes and use multiple theme providers in your app.