raulriera / react-native-window-tint-color

React Native Module to globally tint the keyWindow in an iOS application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-window-tint-color

Stop shipping to production that default blue color in iOS apps when the user is interacting with your native views.

This module will use the tintColor property in iOS to globally change the color of the native views accent color to match your own style.

If you want to learn more why this module was created, check out this article in my blog.

Example

Setting the tintColor to rgb(0,0,0) will result in the accent color of your native views turning black and looking like this.

Example image

✋ This module only supports iOS, calling the method in Android will reject the Promise.

Installation

npm install react-native-window-tint-color

Usage

import WindowTintColor from "react-native-window-tint-color";
import { Platform } from 'react-native';

// Android platform doesn't appear to support theming without XML files
if (Platform.OS === 'ios') {
    await WindowTintColor.setTintColor(255, 0, 0);
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

React Native Module to globally tint the keyWindow in an iOS application

License:MIT License


Languages

Language:Java 50.6%Language:Objective-C 20.6%Language:TypeScript 12.9%Language:JavaScript 9.0%Language:Ruby 5.9%Language:C 0.6%Language:Swift 0.4%