Overview: Web Libraries


Many Dart libraries have support for web app development. We recommend using the AngularDart framework, but you also have lower level options.

AngularDart

Learn from the Angular documentation. You can also follow the AngularDart codelab.

Screenshot of AdWords Next

JS interop

To leverage one of the many existing libraries written in JavaScript, use package:js. If a TypeScript type definition file exists for a JavaScript library (see DefinitelyTyped for more info), you can use the js_facade_gen tool to generate Dart code for that library.

Here are some projects on GitHub that use package:js:

firebase
Dart wrapper library for Firebase.
captains_log_final
Example includes lib/quill.dart, which is generated from Quill.js.
chartjs
Dart API for Chart.js.

Low-level HTML

If you can’t or don’t want to use a framework, you can use Dart’s low-level HTML APIs. Here’s some documentation to help you get started:

Low-level HTML tutorials
An overview of DOM, CSS, and HTML concepts, with information on how to include a Dart script in an HTML page and how to add and remove elements from a web page. These tutorials feature interactive examples in DartPad.
Tour of the dart:html library
An example-driven tour of using the dart:html library. Topics include manipulating the DOM programmatically, making HTTP requests, and using WebSockets.
dart:html API reference
Complete reference documentation for the dart:html library.

Once you’re ready to develop complex applications that support features such as event handling and dependency injection, we recommend using AngularDart.

Other libraries

To find more libraries that support writing web apps, look at web packages on pub.dartlang.org.


Also see the FAQ.