JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.js"></script>
<script src="https://npmcdn.com/[email protected]/dist/react-with-addons.js"></script>
<script src="https://npmcdn.com/[email protected]/dist/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui-react/0.61.10/semantic-ui-react.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.6/semantic.min.css">
<script src="https://facebook.github.io/react/js/jsfiddle-integration-babel.js"></script>
<div id="container">
<!-- This element's contents will be replaced with your component. -->
</div>
JavaScript 1.7
var Layout = React.createClass({
render: function() {
return (
<semanticUIReact.Container textAlign='center'>
<semanticUIReact.Segment>
<semanticUIReact.Form>
<semanticUIReact.Form.Group>
<semanticUIReact.Form.Input label='Test 1' placeholder="input..." />
<semanticUIReact.Form.Input label='Test 2' placeholder="input..." />
</semanticUIReact.Form.Group>
<input
type="file"
name="file"
id="file"
style={{
width: '0.1px',
height: '0.1px',
opacity: '0',
overflow: 'hidden',
position: 'absolute',
zIndex: '-1'
}}
/>
<label htmlFor="file" className="file-label">
<semanticUIReact.Header as='h4' icon className="file-label">
<semanticUIReact.Icon name='upload' circular inverted className="file-label"/>
<semanticUIReact.Header.Content>
Choose File...
</semanticUIReact.Header.Content>
</semanticUIReact.Header>
</label>
<semanticUIReact.Form.Button>Submit</semanticUIReact.Form.Button>
</semanticUIReact.Form>
</semanticUIReact.Segment>
</semanticUIReact.Container>
);
}
});
ReactDOM.render(
<Layout />,
document.getElementById('container')
);
throw new Error('break')