Git Product home page Git Product logo

ui-seed's Introduction

UI Seed

The following guide only explains how to include ui-seed in a new project.

For information on how to develop ui-seed checkout the DEVELOPMENT.md


Style guide and UI components library that aims to standardize the look and feel across all Development Seed related applications, while defining coding best practices and conventions.

Install it as an node module: (Not available on npm, use direct link)

yarn add git+ssh://[email protected]/developmentseed/ui-seed.git#v0.3.1-beta

For the most recent version omit the tag.

Note: This UI system makes some assumptions which are described below for each of the elements.

Overview

The shared assets are all in the assets directory. It is organized as follows:

assets/scripts

Utility libraries and shared components.

USAGE
Use as any node module:

import { Dropdown, user } from 'ui-seed';

If you want to minimize bundle size you can also include the components directly.
Bindings exported from ui-seed are also available in ui-seed/assets/scripts

assets/styles

Requires Bourbon and Jeet.

INSTALLATION
Add the module path to the includePaths of gulp-sass. Should look something like:

.pipe($.sass({
  outputStyle: 'expanded',
  precision: 10,
  includePaths: require('node-bourbon').with('node_modules/jeet/scss', require('ui-seed/gulp-addons').scssPath)
}))

The ui-seed uses Open Sans (General) and Lato (headings) which are available on Google Fonts.
It needs to be included in the app:

<link href="https://fonts.googleapis.com/css?family=Lato:700,700i|Open+Sans:300,300i,400,400i,700,700i" rel="stylesheet" />

USAGE
Now you can include it in the main scss file:

// Bourbon is a dependency
@import "bourbon";

@import "jeet";

@import "ui-seed";

assets/icons

The ui-seed includes svg icons that are compiled into a webfont and included in the styles.
To use the icons, check the _ui-seed-icons.scss for the class names.

The icons are compiled into a webfont using collecticons-processor allowing the icons to be used as scss extents:

<button class="bttn-add">Add</button>
.bttn-add:before { // or .bttn-add:after {
  @extend %uisi-share;
}

or inline:

<button><i class="uisi-share"></i> Share</button>

assets/graphics

Graphics that are to be shared among projects.

INSTALLATION
Add the graphicsMiddleware to browserSync. This is only to aid development.
Should look something like:

browserSync({
  port: 3000,
  server: {
    baseDir: ['.tmp', 'app'],
    routes: {
      '/node_modules': './node_modules'
    },
    middleware: require('ui-seed/gulp-addons').graphicsMiddleware(fs) // <<< This line
  }
});

Basically every time there's a request to a path like /assets/graphics/**, browserSync will check in the ui-seed folder first. If it doesn't find anything it will look in the normal project's asset folder.

You also need to ensure that the images are copied over on build. This ensures that the graphics are copied over when building the project.

gulp.task('images', function () {
  return gulp.src(['app/assets/graphics/**/*', require('ui-seed/gulp-addons').graphicsPath + '/**/*'])
    .pipe($.cache($.imagemin({

USAGE
Just include the images using the path assets/graphics/[graphic-type]/[graphic-name].
All available images can be found here.

ui-seed's People

Contributors

danielfdsilva avatar dependabot[bot] avatar olafveerman avatar ricardoduplos 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.