react-native/docs/Basics-Component-Image.md
Joel Marcey d464f1d1c2 Add React Native Web Player to most component basics
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331

Differential Revision: D3472019

Pulled By: lacker

fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
2016-06-22 15:13:32 -07:00

31 lines
873 B
Markdown

---
id: basics-component-image
title: Image
layout: docs
category: The Basics
permalink: docs/basics-component-image.html
next: basics-component-view
---
Another basic React Native component is the [`Image`](/react-native/docs/image.html#content) component. Like `Text`, the `Image` component simply renders an image.
> An `Image` is analogous to the `<img>` HTML tag when building websites.
The simplest way to render an image is to provide a source file to that image via the `source` attribute.
This example displays a checkbox `Image` on the device.
```ReactNativeWebPlayer
import React from 'react';
import { AppRegistry, Image } from 'react-native';
const AwesomeProject = () => {
return (
<Image source={require('./img/favicon.png')} />
);
}
// App registration and rendering
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
```