React Desktop
React UI Components for OS X and Windows.
Contributing
This library is in its infancy and was created to fulfill the lack of such libraries for tools like node-webkit or Electron.js. As such, everyone is welcome to contribute and add more components.
Todos OS X
- Push Button
- Textured Rounded Button
- Gradient Button
- Pop Up Button
- Check Box Button
- Radio Button
- Label
- Text Field
- Search Field
- Secure Text Field
- Title Bar
- Toolbar
- Space Toolbar Item
- Flexible Space Toolbar Item
- Box
- Segmented Control
- Indeterminate Circular Progress Indicator
- Form
Todos Windows
- Button
- TextInput
- TitleBar
- Toolbar
Screenshots
Usage
Simple usage:
import {
TitleBar,
PushButton,
TextField,
Toolbar,
Box,
SegmentedControl,
IndeterminateCircularProgressIndicator,
Form,
Label
} from 'react-desktop';
class MyApp extends React.Component {
constructor() {
super();
this.state = { selectedTab: 'login' };
}
render() {
return (
<div>
<TitleBar title="Page" controls={true}/>
<TitleBar title="TitleBar with Toolbar" controls={true}>
<Toolbar/>
</TitleBar>
<Box>
<SegmentedControl>
<SegmentedControl.Item
title="Login"
selected={this.state.selectedTab === 'login'}
onPress={() => { this.setState({ selectedTab: 'login' }) } }
>
<Form>
<Form.Row>
<Label>Username</Label>
<TextField defaultValue="" placeholder="Username"/>
</Form.Row>
</Form>
<PushButton>Cancel</PushButton>
<PushButton color="blue">Submit</PushButton>
<IndeterminateCircularProgressIndicator visible={true}/>
</SegmentedControl.Item>
</SegmentedControl>
</Box>
</div>
);
}
}