developit / preact-photon

:rocket: Beautiful desktop apps with Preact + Photon :heart:
http://npm.im/preact-photon
MIT License
172 stars 23 forks source link
desktop desktop-app electron photon preact preact-photon ui ui-kit

preact-photon

NPM travis-ci

A little wrapper around photon to make it cake to use via preact (or React *).

This requires that you already have the photon CSS included in your app.

What does it look like?

Well, this: Preact + Photon = <3 (@ CodePen or JSFiddle)


Usage

import { h, render } from 'preact';
import { Header, Title, Footer, Button } from 'preact-photon';

/** Example app component */
const App = () => (
    <div id="app">
        <Header>
            <Title>Great App</Title>
            <Button icon="home">Home</Button>
        </Header>

        <section>
            Hello there.
        </section>

        <Footer>
            <span>Some great content here.</span>
        </Footer>
    </div>
);

render(<App />, document.body);

Quick Start App

See preact-photon-electron-quick-start for a batteries-included starter app.


License

MIT


* ... though I haven't tested it.