React User interface solutions Panel


import React from 'react';

class Panel extends React.Component {
    constructor(props) {
    render(...elements) {
        var props = Object.assign({
            className: ? 'active' : '',
            tabIndex: -1
        }, this.props);

        var css = this.css();
        if (css != '') {
                'style', null,

        return React.createElement(
            'div', props,
    static title() {
        return '';
    static css() {
        return '';

Major differences from simple pane are:

  • panel has focus in instance when it is called by script or clicked by mouse;
  • panel has title static method per component, so it may be extended by other panel component with overridden title (reason here is that function can be then called again on rendering for localization purposes, but in bounds of this example title doesn't make sense);
  • it can contain individual stylesheet declared in css static method (you can pre-load file contents from PANEL.css).