1*55058f92SEvan Bacon<h1 align="center">@expo/html-elements</h1> 2*55058f92SEvan Bacon 3*55058f92SEvan Bacon<img alt="Product: demo" src="https://dev-to-uploads.s3.amazonaws.com/i/xoc3yx7qfqf6e1w6mm2e.png" /> 4*55058f92SEvan Bacon 5*55058f92SEvan Bacon<p align="center"> 6*55058f92SEvan Bacon <!-- iOS --> 7*55058f92SEvan Bacon <img alt="Supports Expo iOS" longdesc="Supports Expo iOS" src="https://img.shields.io/badge/iOS-4630EB.svg?style=flat-square&logo=APPLE&labelColor=999999&logoColor=fff" /> 8*55058f92SEvan Bacon <!-- Android --> 9*55058f92SEvan Bacon <img alt="Supports Expo Android" longdesc="Supports Expo Android" src="https://img.shields.io/badge/Android-4630EB.svg?style=flat-square&logo=ANDROID&labelColor=A4C639&logoColor=fff" /> 10*55058f92SEvan Bacon <!-- Web --> 11*55058f92SEvan Bacon <img alt="Supports Expo Web" longdesc="Supports Expo Web" src="https://img.shields.io/badge/web-4630EB.svg?style=flat-square&logo=GOOGLE-CHROME&labelColor=4285F4&logoColor=fff" /> 12*55058f92SEvan Bacon <a aria-label="Circle CI" href="https://circleci.com/gh/expo/expo/tree/master"> 13*55058f92SEvan Bacon <img alt="Circle CI" src="https://flat.badgen.net/circleci/github/expo/expo?label=Circle%20CI&labelColor=555555&icon=circleci"> 14*55058f92SEvan Bacon </a> 15*55058f92SEvan Bacon</p> 16*55058f92SEvan Bacon 17*55058f92SEvan BaconSimple, light-weight, and well tested, universal semantic HTML elements as React components for iOS, Android, web, and desktop apps! 18*55058f92SEvan Bacon 19*55058f92SEvan BaconWe at Expo recommend using platform agnostic primitives like `View`, `Image`, and `Text` whenever possible but sometimes that's not easy. Some primitives like Tables, and Footers are native to web only and currently have no way of easily accessing. This package aims to solve that while still being an optimal UI package for iOS, and Android. 20*55058f92SEvan Bacon 21*55058f92SEvan Bacon### What you get 22*55058f92SEvan Bacon 23*55058f92SEvan Bacon- Using `@expo/html-elements` will optimize your website for SEO and accessibility. Meaning your websites are indexed more accurately and your native apps better accommodate physically impaired users. 24*55058f92SEvan Bacon - This package takes full advantage of [`react-native-web` a11y rules](https://github.com/necolas/react-native-web/blob/master/packages/docs/src/guides/accessibility.stories.mdx) whenever possible. 25*55058f92SEvan Bacon - For example, the `H1` component will render an `<h1 />` on web, a `UILabel` on iOS, and a `TextView` on Android. 26*55058f92SEvan Bacon- Every component can accept styles from the `StyleSheet` API. 27*55058f92SEvan Bacon- TypeScript works for iOS, Android, and web, no more having to create monkey patches to use `href` on a `Text` element. 28*55058f92SEvan Bacon- Every component is tested render **tested universally** for iOS, Android, and Web using the package [`jest-expo-enzyme`](https://www.npmjs.com/package/jest-expo-enzyme). Each element is also **E2E tested** on iOS with Detox, and web with [`jest-expo-puppeteer`](https://www.npmjs.com/package/jest-expo-puppeteer). 29*55058f92SEvan Bacon- This package is completely side-effect free! 30*55058f92SEvan Bacon 31*55058f92SEvan Bacon## Setup 32*55058f92SEvan Bacon 33*55058f92SEvan BaconInstall: 34*55058f92SEvan Bacon 35*55058f92SEvan Bacon```sh 36*55058f92SEvan Baconyarn add @expo/html-elements 37*55058f92SEvan Bacon``` 38*55058f92SEvan Bacon 39*55058f92SEvan BaconImport and use the package: 40*55058f92SEvan Bacon 41*55058f92SEvan Bacon```tsx 42*55058f92SEvan Baconimport { H1 } from '@expo/html-elements'; 43*55058f92SEvan Bacon``` 44*55058f92SEvan Bacon 45*55058f92SEvan Bacon# Components 46*55058f92SEvan Bacon 47*55058f92SEvan BaconHere is a list of all the currently supported elements and the web feature they map to. Not all HTML elements are supported. There are some HTML elements that mostly overlap with some universal modules, you should always try to use the universal modules whenever possible. All supported components are a capitalized variation of the semantic HTML they implement/emulate. 48*55058f92SEvan Bacon 49*55058f92SEvan Bacon| HTML | `@expo/html-elements` | 50*55058f92SEvan Bacon| ----------------------------------- | :-----------------------------: | 51*55058f92SEvan Bacon| [`<a />`][html-a] | [`<A />`](#a) | 52*55058f92SEvan Bacon| [`<article />`][html-article] | [`<Article />`](#article) | 53*55058f92SEvan Bacon| [`<b />`][html-b] | [`<B />`](#b) | 54*55058f92SEvan Bacon| [`<blockquote />`][html-blockquote] | [`<BlockQuote />`](#blockquote) | 55*55058f92SEvan Bacon| [`<br />`][html-br] | [`<BR />`](#br) | 56*55058f92SEvan Bacon| [`<caption />`][html-caption] | [`<Caption />`](#caption) | 57*55058f92SEvan Bacon| [`<code />`][html-code] | [`<Code />`](#code) | 58*55058f92SEvan Bacon| [`<del />`][html-del] | [`<Del />`](#del) | 59*55058f92SEvan Bacon| [`<em />`][html-em] | [`<EM />`](#em) | 60*55058f92SEvan Bacon| [`<footer />`][html-footer] | [`<Footer />`](#footer) | 61*55058f92SEvan Bacon| [`<h1 />`][html-h1] | [`<H1 />`](#h1) | 62*55058f92SEvan Bacon| [`<h2 />`][html-h2] | [`<H2 />`](#h2) | 63*55058f92SEvan Bacon| [`<h3 />`][html-h3] | [`<H3 />`](#h3) | 64*55058f92SEvan Bacon| [`<h4 />`][html-h4] | [`<H4 />`](#h4) | 65*55058f92SEvan Bacon| [`<h5 />`][html-h5] | [`<H5 />`](#h5) | 66*55058f92SEvan Bacon| [`<h6 />`][html-h6] | [`<H6 />`](#h6) | 67*55058f92SEvan Bacon| [`<header />`][html-header] | [`<Header />`](#header) | 68*55058f92SEvan Bacon| [`<hr />`][html-hr] | [`<HR />`](#hr) | 69*55058f92SEvan Bacon| [`<i />`][html-i] | [`<I />`](#i) | 70*55058f92SEvan Bacon| [`<main />`][html-main] | [`<Main />`](#main) | 71*55058f92SEvan Bacon| [`<mark />`][html-mark] | [`<Mark />`](#mark) | 72*55058f92SEvan Bacon| [`<nav />`][html-nav] | [`<Nav />`](#nav) | 73*55058f92SEvan Bacon| [`<ol />`][html-ol] | [`<OL />`](#ol) | 74*55058f92SEvan Bacon| [`<p />`][html-p] | [`<P />`](#p) | 75*55058f92SEvan Bacon| [`<pre />`][html-pre] | [`<Pre />`](#pre) | 76*55058f92SEvan Bacon| [`<q />`][html-q] | [`<Q />`](#q) | 77*55058f92SEvan Bacon| [`<s />`][html-s] | [`<S />`](#s) | 78*55058f92SEvan Bacon| [`<section />`][html-section] | [`<Section />`](#section) | 79*55058f92SEvan Bacon| [`<small />`][html-small] | [`<Small />`](#small) | 80*55058f92SEvan Bacon| [`<strong />`][html-strong] | [`<Strong />`](#strong) | 81*55058f92SEvan Bacon| [`<table />`][html-table] | [`<Table />`](#table) | 82*55058f92SEvan Bacon| [`<tbody />`][html-tbody] | [`<TBody />`](#tbody) | 83*55058f92SEvan Bacon| [`<td />`][html-td] | [`<TD />`](#td) | 84*55058f92SEvan Bacon| [`<tfoot />`][html-tfoot] | [`<TFoot />`](#tfoot) | 85*55058f92SEvan Bacon| [`<th />`][html-th] | [`<TH />`](#th) | 86*55058f92SEvan Bacon| [`<thead />`][html-thead] | [`<THead />`](#thead) | 87*55058f92SEvan Bacon| [`<time />`][html-time] | [`<Time />`](#time) | 88*55058f92SEvan Bacon| [`<tr />`][html-tr] | [`<TR />`](#tr) | 89*55058f92SEvan Bacon| [`<ul />`][html-ul] | [`<UL />`](#ul) | 90*55058f92SEvan Bacon| [`<li />`][html-li] | [`<LI />`](#li) | 91*55058f92SEvan Bacon| [`<details />`][html-details] | ⏱ Pending | 92*55058f92SEvan Bacon| [`<summary />`][html-summary] | ⏱ Pending | 93*55058f92SEvan Bacon| [`<progress />`][html-progress] | ⏱ Pending | 94*55058f92SEvan Bacon| [`<select />`][html-select] | ⏱ Pending | 95*55058f92SEvan Bacon| [`<picture />`][html-picture] | ⏱ Pending | 96*55058f92SEvan Bacon| [`<figure />`][html-figure] | ⏱ Pending | 97*55058f92SEvan Bacon| [`<figcaption />`][html-figcaption] | ⏱ Pending | 98*55058f92SEvan Bacon 99*55058f92SEvan Bacon## External 100*55058f92SEvan Bacon 101*55058f92SEvan BaconOther features not implemented in this package can be found in different parts of the Expo ecosystem. 102*55058f92SEvan Bacon 103*55058f92SEvan Bacon| HTML | Universal | Package | 104*55058f92SEvan Bacon| ------------------------------- | :------------------: | :--------------------------------------------------------------------------------------------------------------------: | 105*55058f92SEvan Bacon| `<audio />` | `Audio` | [`expo-av`][ex-audio] | 106*55058f92SEvan Bacon| `<button />` | `<Button />` | `react-native` | 107*55058f92SEvan Bacon| `<input type="text" />` | `<TextView />` | `react-native` | 108*55058f92SEvan Bacon| `<input type="file" />` | `ImagePicker` | [`expo-image-picker`][ex-ipick] | 109*55058f92SEvan Bacon| `<input type="file" />` | `DocumentPicker` | [`expo-document-picker`][ex-dpick] | 110*55058f92SEvan Bacon| `<canvas />` | `<GLView />` | [`expo-gl`][ex-gl] & [Expo Canvas][ex-canvas] | 111*55058f92SEvan Bacon| `<iframe />` | `<WebView />` | [`<WebView />`][ex-webview]. `@react-native-community/web-view` is not maintained by Expo and doesn't have web support | 112*55058f92SEvan Bacon| [`<link />`][html-link] | None | Eject the `index.html` with `expo customize:web` and link resources directly with `<link />` | 113*55058f92SEvan Bacon| [`<noscript />`][html-noscript] | None | Eject the `index.html` with `expo customize:web` and use `<noscript />` directly as HTML | 114*55058f92SEvan Bacon| `<div />` | `<View />` | `react-native` | 115*55058f92SEvan Bacon| `<img />` | `<Image />` | `react-native` | 116*55058f92SEvan Bacon| `<span />` | `<Text />` | `react-native` | 117*55058f92SEvan Bacon| `<video />` | `<Video />` | [`expo-av`][ex-vid] | 118*55058f92SEvan Bacon| `style="backdrop-filter"` | `<BlurView />` | [`expo-blur`][ex-blur] | 119*55058f92SEvan Bacon| `style="linear-gradient()"` | `<LinearGradient />` | [`expo-linear-gradient`][ex-gradient] | 120*55058f92SEvan Bacon 121*55058f92SEvan Bacon[ex-gradient]: https://docs.expo.io/versions/latest/sdk/linear-gradient/ 122*55058f92SEvan Bacon[ex-webview]: https://docs.expo.io/versions/latest/sdk/webview/ 123*55058f92SEvan Bacon[ex-audio]: https://docs.expo.io/versions/latest/sdk/audio 124*55058f92SEvan Bacon[ex-gl]: https://docs.expo.io/versions/latest/sdk/gl-view 125*55058f92SEvan Bacon[ex-canvas]: https://github.com/expo/expo-2d-context 126*55058f92SEvan Bacon[html-noscript]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript 127*55058f92SEvan Bacon[html-link]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link 128*55058f92SEvan Bacon[ex-blur]: https://docs.expo.io/versions/latest/sdk/blur-view/ 129*55058f92SEvan Bacon[ex-vid]: https://docs.expo.io/versions/latest/sdk/video/ 130*55058f92SEvan Bacon[ex-ipick]: https://docs.expo.io/versions/latest/sdk/imagepicker/ 131*55058f92SEvan Bacon[ex-dpick]: https://docs.expo.io/versions/latest/sdk/document-picker/ 132*55058f92SEvan Bacon 133*55058f92SEvan Bacon## Headings 134*55058f92SEvan Bacon 135*55058f92SEvan BaconHeader elements will use the expected [font size and margins from web](http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css) universally. You can see how the native CSS units (rem, and em) are transformed in [css/units](src/css/units.ts). 136*55058f92SEvan Bacon 137*55058f92SEvan Bacon```tsx 138*55058f92SEvan Baconimport { H1, H2, H3, H4, H5, H6 } from '@expo/html-elements'; 139*55058f92SEvan Bacon``` 140*55058f92SEvan Bacon 141*55058f92SEvan Bacon### `<H1/>` 142*55058f92SEvan Bacon 143*55058f92SEvan Bacon```tsx 144*55058f92SEvan Baconimport { H1 } from '@expo/html-elements'; 145*55058f92SEvan Baconexport default () => <H1>Example<H1/> 146*55058f92SEvan Bacon``` 147*55058f92SEvan Bacon 148*55058f92SEvan Bacon| Platform | Output | 149*55058f92SEvan Bacon| -------- | ------------------------------------------------------ | 150*55058f92SEvan Bacon| Web | `<h1 aria-level="1" dir="auto" role="heading" />` | 151*55058f92SEvan Bacon| Native | `<Text accessibilityRole="header" style={[Custom]} />` | 152*55058f92SEvan Bacon 153*55058f92SEvan Bacon### `<H2/>` 154*55058f92SEvan Bacon 155*55058f92SEvan Bacon```tsx 156*55058f92SEvan Baconimport { H2 } from '@expo/html-elements'; 157*55058f92SEvan Baconexport default () => <H2>Example<H2/> 158*55058f92SEvan Bacon``` 159*55058f92SEvan Bacon 160*55058f92SEvan Bacon| Platform | Output | 161*55058f92SEvan Bacon| -------- | ------------------------------------------------------ | 162*55058f92SEvan Bacon| Web | `<h2 aria-level="2" dir="auto" role="heading" />` | 163*55058f92SEvan Bacon| Native | `<Text accessibilityRole="header" style={[Custom]} />` | 164*55058f92SEvan Bacon 165*55058f92SEvan Bacon### `<H3/>` 166*55058f92SEvan Bacon 167*55058f92SEvan Bacon```tsx 168*55058f92SEvan Baconimport { H3 } from '@expo/html-elements'; 169*55058f92SEvan Baconexport default () => <H3>Example<H3/> 170*55058f92SEvan Bacon``` 171*55058f92SEvan Bacon 172*55058f92SEvan Bacon| Platform | Output | 173*55058f92SEvan Bacon| -------- | ------------------------------------------------------ | 174*55058f92SEvan Bacon| Web | `<h3 aria-level="3" dir="auto" role="heading" />` | 175*55058f92SEvan Bacon| Native | `<Text accessibilityRole="header" style={[Custom]} />` | 176*55058f92SEvan Bacon 177*55058f92SEvan Bacon### `<H4/>` 178*55058f92SEvan Bacon 179*55058f92SEvan Bacon```tsx 180*55058f92SEvan Baconimport { H4 } from '@expo/html-elements'; 181*55058f92SEvan Baconexport default () => <H4>Example<H4/> 182*55058f92SEvan Bacon``` 183*55058f92SEvan Bacon 184*55058f92SEvan Bacon| Platform | Output | 185*55058f92SEvan Bacon| -------- | ------------------------------------------------------ | 186*55058f92SEvan Bacon| Web | `<h4 aria-level="4" dir="auto" role="heading" />` | 187*55058f92SEvan Bacon| Native | `<Text accessibilityRole="header" style={[Custom]} />` | 188*55058f92SEvan Bacon 189*55058f92SEvan Bacon### `<H5/>` 190*55058f92SEvan Bacon 191*55058f92SEvan Bacon```tsx 192*55058f92SEvan Baconimport { H5 } from '@expo/html-elements'; 193*55058f92SEvan Baconexport default () => <H5>Example<H5/> 194*55058f92SEvan Bacon``` 195*55058f92SEvan Bacon 196*55058f92SEvan Bacon| Platform | Output | 197*55058f92SEvan Bacon| -------- | ------------------------------------------------------ | 198*55058f92SEvan Bacon| Web | `<h5 aria-level="5" dir="auto" role="heading" />` | 199*55058f92SEvan Bacon| Native | `<Text accessibilityRole="header" style={[Custom]} />` | 200*55058f92SEvan Bacon 201*55058f92SEvan Bacon### `<H6/>` 202*55058f92SEvan Bacon 203*55058f92SEvan Bacon```tsx 204*55058f92SEvan Baconimport { H6 } from '@expo/html-elements'; 205*55058f92SEvan Baconexport default () => <H6>Example<H6/> 206*55058f92SEvan Bacon``` 207*55058f92SEvan Bacon 208*55058f92SEvan Bacon| Platform | Output | 209*55058f92SEvan Bacon| -------- | ------------------------------------------------------ | 210*55058f92SEvan Bacon| Web | `<h6 aria-level="6" dir="auto" role="heading" />` | 211*55058f92SEvan Bacon| Native | `<Text accessibilityRole="header" style={[Custom]} />` | 212*55058f92SEvan Bacon 213*55058f92SEvan Bacon## Link 214*55058f92SEvan Bacon 215*55058f92SEvan Bacon### `<A/>` 216*55058f92SEvan Bacon 217*55058f92SEvan BaconYou can use the anchor element with href prop to open links. On native this will attempt to use the `Linking` API to open the `href`. 218*55058f92SEvan Bacon 219*55058f92SEvan Bacon- The CSS style is fully normalized to match `<Text />` 220*55058f92SEvan Bacon- For pseudo-class effects like hover and focus states check out the package [`react-native-web-hooks`](https://www.npmjs.com/package/react-native-web-hooks) | [tutorial](https://blog.expo.io/css-pseudo-class-effects-in-expo-for-web-56649f88eb6b) 221*55058f92SEvan Bacon 222*55058f92SEvan Bacon```tsx 223*55058f92SEvan Baconimport { A } from '@expo/html-elements'; 224*55058f92SEvan Bacon 225*55058f92SEvan Baconexport default () => <A href="#" target="_blank" />; 226*55058f92SEvan Bacon} 227*55058f92SEvan Bacon``` 228*55058f92SEvan Bacon 229*55058f92SEvan Bacon| Platform | Output | 230*55058f92SEvan Bacon| -------- | ------------------------------------------------------------------------------- | 231*55058f92SEvan Bacon| Web | `<a data-focusable="{true}" dir="auto" href="#" role="link" target="_blank" />` | 232*55058f92SEvan Bacon| Native | `<Text accessibilityRole="link" onPress={[Function]} />` | 233*55058f92SEvan Bacon 234*55058f92SEvan Bacon## Layout 235*55058f92SEvan Bacon 236*55058f92SEvan BaconYou can use layout elements like Header, Main, Footer, Section, Nav, etc. as a drop-in replacement for `View`s in your existing app. 237*55058f92SEvan Bacon 238*55058f92SEvan Bacon#### Default Layout style 239*55058f92SEvan Bacon 240*55058f92SEvan BaconAll layout HTML elements inherit the shared style of `<View />` to accommodate the [Yoga layout engine][yoga] which we use on native for iOS, and Android. 241*55058f92SEvan Bacon 242*55058f92SEvan Bacon- `display` is always `flex`. This is because [Yoga][yoga] only implements `display: flex`. 243*55058f92SEvan Bacon- `flex-direction` is always `column` instead of `row`. 244*55058f92SEvan Bacon 245*55058f92SEvan Bacon#### Why use Layout elements 246*55058f92SEvan Bacon 247*55058f92SEvan BaconConsider the following: in your app you have a basic element at the top which wraps the buttons and title. A screen reader doesn't understand that this is a header, and mostly neither does a web crawler. But if you replace the encasing view with a `<Header />` the following happens: 248*55058f92SEvan Bacon 249*55058f92SEvan Bacon- **iOS**: `UIView` uses [`UIAccessibilityTraitHeader`](https://developer.apple.com/documentation/uikit/uiaccessibilitytraitheader?language=objc). 250*55058f92SEvan Bacon- **Android**: `View` will use the proper [`AccessibilityNodeInfoCompat.CollectionItemInfoCompat`](https://github.com/facebook/react-native/blob/7428271995adf21b2b31b188ed83b785ce1e9189/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java#L370-L372) | [docs](https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat). 251*55058f92SEvan Bacon- **web**: render an HTML 5 [`<header />`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header) with the ARIA `role` set to [`"banner"`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Banner_role). 252*55058f92SEvan Bacon 253*55058f92SEvan BaconSome elements like `Footer` and `Main` have no iOS, or Android enhancements, but they'll still improve web. Using the proper HTML 5 elements will make your layout compliant with the [HTML5 outline algorithm](https://html.spec.whatwg.org/multipage/sections.html#outlines). 254*55058f92SEvan Bacon 255*55058f92SEvan Bacon### `<Nav/>` 256*55058f92SEvan Bacon 257*55058f92SEvan Bacon```tsx 258*55058f92SEvan Baconimport { Nav } from '@expo/html-elements'; 259*55058f92SEvan Bacon 260*55058f92SEvan Baconexport default () => <Nav />; 261*55058f92SEvan Bacon``` 262*55058f92SEvan Bacon 263*55058f92SEvan Bacon| Platform | Output | 264*55058f92SEvan Bacon| -------- | ------------------------------ | 265*55058f92SEvan Bacon| Web | `<nav style="display:flex" />` | 266*55058f92SEvan Bacon| Native | `<View />` | 267*55058f92SEvan Bacon 268*55058f92SEvan Bacon### `<Header/>` 269*55058f92SEvan Bacon 270*55058f92SEvan BaconRenders a `<header />` on web with ARIA set to [`banner`][aria-banner] and a `View` with ARIA set to `header` on mobile. 271*55058f92SEvan Bacon 272*55058f92SEvan Bacon```tsx 273*55058f92SEvan Baconimport { Header } from '@expo/html-elements'; 274*55058f92SEvan Bacon 275*55058f92SEvan Baconexport default () => <Header />; 276*55058f92SEvan Bacon``` 277*55058f92SEvan Bacon 278*55058f92SEvan Bacon| Platform | Output | 279*55058f92SEvan Bacon| -------- | ------------------------------------------------------------------------------------------------------------------- | 280*55058f92SEvan Bacon| Web | [`<header role="banner" />`][html-header] | 281*55058f92SEvan Bacon| Native | `<View />` | 282*55058f92SEvan Bacon| iOS | `UIView` uses [`UIAccessibilityTraitHeader`][uiatheader]. | 283*55058f92SEvan Bacon| Android | `View` will use the proper [`AccessibilityNodeInfoCompat.CollectionItemInfoCompat`][anicompat] [docs][anicompatdoc] | 284*55058f92SEvan Bacon 285*55058f92SEvan Bacon[uiatheader]: https://developer.apple.com/documentation/uikit/uiaccessibilitytraitheader?language=objc 286*55058f92SEvan Bacon[anicompat]: https://github.com/facebook/react-native/blob/7428271995adf21b2b31b188ed83b785ce1e9189/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java#L370-L372 287*55058f92SEvan Bacon[anicompatdoc]: https://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat 288*55058f92SEvan Bacon 289*55058f92SEvan Bacon### `<Main/>` 290*55058f92SEvan Bacon 291*55058f92SEvan BaconRenders a `<main />` on web with ARIA `role` set to `main` and a `View` with no ARIA set on mobile. 292*55058f92SEvan Bacon 293*55058f92SEvan Bacon```tsx 294*55058f92SEvan Baconimport { Main } from '@expo/html-elements'; 295*55058f92SEvan Bacon 296*55058f92SEvan Baconexport default () => ( 297*55058f92SEvan Bacon <Main> 298*55058f92SEvan Bacon <P>Some content in the main element</P> 299*55058f92SEvan Bacon </Main> 300*55058f92SEvan Bacon ); 301*55058f92SEvan Bacon) 302*55058f92SEvan Bacon``` 303*55058f92SEvan Bacon 304*55058f92SEvan Bacon| Platform | Output | 305*55058f92SEvan Bacon| -------- | ------------------------------------------- | 306*55058f92SEvan Bacon| Web | `<main role="main" style="display:flex" />` | 307*55058f92SEvan Bacon| Native | `<View />` | 308*55058f92SEvan Bacon 309*55058f92SEvan Bacon### `<Section/>` 310*55058f92SEvan Bacon 311*55058f92SEvan BaconRenders a `<section />` on web with ARIA set to `region` and a `View` with ARIA set to `summary` on mobile. 312*55058f92SEvan Bacon 313*55058f92SEvan Bacon```tsx 314*55058f92SEvan Baconimport { Section } from '@expo/html-elements'; 315*55058f92SEvan Bacon 316*55058f92SEvan Baconexport default () => <Section />; 317*55058f92SEvan Bacon``` 318*55058f92SEvan Bacon 319*55058f92SEvan Bacon| Platform | Output | 320*55058f92SEvan Bacon| -------- | ------------------------------------------------ | 321*55058f92SEvan Bacon| Web | `<section role="region" style="display:flex" />` | 322*55058f92SEvan Bacon| Native | `<View accessibilityRole="summary" />` | 323*55058f92SEvan Bacon 324*55058f92SEvan Bacon### `<Article/>` 325*55058f92SEvan Bacon 326*55058f92SEvan BaconRenders an `<article />` on web and a `View` everywhere else. 327*55058f92SEvan Bacon 328*55058f92SEvan Bacon```tsx 329*55058f92SEvan Baconimport { Article } from '@expo/html-elements'; 330*55058f92SEvan Bacon 331*55058f92SEvan Baconexport default () => <Article />; 332*55058f92SEvan Bacon``` 333*55058f92SEvan Bacon 334*55058f92SEvan Bacon| Platform | Output | 335*55058f92SEvan Bacon| -------- | ------------------------------------------------- | 336*55058f92SEvan Bacon| Web | `<article role="article" style="display:flex" />` | 337*55058f92SEvan Bacon| Native | `<View />` | 338*55058f92SEvan Bacon 339*55058f92SEvan Bacon### `<Footer/>` 340*55058f92SEvan Bacon 341*55058f92SEvan BaconRenders an `<footer />` on web and a `View` everywhere else. 342*55058f92SEvan Bacon 343*55058f92SEvan Bacon```tsx 344*55058f92SEvan Baconimport { Footer } from '@expo/html-elements'; 345*55058f92SEvan Bacon 346*55058f92SEvan Baconexport default () => <Footer />; 347*55058f92SEvan Bacon``` 348*55058f92SEvan Bacon 349*55058f92SEvan Bacon| Platform | Output | 350*55058f92SEvan Bacon| -------- | --------------------------------- | 351*55058f92SEvan Bacon| Web | `<footer style="display:flex" />` | 352*55058f92SEvan Bacon| Native | `<View />` | 353*55058f92SEvan Bacon 354*55058f92SEvan Bacon## Text 355*55058f92SEvan Bacon 356*55058f92SEvan BaconWraps the primitive `Text` element on native and renders the expected HTML on web. 357*55058f92SEvan Bacon 358*55058f92SEvan Bacon- Style is slightly modified to match web. 359*55058f92SEvan Bacon- All font styles are reset. 360*55058f92SEvan Bacon- All elements accept styles from `StyleSheet` API. 361*55058f92SEvan Bacon 362*55058f92SEvan Bacon```tsx 363*55058f92SEvan Baconimport { P, B, S, I, BR, Small, Code } from '@expo/html-elements'; 364*55058f92SEvan Bacon 365*55058f92SEvan Baconexport default () => ( 366*55058f92SEvan Bacon <> 367*55058f92SEvan Bacon <P> 368*55058f92SEvan Bacon Hello<B>World (in bold)</B> 369*55058f92SEvan Bacon </P> 370*55058f92SEvan Bacon <S>strike text</S> 371*55058f92SEvan Bacon <BR /> 372*55058f92SEvan Bacon <I>Italic</I> 373*55058f92SEvan Bacon <Code>const foo = true</Code> 374*55058f92SEvan Bacon <Small>Small text</Small> 375*55058f92SEvan Bacon </> 376*55058f92SEvan Bacon); 377*55058f92SEvan Bacon``` 378*55058f92SEvan Bacon 379*55058f92SEvan Bacon### `<P/>` 380*55058f92SEvan Bacon 381*55058f92SEvan BaconStandard paragraph element. 382*55058f92SEvan Bacon 383*55058f92SEvan Bacon| Platform | Output | 384*55058f92SEvan Bacon| -------- | ------------------------------------------------------------- | 385*55058f92SEvan Bacon| Web | `<p style={{ fontFamily: 'System' }} />` | 386*55058f92SEvan Bacon| Native | `<Text style={{ fontSize: '1em', marginVertical: '1em' }} />` | 387*55058f92SEvan Bacon 388*55058f92SEvan Bacon### `<B/>` 389*55058f92SEvan Bacon 390*55058f92SEvan BaconBold text text. 391*55058f92SEvan Bacon 392*55058f92SEvan Bacon| Platform | Output | 393*55058f92SEvan Bacon| -------- | ----------------------------------------- | 394*55058f92SEvan Bacon| Web | `<b style={{ fontFamily: 'System' }} />` | 395*55058f92SEvan Bacon| Native | `<Text style={{ fontWeight: 'bold' }} />` | 396*55058f92SEvan Bacon 397*55058f92SEvan Bacon### `<Strong/>` 398*55058f92SEvan Bacon 399*55058f92SEvan BaconAlternate bold text. 400*55058f92SEvan Bacon 401*55058f92SEvan Bacon| Platform | Output | 402*55058f92SEvan Bacon| -------- | --------------------------------------------- | 403*55058f92SEvan Bacon| Web | `<strong style={{ fontFamily: 'System' }} />` | 404*55058f92SEvan Bacon| Native | `<Text style={{ fontWeight: 'bold' }} />` | 405*55058f92SEvan Bacon 406*55058f92SEvan Bacon### `<S/>` 407*55058f92SEvan Bacon 408*55058f92SEvan BaconStrike through text. 409*55058f92SEvan Bacon 410*55058f92SEvan Bacon| Platform | Output | 411*55058f92SEvan Bacon| -------- | --------------------------------------------------------- | 412*55058f92SEvan Bacon| Web | `<s style={{ fontFamily: 'System' }} />` | 413*55058f92SEvan Bacon| Native | `<Text style={{ textDecorationLine: 'line-through' }} />` | 414*55058f92SEvan Bacon 415*55058f92SEvan Bacon### `<Del/>` 416*55058f92SEvan Bacon 417*55058f92SEvan BaconAlternate strike through text. 418*55058f92SEvan Bacon 419*55058f92SEvan Bacon| Platform | Output | 420*55058f92SEvan Bacon| -------- | --------------------------------------------------------- | 421*55058f92SEvan Bacon| Web | `<del style={{ fontFamily: 'System' }} />` | 422*55058f92SEvan Bacon| Native | `<Text style={{ textDecorationLine: 'line-through' }} />` | 423*55058f92SEvan Bacon 424*55058f92SEvan Bacon### `<I/>` 425*55058f92SEvan Bacon 426*55058f92SEvan BaconItalic text. 427*55058f92SEvan Bacon 428*55058f92SEvan Bacon| Platform | Output | 429*55058f92SEvan Bacon| -------- | ------------------------------------------ | 430*55058f92SEvan Bacon| Web | `<i style={{ fontFamily: 'System' }} />` | 431*55058f92SEvan Bacon| Native | `<Text style={{ fontStyle: 'italic' }} />` | 432*55058f92SEvan Bacon 433*55058f92SEvan Bacon### `<EM/>` 434*55058f92SEvan Bacon 435*55058f92SEvan BaconAlternate italic text. 436*55058f92SEvan Bacon 437*55058f92SEvan Bacon| Platform | Output | 438*55058f92SEvan Bacon| -------- | ------------------------------------------ | 439*55058f92SEvan Bacon| Web | `<em style={{ fontFamily: 'System' }} />` | 440*55058f92SEvan Bacon| Native | `<Text style={{ fontStyle: 'italic' }} />` | 441*55058f92SEvan Bacon 442*55058f92SEvan Bacon### `<Small/>` 443*55058f92SEvan Bacon 444*55058f92SEvan BaconSmaller than default text. 445*55058f92SEvan Bacon 446*55058f92SEvan Bacon| Platform | Output | 447*55058f92SEvan Bacon| -------- | -------------------------------------------- | 448*55058f92SEvan Bacon| Web | `<small style={{ fontFamily: 'System' }} />` | 449*55058f92SEvan Bacon| Native | `<Text style={{ fontSize: 10 }} />` | 450*55058f92SEvan Bacon 451*55058f92SEvan Bacon### `<Code/>` 452*55058f92SEvan Bacon 453*55058f92SEvan BaconInline code block. 454*55058f92SEvan Bacon 455*55058f92SEvan Bacon- [ ] Support lazy loading mono font on mobile. 456*55058f92SEvan Bacon 457*55058f92SEvan Bacon| Platform | Output | 458*55058f92SEvan Bacon| -------- | --------------------------- | 459*55058f92SEvan Bacon| Web | `<code />` | 460*55058f92SEvan Bacon| Native | `<Text style={[Custom]} />` | 461*55058f92SEvan Bacon 462*55058f92SEvan Bacon### `<Pre/>` 463*55058f92SEvan Bacon 464*55058f92SEvan BaconRender a preformatted code block: 465*55058f92SEvan Bacon 466*55058f92SEvan Bacon```jsx 467*55058f92SEvan Bacon<Pre>{` 468*55058f92SEvan Baconbody { 469*55058f92SEvan Bacon color: red; 470*55058f92SEvan Bacon} 471*55058f92SEvan Bacon`}</Pre> 472*55058f92SEvan Bacon 473*55058f92SEvan Bacon// Or pass views 474*55058f92SEvan Bacon 475*55058f92SEvan Bacon<Pre> 476*55058f92SEvan Bacon <Code>{`const val = true`}</Code> 477*55058f92SEvan Bacon</Pre> 478*55058f92SEvan Bacon``` 479*55058f92SEvan Bacon 480*55058f92SEvan Bacon- [ ] Support lazy loading mono font on mobile. 481*55058f92SEvan Bacon 482*55058f92SEvan Bacon| Platform | Output | 483*55058f92SEvan Bacon| -------- | ----------------------------------------- | 484*55058f92SEvan Bacon| Web | `<pre />` | 485*55058f92SEvan Bacon| Native | `<Text style={[Custom]} />` \| `<View />` | 486*55058f92SEvan Bacon 487*55058f92SEvan Bacon### `<Mark/>` 488*55058f92SEvan Bacon 489*55058f92SEvan BaconHighlight text. 490*55058f92SEvan Bacon 491*55058f92SEvan Bacon| Platform | Output | 492*55058f92SEvan Bacon| -------- | ---------------------------------------------------------------- | 493*55058f92SEvan Bacon| Web | `<mark />` | 494*55058f92SEvan Bacon| Native | `<Text style={{ backgroundColor: 'yellow', color: 'black' }} />` | 495*55058f92SEvan Bacon 496*55058f92SEvan Bacon### `<Q/>` 497*55058f92SEvan Bacon 498*55058f92SEvan BaconQuoted text. 499*55058f92SEvan Bacon 500*55058f92SEvan Bacon| Platform | Output | 501*55058f92SEvan Bacon| -------- | -------------------------------------------------- | 502*55058f92SEvan Bacon| Web | `<q />` | 503*55058f92SEvan Bacon| Native | `<Text style={[Custom]}>"{props.children}"</Text>` | 504*55058f92SEvan Bacon 505*55058f92SEvan Bacon### `<BlockQuote/>` 506*55058f92SEvan Bacon 507*55058f92SEvan BaconRender a [`<blockquote />`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote) on web, and a `<View />` on native. This element doesn't accept text directly. 508*55058f92SEvan Bacon 509*55058f92SEvan Bacon| Platform | Output | 510*55058f92SEvan Bacon| -------- | --------------------------- | 511*55058f92SEvan Bacon| Web | `<blockquote />` | 512*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 513*55058f92SEvan Bacon 514*55058f92SEvan Bacon### `<Time/>` 515*55058f92SEvan Bacon 516*55058f92SEvan BaconRenders a `<time />` element with reset styles on web, and a regular `<Text />` on native. 517*55058f92SEvan Bacon 518*55058f92SEvan Bacon- `dateTime` prop is supported on web and stripped on native. 519*55058f92SEvan Bacon 520*55058f92SEvan Bacon| Platform | Output | 521*55058f92SEvan Bacon| -------- | --------------------------- | 522*55058f92SEvan Bacon| Web | `<time />` | 523*55058f92SEvan Bacon| Native | `<Text style={[Custom]} />` | 524*55058f92SEvan Bacon 525*55058f92SEvan Bacon## Lists 526*55058f92SEvan Bacon 527*55058f92SEvan BaconLists can be used to create basic bulleted or numbered lists. You should try and use universal `FlatList` or `SectionList` components for long scrolling lists instead of these. 528*55058f92SEvan Bacon 529*55058f92SEvan Bacon### `<UL/>` 530*55058f92SEvan Bacon 531*55058f92SEvan BaconCreate an unordered (bulleted) list `<ul />` on web, and emulates the style with a `<View />` on native. 532*55058f92SEvan Bacon 533*55058f92SEvan Bacon- [x] Resets font styles everywhere. 534*55058f92SEvan Bacon- [ ] Supports i18n by reversing format on iOS and Android 535*55058f92SEvan Bacon- [ ] Supports custom bullets 536*55058f92SEvan Bacon 537*55058f92SEvan Bacon```tsx 538*55058f92SEvan Baconimport { UL, LI } from '@expo/html-elements'; 539*55058f92SEvan Bacon 540*55058f92SEvan Baconexport default () => ( 541*55058f92SEvan Bacon <UL> 542*55058f92SEvan Bacon <LI>oranges</LI> 543*55058f92SEvan Bacon <LI>apples</LI> 544*55058f92SEvan Bacon <UL> 545*55058f92SEvan Bacon <LI>green</LI> 546*55058f92SEvan Bacon <LI>red</LI> 547*55058f92SEvan Bacon </UL> 548*55058f92SEvan Bacon </UL> 549*55058f92SEvan Bacon); 550*55058f92SEvan Bacon``` 551*55058f92SEvan Bacon 552*55058f92SEvan Bacon| Platform | Output | 553*55058f92SEvan Bacon| -------- | --------------------------- | 554*55058f92SEvan Bacon| Web | `<ul />` | 555*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 556*55058f92SEvan Bacon 557*55058f92SEvan Bacon### `<OL/>` 558*55058f92SEvan Bacon 559*55058f92SEvan BaconCreate an ordered (numbered) list `<ol />` on web, and emulates the style with a `<View />` on native. 560*55058f92SEvan Bacon 561*55058f92SEvan Bacon- [x] Resets font styles everywhere. 562*55058f92SEvan Bacon- [ ] Supports i18n by reversing format on iOS and Android 563*55058f92SEvan Bacon- [ ] Supports i18n bullets on iOS and Android 564*55058f92SEvan Bacon- [ ] Supports custom bullets 565*55058f92SEvan Bacon 566*55058f92SEvan Bacon```tsx 567*55058f92SEvan Baconimport { OL, LI } from '@expo/html-elements'; 568*55058f92SEvan Bacon 569*55058f92SEvan Baconexport default () => { 570*55058f92SEvan Bacon return ( 571*55058f92SEvan Bacon <OL> 572*55058f92SEvan Bacon <LI>oranges</LI> 573*55058f92SEvan Bacon <LI>apples</LI> 574*55058f92SEvan Bacon <OL> 575*55058f92SEvan Bacon <LI>green</LI> 576*55058f92SEvan Bacon <LI>red</LI> 577*55058f92SEvan Bacon </OL> 578*55058f92SEvan Bacon </OL> 579*55058f92SEvan Bacon); 580*55058f92SEvan Bacon``` 581*55058f92SEvan Bacon 582*55058f92SEvan Bacon| Platform | Output | 583*55058f92SEvan Bacon| -------- | --------------------------- | 584*55058f92SEvan Bacon| Web | `<ol />` | 585*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 586*55058f92SEvan Bacon 587*55058f92SEvan Bacon### `<LI/>` 588*55058f92SEvan Bacon 589*55058f92SEvan BaconCreate a standard list item `<li />` on web and a native view on mobile which can render text or views inside it. 590*55058f92SEvan Bacon 591*55058f92SEvan Bacon| Platform | Output | 592*55058f92SEvan Bacon| -------- | ---------------------------------------------------------- | 593*55058f92SEvan Bacon| Web | `<li />` | 594*55058f92SEvan Bacon| Native | `<Text style={[Custom]} />` \| `<View style={[Custom]} />` | 595*55058f92SEvan Bacon 596*55058f92SEvan Bacon## Rules 597*55058f92SEvan Bacon 598*55058f92SEvan Bacon### `<HR/>` 599*55058f92SEvan Bacon 600*55058f92SEvan BaconRenders a `<View>` everywhere. Style is modified to match web. 601*55058f92SEvan Bacon 602*55058f92SEvan Bacon```tsx 603*55058f92SEvan Baconimport { HR } from '@expo/html-elements'; 604*55058f92SEvan Bacon 605*55058f92SEvan Baconexport default () => <HR />; 606*55058f92SEvan Bacon``` 607*55058f92SEvan Bacon 608*55058f92SEvan Bacon| Platform | Output | 609*55058f92SEvan Bacon| -------- | --------------------------- | 610*55058f92SEvan Bacon| Web | `<hr />` | 611*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 612*55058f92SEvan Bacon 613*55058f92SEvan Bacon### `<BR/>` 614*55058f92SEvan Bacon 615*55058f92SEvan BaconCreate a line break. 616*55058f92SEvan Bacon 617*55058f92SEvan Bacon| Platform | Output | 618*55058f92SEvan Bacon| -------- | ---------------------------------------- | 619*55058f92SEvan Bacon| Web | `<br />` | 620*55058f92SEvan Bacon| Native | `<View style={{height: 8, width: 0}} />` | 621*55058f92SEvan Bacon 622*55058f92SEvan Bacon## Tables 623*55058f92SEvan Bacon 624*55058f92SEvan BaconCreate tables universally. 625*55058f92SEvan Bacon 626*55058f92SEvan Bacon- Each element renders to the expected type on web. 627*55058f92SEvan Bacon- `padding` is removed from all table elements. 628*55058f92SEvan Bacon- Text **can only** be rendered in `TH` and `TD` on mobile. 629*55058f92SEvan Bacon- `colSpan` and `rowSpan` are currently web-only (PRs welcome). 630*55058f92SEvan Bacon 631*55058f92SEvan Bacon```tsx 632*55058f92SEvan Baconimport { Table, THead, TH, TBody, TFoot, TR, TD, Caption } from '@expo/html-elements'; 633*55058f92SEvan Baconimport { Text } from 'react-native'; 634*55058f92SEvan Bacon 635*55058f92SEvan Baconexport default () => ( 636*55058f92SEvan Bacon <Table> 637*55058f92SEvan Bacon <Caption>Caption</Caption> 638*55058f92SEvan Bacon <THead> 639*55058f92SEvan Bacon <TR> 640*55058f92SEvan Bacon <TH colSpan="2">The table header</TH> 641*55058f92SEvan Bacon </TR> 642*55058f92SEvan Bacon </THead> 643*55058f92SEvan Bacon <TBody> 644*55058f92SEvan Bacon <TR> 645*55058f92SEvan Bacon <TD>The table body</TD> 646*55058f92SEvan Bacon <TD>with two columns</TD> 647*55058f92SEvan Bacon </TR> 648*55058f92SEvan Bacon </TBody> 649*55058f92SEvan Bacon <TFoot> 650*55058f92SEvan Bacon <TR> 651*55058f92SEvan Bacon <TD> 652*55058f92SEvan Bacon <Text>This is the table footer</Text> 653*55058f92SEvan Bacon </TD> 654*55058f92SEvan Bacon </TR> 655*55058f92SEvan Bacon </TFoot> 656*55058f92SEvan Bacon </Table> 657*55058f92SEvan Bacon); 658*55058f92SEvan Bacon``` 659*55058f92SEvan Bacon 660*55058f92SEvan Bacon#### Table example output web 661*55058f92SEvan Bacon 662*55058f92SEvan Bacon```html 663*55058f92SEvan Bacon<table> 664*55058f92SEvan Bacon <caption> 665*55058f92SEvan Bacon Caption 666*55058f92SEvan Bacon </caption> 667*55058f92SEvan Bacon <thead> 668*55058f92SEvan Bacon <tr> 669*55058f92SEvan Bacon <th colspan="2">The table header</th> 670*55058f92SEvan Bacon </tr> 671*55058f92SEvan Bacon </thead> 672*55058f92SEvan Bacon <tbody> 673*55058f92SEvan Bacon <tr> 674*55058f92SEvan Bacon <td>The table body</td> 675*55058f92SEvan Bacon <td>with two columns</td> 676*55058f92SEvan Bacon </tr> 677*55058f92SEvan Bacon </tbody> 678*55058f92SEvan Bacon <tfoot> 679*55058f92SEvan Bacon <tr> 680*55058f92SEvan Bacon <td><div>The table body</div></td> 681*55058f92SEvan Bacon </tr> 682*55058f92SEvan Bacon </tfoot> 683*55058f92SEvan Bacon</table> 684*55058f92SEvan Bacon``` 685*55058f92SEvan Bacon 686*55058f92SEvan Bacon### `<Table/>` 687*55058f92SEvan Bacon 688*55058f92SEvan BaconBase element for creating a Table. 689*55058f92SEvan Bacon 690*55058f92SEvan Bacon| Platform | Output | 691*55058f92SEvan Bacon| -------- | --------------------------- | 692*55058f92SEvan Bacon| Web | `<table />` | 693*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 694*55058f92SEvan Bacon 695*55058f92SEvan Bacon### `<THead/>` 696*55058f92SEvan Bacon 697*55058f92SEvan BaconHeader element in a Table. 698*55058f92SEvan Bacon 699*55058f92SEvan Bacon| Platform | Output | 700*55058f92SEvan Bacon| -------- | --------------------------- | 701*55058f92SEvan Bacon| Web | `<thead />` | 702*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 703*55058f92SEvan Bacon 704*55058f92SEvan Bacon### `<TBody/>` 705*55058f92SEvan Bacon 706*55058f92SEvan BaconBody element in a Table. 707*55058f92SEvan Bacon 708*55058f92SEvan Bacon| Platform | Output | 709*55058f92SEvan Bacon| -------- | --------------------------- | 710*55058f92SEvan Bacon| Web | `<tbody />` | 711*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 712*55058f92SEvan Bacon 713*55058f92SEvan Bacon### `<TFoot/>` 714*55058f92SEvan Bacon 715*55058f92SEvan BaconFooter element in a Table. 716*55058f92SEvan Bacon 717*55058f92SEvan Bacon| Platform | Output | 718*55058f92SEvan Bacon| -------- | --------------------------- | 719*55058f92SEvan Bacon| Web | `<tfoot />` | 720*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 721*55058f92SEvan Bacon 722*55058f92SEvan Bacon### `<TH/>` 723*55058f92SEvan Bacon 724*55058f92SEvan BaconUsed to display text in the Header. 725*55058f92SEvan Bacon 726*55058f92SEvan Bacon- `colSpan` and `rowSpan` are currently web-only. 727*55058f92SEvan Bacon 728*55058f92SEvan Bacon| Platform | Output | 729*55058f92SEvan Bacon| -------- | --------------------------- | 730*55058f92SEvan Bacon| Web | `<th />` | 731*55058f92SEvan Bacon| Native | `<Text style={[Custom]} />` | 732*55058f92SEvan Bacon 733*55058f92SEvan Bacon### `<TR/>` 734*55058f92SEvan Bacon 735*55058f92SEvan BaconUsed to create a Row in a Table. 736*55058f92SEvan Bacon 737*55058f92SEvan Bacon| Platform | Output | 738*55058f92SEvan Bacon| -------- | --------------------------- | 739*55058f92SEvan Bacon| Web | `<tr />` | 740*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 741*55058f92SEvan Bacon 742*55058f92SEvan Bacon### `<TD/>` 743*55058f92SEvan Bacon 744*55058f92SEvan BaconCreate a cell in a Table. 745*55058f92SEvan Bacon 746*55058f92SEvan Bacon- `colSpan` and `rowSpan` are currently web-only. 747*55058f92SEvan Bacon 748*55058f92SEvan Bacon| Platform | Output | 749*55058f92SEvan Bacon| -------- | --------------------------- | 750*55058f92SEvan Bacon| Web | `<td />` | 751*55058f92SEvan Bacon| Native | `<View style={[Custom]} />` | 752*55058f92SEvan Bacon 753*55058f92SEvan Bacon### `<Caption/>` 754*55058f92SEvan Bacon 755*55058f92SEvan BaconUsed to caption your table. Excepts text as a child. 756*55058f92SEvan Bacon 757*55058f92SEvan Bacon| Platform | Output | 758*55058f92SEvan Bacon| -------- | --------------------------- | 759*55058f92SEvan Bacon| Web | `<caption />` | 760*55058f92SEvan Bacon| Native | `<Text style={[Custom]} />` | 761*55058f92SEvan Bacon 762*55058f92SEvan Bacon## TODO 763*55058f92SEvan Bacon 764*55058f92SEvan Bacon- Improve relative imports for better tree-shaking. 765*55058f92SEvan Bacon 766*55058f92SEvan Bacon## Contributing 767*55058f92SEvan Bacon 768*55058f92SEvan BaconContributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing). 769*55058f92SEvan Bacon 770*55058f92SEvan Bacon[yoga]: https://yogalayout.com/ 771*55058f92SEvan Bacon 772*55058f92SEvan Bacon<!-- HTML element links --> 773*55058f92SEvan Bacon 774*55058f92SEvan Bacon[html-a]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a 775*55058f92SEvan Bacon[html-article]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article 776*55058f92SEvan Bacon[html-b]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b 777*55058f92SEvan Bacon[html-blockquote]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote 778*55058f92SEvan Bacon[html-br]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br 779*55058f92SEvan Bacon[html-caption]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption 780*55058f92SEvan Bacon[html-code]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code 781*55058f92SEvan Bacon[html-del]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del 782*55058f92SEvan Bacon[html-em]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em 783*55058f92SEvan Bacon[html-footer]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer 784*55058f92SEvan Bacon[html-h1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h1 785*55058f92SEvan Bacon[html-h2]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h2 786*55058f92SEvan Bacon[html-h3]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h3 787*55058f92SEvan Bacon[html-h4]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h4 788*55058f92SEvan Bacon[html-h5]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h5 789*55058f92SEvan Bacon[html-h6]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h6 790*55058f92SEvan Bacon[html-header]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header 791*55058f92SEvan Bacon[html-hr]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr 792*55058f92SEvan Bacon[html-i]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i 793*55058f92SEvan Bacon[html-main]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main 794*55058f92SEvan Bacon[html-mark]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark 795*55058f92SEvan Bacon[html-nav]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav 796*55058f92SEvan Bacon[html-ol]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol 797*55058f92SEvan Bacon[html-p]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p 798*55058f92SEvan Bacon[html-pre]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre 799*55058f92SEvan Bacon[html-q]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q 800*55058f92SEvan Bacon[html-s]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s 801*55058f92SEvan Bacon[html-section]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section 802*55058f92SEvan Bacon[html-small]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small 803*55058f92SEvan Bacon[html-strong]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong 804*55058f92SEvan Bacon[html-table]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table 805*55058f92SEvan Bacon[html-tbody]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody 806*55058f92SEvan Bacon[html-td]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td 807*55058f92SEvan Bacon[html-tfoot]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot 808*55058f92SEvan Bacon[html-th]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th 809*55058f92SEvan Bacon[html-thead]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead 810*55058f92SEvan Bacon[html-time]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time 811*55058f92SEvan Bacon[html-tr]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr 812*55058f92SEvan Bacon[html-ul]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul 813*55058f92SEvan Bacon[html-li]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li 814*55058f92SEvan Bacon[html-details]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details 815*55058f92SEvan Bacon[html-summary]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary 816*55058f92SEvan Bacon[html-progress]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress 817*55058f92SEvan Bacon[html-select]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select 818*55058f92SEvan Bacon[html-picture]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture 819*55058f92SEvan Bacon[html-figure]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure 820*55058f92SEvan Bacon[html-figcaption]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption 821*55058f92SEvan Bacon[aria-banner]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Banner_role 822