Nicolas Gallagher ad3dee0204 [change] a11y and layout: button role and DOM props
Problems:

HTML's native <button> tag doesn't support flex styling in all browsers,
causing layout bugs. And buttons or links created by "createDOMElement"
(without an accessibility role) do not have the correct props.

Solution:

The "button" role is rendered to a "div[role=button]" that is focusable
and responds to the same keyboard events as a native button. A native
button can still be rendered using "createDOMElement".

Make "createDOMProps" aware of the component context to ensure style
resets and other props are correctly applied when an accessibility role
is not defined.

Additionally:

This patch also adds a new "label" role to support accessible forms.
It maps to a native label element.

Close #241
2017-07-09 16:14:40 -07:00
2017-06-15 19:29:56 -07:00
2017-06-09 11:56:14 -07:00
2017-05-25 23:10:37 -07:00
2017-05-24 15:21:25 -07:00
2016-02-16 23:43:41 -08:00
2017-07-03 12:33:31 -07:00
2017-06-29 11:33:25 -07:00
2017-05-24 15:21:25 -07:00
2017-06-29 11:33:25 -07:00

React Native for Web

Build Status npm version

React Native components and APIs for the Web.

Browser support: Chrome, Firefox, Safari >= 7, IE 10, Edge.

Overview

"React Native for Web" is a project to bring React Native's building blocks and touch handling to the Web.

Browse the UI Explorer to see React Native examples running on Web. Or try it out online with React Native for Web: Playground.

Quick start

To install in your app:

npm install --save react@15.6 react-dom@15.6 react-native-web

NOTE: React Native for Web supports React/ReactDOM 15.4, 15.5, or 15.6.

Then read the Getting Started guide.

Documentation

The UI Explorer interactively documents all the APIs and Components.

Guides:

Example code

import React from 'react'
import { AppRegistry, Image, StyleSheet, Text, View } from 'react-native'

// Components
const Card = ({ children }) => <View style={styles.card}>{children}</View>
const Title = ({ children }) => <Text style={styles.title}>{children}</Text>
const Photo = ({ uri }) => <Image source={{ uri }} style={styles.image} />
const App = () => (
  <Card>
    <Title>App Card</Title>
    <Photo uri="/some-photo.jpg" />
  </Card>
)

// Styles
const styles = StyleSheet.create({
  card: {
    flexGrow: 1,
    justifyContent: 'center'
  },
  title: {
    fontSize: '1.25rem',
    fontWeight: 'bold'
  },
  image: {
    height: 40,
    marginVertical: 10,
    width: 40
  }
})

// App registration and rendering
AppRegistry.registerComponent('MyApp', () => App)
AppRegistry.runApplication('MyApp', { rootTag: document.getElementById('react-root') })

License

React Native for Web is BSD licensed.

Description
No description provided
Readme MIT 24 MiB
Languages
JavaScript 99.7%
HTML 0.2%