Giter Club home page Giter Club logo

semantic-ui-ember's Introduction

Semantic-UI-Ember

We are porting our internal Ember Semantic-UI components to an official Semantic-UI integration. The code was original built for CrowdOx and later SpruceMail. We should have a beta of Semantic-UI-Ember available by end of 2014.

Project Philosophy

We feel that the Semantic-UI-Ember project should be an extension of Semantic-UI and not a complete rewrite. With that in mind, we will only be creating components to extend Semantic-UI modules, all other uses of Semantic-UI in your project should follow the official documentation.

Installation

Include the library as an NPM dependency, from within an ember-cli app.

npm install --save-dev Semantic-Org/Semantic-UI-Ember

Run the library's blueprint to pull in its Bower dependencies. This only needs to be done once.

ember generate semantic-ui-ember

Modules

Accordion

Replace <div class="ui accordion"> with {{#ui-accordion}} and fill the inside content with standard Semantic-UI.

{{#ui-accordion}}
  <div class="title">
    Semantic UI
  </div>
  <div class="content">
    Accordion Component
  </div>
{{/ui-accordion}}

Variations can be used with {{#ui-accordion class="styled"}}.

{{#ui-accordion class="styled"}}
  <div class="active title">
    <i class="dropdown icon"></i>
    What is a dog?
  </div>
  <div class="active content">
    <p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
  </div>
  <div class="title">
    <i class="dropdown icon"></i>
    What kinds of dogs are there?
  </div>
  <div class="content">
    <p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
  </div>
  <div class="title">
    <i class="dropdown icon"></i>
    How do you acquire a dog?
  </div>
  <div class="content">
    <p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
    <p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
  </div>
{{/ui-accordion}}

Checkbox

Replace <div class="ui checkbox"> with {{ui-checkbox}} and bind to a property on your model/controller/component.

Controller

export default Ember.Controller.extend({
  havingFun: false
});

Template

{{ui-checkbox checked=havingFun}}

Radio

  • Class: ui radio
  • Component: ui-radio

Replace <div class="ui radio"> with {{ui-radio}} and bind to a property on your model/controller/component.

Controller

export default Ember.Controller.extend({
  fruit: null
});

Template

<div class="ui form">
  <div class="grouped inline fields">
    <div class="field">
      {{ui-radio name="fruit" label="Once a week" checked=fruit}}
    </div>
    <div class="field">
      {{ui-radio name="fruit" label="2-3 times a week" checked=fruit}}
    </div>
    <div class="field">
      {{ui-radio name="fruit" label="Once a day" checked=fruit}}
    </div>
  </div>
</div>

Dimmer

There isn't a corresponding Ember component for this since it isn't rendered to the screen but instead invoked.

Dropdown

  • Documentation: Official Documentation
  • Ember.Select: [Follows Ember.Select Style](http://emberjs.com/api/classes/Ember.Select.html#sts=Ember.Select Class packages/ember-handlebars/lib/controls/select.js:93)
  • Class: ui dropdown
  • Component: ui-dropdown
  • Parameters
    • content: List of data that you want displayed. Required
    • value: Bound value that is set to optionValuePath
    • prompt: Text to display before an option has been chosen
    • icon: Icon you want to use. Default is dropdown
    • optionLabelPath: Path to the label that is displayed for each item. Default iscontent
    • optionValuePath: Path to the value that is used when an item is selected. Default is content

Replace <div class="ui dropdown"> with {{ui-dropdown}} and bind to a list and set a bound property.

Controller

export default Ember.Controller.extend({
	itemActions: [ "Edit", "Remove", "Hide"],
	selectedAction: null
});

Template

{{ui-dropdown
	content=itemActions
	value=selectedAction
	prompt="Select"
}}

Modal

COMING SOON

Popup

COMING SOON

Rating

COMING SOON

Shape

NOT IMPLEMENTED

Sidebar

NOT IMPLEMENTED

Transition

There isn't a cooresponding Ember component for this since it isn't rendered to the screen but instead invoked.

semantic-ui-ember's People

Contributors

aaronbhansen avatar ember-tomster avatar nathanpalmer avatar

Watchers

 avatar  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.