GithubHelp home page GithubHelp logo

nickbalestra / react-desktop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gabrielbull/react-desktop

0.0 2.0 0.0 2.21 MB

React UI Components for OS X El Capitan and Windows 10

Home Page: http://gabrielbull.github.io/react-desktop/

License: MIT License

JavaScript 100.00%

react-desktop's Introduction

React Desktop

Build Status Code Climate Dependency Status devDependency Status npm downloads npm version Gitter

This library is in early Alpha and is subject to breaking change in the coming weeks.

React UI Components for OS X El Capitan and Windows 10.

npm install react-desktop --save

Demo

Contributing

This library has been created to bring a native desktop experience to the web. It works extremely well with tools such as node-webkit or Electron.js!

Everyone is welcome to contribute and add more components/documentation whilst following the contributing guidelines.

Documentation

Guides on installation, components and advanced usage are found in the documentation.

Todos OS X

  • Box
  • Check Box Button
  • Indeterminate Circular Progress Indicator
  • Gradient Button
  • Flexible Space Toolbar Item
  • Form
  • Label
  • Pop Up Button
  • Push Button
  • Radio Button
  • Search Field
  • Secure Text Field
  • Segmented Control
  • Space Toolbar Item
  • Text Field
  • Textured Rounded Button
  • Title Bar
  • Toolbar
  • Window

Todos Windows

  • Button
  • Checkbox
  • Determinate Progress Bar
  • Form
  • Progress Bar
  • Progress Ring
  • Split View
  • Text Block
  • Text Box
  • Title Bar
  • Window

Screenshots

OS X El Capitan

Windows 10

Usage

Simple usage:

import React from 'react';
import {
  Window,
  TitleBar, 
  PushButton, 
  TextField, 
  Toolbar, 
  Box, 
  SegmentedControl,
  IndeterminateProgressWheel,
  Form,
  Label
} from 'react-desktop';

class MyApp extends React.Component {
  constructor() {
    super();
    this.state = { selectedTab: 'login' };
  }

  render() {
    return (
      <Window>
        <TitleBar 
          title="My App" 
          controls
          onClosePress={() => { alert('close'); }}
          onResizePress={() => { alert('resize'); }}
          onMinimizePress={() => { alert('minimize'); }}
        >
          <Toolbar/>
        </TitleBar>
                
        <Box>
          <SegmentedControl>
            <SegmentedControl.Item 
              title="Login"
              selected={this.state.selectedTab === 'login'}
              onPress={() => { this.setState({ selectedTab: 'login' }) } }
            >
              <Form onSubmit={() => { alert('submit'); }}>
                <Label color="red">Error</Label>
                
                <Form.Row>
                  <Label>Username</Label>
                  <TextField defaultValue="" placeholder="Username"/>
                </Form.Row>
                
                <Form.Row>
                  <PushButton onPress={() => { alert('cancel'); }}>Cancel</PushButton>
                  <PushButton onPress="submit" color="blue">Submit</PushButton>
                  
                  <IndeterminateProgressWheel visible absolute/>
                </Form.Row>
              </Form>              
            </SegmentedControl.Item>
          </SegmentedControl>
        </Box>
      </Window>
    );
  }
}

react-desktop's People

Contributors

gabrielbull avatar chentsulin avatar salakar avatar ehesp avatar hinton avatar nickbalestra avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.