Working with frameworks


Bosonic core elements work well with React: as Andrew Rota put it, they're quite complementary actually.

In the sample below, we use a Bosonic element in JSX:

<!DOCTYPE html>
    <meta charset="UTF-8" />
    <title>Hello React!</title>
    <script src="lib/webcomponents.js"></script>
    <script src="lib/bosonic-runtime.js"></script>
    <link rel="import" href="lib/bosonic-core-elements/b-collapsible.html"/>
    <script src="lib/react.js"></script>
    <script src="lib/JSXTransformer.js"></script>
    <div id="example"></div>
    <script type="text/jsx">
      var Foo = React.createClass({
        render: function() {
          return (
              <button onClick={this.toggle}>Toogle collapsible</button>
              <b-collapsible ref="collapsible" data-duration="100">
                      Lorem ipsum...
        toggle: function() {


As React doesn't support custom HTML attributes, Bosonic elements support data- prefixed attributes: if an element uses a duration attribute for instance, it will work with data-duration too (this what we use in the sample). Accessing an element's API is easy: use React.findDOMNode(). Listening to elements' DOM events is easy too.


The Ember team strongly believes into Web Components. The integration of Bosonic elements in a Ember application is therefore very easy.


It seems that Angular 1.x has some issues with Web Components due to the way it handles its templates (basically, elements' createdCallback() are called multiple times). We're investigating to see if we can workaround this problem.

Angular 2 should be fine.