Giter Site home page Giter Site logo

caseykhuc / aha-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gotitinc/aha-react

0.0 1.0 0.0 2.3 MB

Aha Design System - React - Collection of React Components for building web applications.

License: Apache License 2.0

JavaScript 99.95% Shell 0.05%

aha-react's Introduction

Aha logo

Aha Design System - React

Collection of React Components for building web applications.
Explore Aha docs »

Report bug · Request feature

Status

CI npm bundle size npm version dependencies Status peerDependencies Status devDependency Status

Quick start

Installation

You have to install both @ahaui/react and @ahaui/css

# With npm
npm install @ahaui/react @ahaui/css

# Or with yarn
yarn add @ahaui/react @ahaui/css

Usage

import '@ahaui/css/dist/index.min.css';
import React from 'react';
import { Button } from '@ahaui/react';

function Example() {
  const onButtonClick = () => {
    alert('Aha!');
  };

  return (
    <Button
      onClick={onButtonClick}
    >
      Click me!
    </Button>
  );
}

Aha! Just simple as that!

Customization

Plugins

You can customize specific Aha React Components via plugins!

For now, to provide your custom assets to Logo, Avatar, EmptyState, you can use AssetPlugin.

import { AssetPlugin, Plugins, Logo } from '@ahaui/react';

const LogoAssetsPlugin = new AssetPlugin({
  prefix: 'logo',
  assets: {
    mylogo: require('./assets/images/logo/my-logo.svg').default,
    foobar: 'https://foo.bar/image.jpg',
  }
});

Plugins.loadPlugin(LogoAssetsPlugin);

function Example() {
  return (
    <Logo name="mylogo" />
  );
}

Various types of plugin will be developed in the future, stay tune!

Plugins could also be published standalone as a npm package (follow the template here).

Custom CSS

Further instruction could be found in here.

Copyright and License

Code and documentation copyright 2020 the Got It, Inc. Code released under the Apache-2.0 License.

aha-react's People

Contributors

tinhvqbk avatar namdaoduy avatar thangtvse avatar dependabot[bot] avatar

Watchers

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.