tools.load_example(
     'tutorial/examples/core_components/slider_updatemode.py'),
 'store-clicks':
 tools.load_example('tutorial/examples/core_components/store_clicks.py'),
 'store-share':
 tools.load_example('tutorial/examples/core_components/store_share.py'),
 'tabs_callback':
 tools.load_example(
     'tutorial/examples/core_components/tabs_callback_graph.py'),
 'tabs_simple':
 tools.load_example('tutorial/examples/core_components/tabs_simple.py'),
 'tabs_styled_with_classes':
 tools.load_example(
     'tutorial/examples/core_components/tabs_styled_with_classes.py'),
 'tabs_styled_with_classes_css':
 tools.read_file('assets/tabs-styled-with-classes.css'),
 'tabs_styled_with_inline':
 tools.load_example(
     'tutorial/examples/core_components/tabs_styled_with_inline.py'),
 'tabs_styled_with_props':
 tools.load_example(
     'tutorial/examples/core_components/tabs_styled_with_props.py'),
 'upload-datafile':
 tools.load_example('tutorial/examples/core_components/upload-datafile.py'),
 'upload-gallery':
 tools.load_example('tutorial/examples/core_components/upload-gallery.py'),
 'upload-image':
 tools.load_example('tutorial/examples/core_components/upload-image.py'),
 'button_basic':
 tools.load_example('tutorial/examples/core_components/button_basic.py'),
 'button_n_clicks_timestamp':
Esempio n. 2
0
# -*- coding: utf-8 -*-
import dash_core_components as dcc
import dash_html_components as html
from textwrap import dedent as s

from tutorial import styles
from tutorial.tools import load_example, read_file

examples = {
    'local-css':
    load_example('tutorial/examples/external_css_and_js/local-css.py'),
    'custom-index-string':
    read_file('tutorial/examples/external_css_and_js/custom-index-string.py'),
    'custom-interpolate-string':
    read_file(
        'tutorial/examples/external_css_and_js/custom-interpolate-string.py'),
    'dash-meta-tags':
    read_file('tutorial/examples/external_css_and_js/dash-meta-tags.py'),
    'external-resources-init':
    read_file(
        'tutorial/examples/external_css_and_js/external-resources-init.py'),
}

layout = html.Div([
    html.H1('Adding CSS & JS and Overriding the Page-Load Template'),
    dcc.Markdown(
        s('''
    Dash applications are rendered in the web browser with CSS and JavaScript.
    On page load, Dash serves a small HTML template that includes references to
    the CSS and JavaScript that are required to render the application.
    This chapter covers everything that you need to know about configuring
# -*- coding: utf-8 -*-
import dash_core_components as dcc
import dash_html_components as html

from tutorial import styles
from tutorial.tools import load_example, read_file


examples = {
    'local-css': load_example(
        'tutorial/examples/external_css_and_js/local-css.py'
    ),
    'custom-index-string': read_file(
        'tutorial/examples/external_css_and_js/custom-index-string.py'
    ),
    'custom-interpolate-string': read_file(
        'tutorial/examples/external_css_and_js/custom-interpolate-string.py'
    ),
    'dash-meta-tags': read_file(
        'tutorial/examples/external_css_and_js/dash-meta-tags.py'
    ),
    'custom-dash-renderer': read_file(
        'tutorial/examples/external_css_and_js/custom-dash-renderer.py'
    ),
    'custom-dash-renderer-hooks': read_file(
        'tutorial/examples/external_css_and_js/custom-dash-renderer-hooks.py'
    ),
    'external-resources-init': read_file(
        'tutorial/examples/external_css_and_js/external-resources-init.py'
    ),
}
    'date_picker_range': tools.load_example('tutorial/examples/core_components/date_picker_range.py'),
    'dropdown': tools.load_example('tutorial/examples/core_components/dropdown.py'),
    'graph-config': tools.load_example('tutorial/examples/core_components/export_graph_to_chart_studio.py'),
    'input-all-types': tools.load_example('tutorial/examples/core_components/input_all_types.py'),
    'input-basic': tools.load_example('tutorial/examples/core_components/input-basic.py'),
    'input-number-type': tools.load_example('tutorial/examples/core_components/input_number_type.py'),
    'rangeslider': tools.load_example('tutorial/examples/core_components/rangeslider.py'),
    'rangeslider-nonlinear': tools.load_example('tutorial/examples/core_components/rangeslider_nonlinear.py'),
    'slider': tools.load_example('tutorial/examples/core_components/slider.py'),
    'slider-updatemode': tools.load_example('tutorial/examples/core_components/slider_updatemode.py'),
    'store-clicks': tools.load_example('tutorial/examples/core_components/store_clicks.py'),
    'store-share': tools.load_example('tutorial/examples/core_components/store_share.py'),
    'tabs_callback':  tools.load_example('tutorial/examples/core_components/tabs_callback_graph.py'),
    'tabs_simple':  tools.load_example('tutorial/examples/core_components/tabs_simple.py'),
    'tabs_styled_with_classes':  tools.load_example('tutorial/examples/core_components/tabs_styled_with_classes.py'),
    'tabs_styled_with_classes_css':  tools.read_file('assets/tabs-styled-with-classes.css'),
    'tabs_styled_with_inline':  tools.load_example('tutorial/examples/core_components/tabs_styled_with_inline.py'),
    'tabs_styled_with_props':  tools.load_example('tutorial/examples/core_components/tabs_styled_with_props.py'),
    'upload-datafile':  tools.load_example('tutorial/examples/core_components/upload-datafile.py'),
    'upload-gallery':  tools.load_example('tutorial/examples/core_components/upload-gallery.py'),
    'upload-image':  tools.load_example('tutorial/examples/core_components/upload-image.py'),
    'button_basic': tools.load_example('tutorial/examples/core_components/button_basic.py'),
    'button_n_clicks_timestamp': tools.load_example('tutorial/examples/core_components/button_n_clicks_timestamp.py'),
    'logout_button': tools.load_example('tutorial/examples/core_components/logout_button.py'),
    'loading_component': tools.load_example('tutorial/examples/core_components/loading_component.py')
}


# Dropdown
Dropdown = html.Div(children=[
    html.H1('Dropdown Examples and Reference'),