Code Monkey home page Code Monkey logo

core-elements's Introduction

Core elements

This package wraps the Polymer project's core elements, providing the following features:

  • Because the elements are bundled into a single pub package, you can add core_elements as a dependency in your pubspec. You don't need to install npm or bower.
  • Core elements that are either performance sensitive (like core-list) or use native objects that are difficult to use via dart:js (like core-ajax) have been ported to Dart.
  • The remaining core elements are wrapped with Dart proxy classes, making them easier to interact with from Dart apps.

You can find out more about core elements here: http://www.polymer-project.org/docs/elements/core-elements.html

Status

This is an early access version of the core elements. The elements are still changing on both the JavaScript and Dart sides.

Using elements

All elements live at the top level of the lib/ folder.

Import into HTML:

<link rel="import" href="packages/core_elements/core_input.html">

Import into Dart:

import 'package:core_elements/core_input.dart';

Running demos

If you download or fork the repo from https://github.com/dart-lang/core-elements, then you can use the pub command to run demos.

If you only want to run a few demos, then you can edit pubspec.yaml to comment out (using #) all the entrypoints except the ones you need.

To run a core element demo:

  1. From the top directory, use the pub serve command, specifying the example directory:

     pub serve example
    
  2. In a browser, visit http://localhost:8080/element_name.html).

    Note that you use an underscore (_) instead of the dash (-) in the element name. For example, to see the core-icons demo, browse to http://localhost:8080/core_icons.html.

    For a full list of demos, see the values for entry_points in the pubspec.yaml file.

To create a deployable build of one or more demos:

  1. From the top directory, use the pub build command:

    pub build example

  2. Copy the files from the resulting build directory to where you want to serve the files.

Note: Building the demos might take a few minutes.

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.