All Projects → Kida007 → React Native Normalized

Kida007 / React Native Normalized

Licence: mit
Components that behave more consistently between IOS and Android

Projects that are alternatives of or similar to React Native Normalized

Floaty
❤️ Floating Action Button for iOS
Stars: ✭ 1,266 (+1153.47%)
Mutual labels:  ui-components
Interfacss
The CSS-inspired styling and layout framework for iOS
Stars: ✭ 92 (-8.91%)
Mutual labels:  stylesheet
Angular Gauge
A reusable gauge directive for Angular 1.x apps and dashboards
Stars: ✭ 96 (-4.95%)
Mutual labels:  ui-components
Foleys gui magic
A GUI builder module for JUCE
Stars: ✭ 89 (-11.88%)
Mutual labels:  stylesheet
Gmailui
A GMail user interface library
Stars: ✭ 91 (-9.9%)
Mutual labels:  ui-components
React Native General Calendars
React Native Calendar Components 📆
Stars: ✭ 94 (-6.93%)
Mutual labels:  ui-components
Slidingtabbar
A custom TabBar view with sliding animation written in Swift.
Stars: ✭ 84 (-16.83%)
Mutual labels:  ui-components
Datingapp
Dating UI kit is used for online meet up with girls and boys . The screen contains more than 30 icons and most of all required elements required to design an application like this. The XML and JAVA files contains comments at each and every point for easy understanding. Everything was made with a detail oriented style and followed by today's web trends. Clean coded & Layers are well-organized, carefully named, and grouped.
Stars: ✭ 97 (-3.96%)
Mutual labels:  ui-components
Basecomponents
BaseComponents aims to provide easily reusable and understandable components to increase productivity with UIKit and Foundation APIs
Stars: ✭ 92 (-8.91%)
Mutual labels:  ui-components
Android Art
🎄 Android™ 设计相关的在线工具: 图标制作、配色方案、尺寸修改、截图加壳等,持续更新...
Stars: ✭ 95 (-5.94%)
Mutual labels:  ui-components
Ui
React Styled Components with bootstrap grid system
Stars: ✭ 89 (-11.88%)
Mutual labels:  ui-components
Design Ui Kit
Official UI components and templates for the Italia design system
Stars: ✭ 91 (-9.9%)
Mutual labels:  ui-components
Xmui
基于vue2,为公司产品打(zao)造(lun)的(zi)可复用UI组件,文档:
Stars: ✭ 94 (-6.93%)
Mutual labels:  ui-components
Togglebuttons
Android toggle buttons that adhere to the Material Design documentation.
Stars: ✭ 88 (-12.87%)
Mutual labels:  ui-components
Magix Gallery
magix gallery
Stars: ✭ 98 (-2.97%)
Mutual labels:  ui-components
Unityrecyclinglistview
A fast scrolling list component for Unity UI which recycles its child elements
Stars: ✭ 86 (-14.85%)
Mutual labels:  ui-components
React Instantsearch
⚡️ Lightning-fast search for React and React Native applications, by Algolia.
Stars: ✭ 1,320 (+1206.93%)
Mutual labels:  ui-components
Antv
Ant Design of Vue.js 2.0
Stars: ✭ 99 (-1.98%)
Mutual labels:  ui-components
Taiga Ui
Angular UI Kit and components library for awesome people
Stars: ✭ 1,353 (+1239.6%)
Mutual labels:  ui-components
Nim ios uikit
网易云信 iOS UI 组件,提供聊天界面,文本消息,图片消息,语音消息,视频消息,地理位置消息,自定义消息(阅后即焚)等消息示例。#推荐客户得比特币,首次推荐得0.02BTC,连续推荐得0.03BTC/单,上不封顶。点击参与https://yunxin.163.com/promotion/recommend
Stars: ✭ 1,326 (+1212.87%)
Mutual labels:  ui-components

react-native-normalized

Components that behave more consistently between iOS and Android

https://rnnormalized.netlify.com

Install using:

npm i react-native-normalized

React Native's built-in components render slightly different on iOS and Android, causing you to spend extra time making the UI more consistent across devices. For example, did you know that when you create a fresh project using react-native init, the color of a <Text/> is by default #000000 on iOS and #808080 on Android?

This project provides you with slightly adjusted adaptions of built-in React Native components with the goal of being more consistent between platforms. Think of it as normalize.css for React Native.

To be clear, these are not bugs in React Native, rather RN opts to preserve the default behavior on each platform as much as possible. Nonetheless, you might prefer to use components that behave more consistently.

Usage

Simply import a normalized component from react-native-normalized instead of react-native:

import React from 'react'
-import {View, Text} from 'react-native'
+import {View} from 'react-native'
+import {Text} from 'react-native-normalized'

class App extends React.Component {
    render() {
        return (
            <View>
                <Text>Welcome to React Native Normalized!</Text>
            </View>
        )
    }
}

export default App;

APIs and Components

Alert

  • Alert.alert() is by default not dismissable. The RN implementation is dismissable on Android but not on iOS.

✅ Since React Native v0.60, this is fixed!

<ActivityIndicator/>

Native
ActivityIndicator
on Android
Native
ActivityIndicator
on iOS
Normalized
ActivityIndicator
on Android
  • The default color of the activity indicator is #999999, the same color as the iOS Activity Indicator.

<Image/>

  • By default, on Android, an <Image/> fades in with a 300ms delay. With the normalized component, there is no fade animation.

<Text/>

Native Text on Android Normalized Text on Android
Native Text on OnePlus phone Normalized Text on OnePlus phone

Screenshot shows a Text on OxygenOS which is bold and inside a <View style={{flexDirection: 'row'}}> container, triggering the bug.

<TextInput/>

Native
TextInput
on Android
Native
TextInput
on iOS
Normalized
TextInput
on Android

Screenshot shows a TextInput with style {width: '100%', height: 100, backgroundColor: 'white'} and multiline={true}.

  • If multiline is true, the text aligns on top on Android.
  • The default placeholder text color is #C7C7CD on Android, the same as the iOS default
  • The default underlineColorAndroid is transparent. This is the default behavior since React Native 0.56, so it will only make a difference if you still use an older version.

Development and Ideas

Do you know of more components that could be made more consistent and that would fit well into this project? Let us know!

Currently we have two ideas for which we welcome code and comments:

Authors

This library is brought to you by Piyush Gupta and Jonny Burger.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].