Python dash_html_components.H1 Examples
The following are 10
code examples of dash_html_components.H1().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
dash_html_components
, or try the search function
.
Example #1
Source File: multiple-intervals.py From dash-recipes with MIT License | 8 votes |
def getLayout(): return html.Div([ html.H1(id='Title1',children='Multiple intervals in a single page',style={'text-align':'center'}), html.Div(id='Title2', children=''' Test multiple intervals in a single page. ''',style={'margin-bottom':'50px', 'text-align':'center'}), html.Div('Div1',id='div1'), html.Div('Div2',id='div2'), html.Div('Div3',id='div3'), dcc.Interval( id='interval-component-1', interval=500 # in milliseconds ), dcc.Interval( id='interval-component-2', interval=300 # in milliseconds ), dcc.Interval( id='interval-component-3', interval=400 # in milliseconds ) ])
Example #2
Source File: app.py From dash-redis-celery-periodic-updates with MIT License | 7 votes |
def serve_layout(): return html.Div( [ dcc.Interval(interval=5 * 1000, id="interval"), html.H1("Redis, Celery, and Periodic Updates"), html.Div(id="status"), dcc.Dropdown( id="dropdown", options=[{"value": i, "label": i} for i in ["LA", "NYC", "MTL"]], value="LA", ), dcc.Graph(id="graph"), ] )
Example #3
Source File: dash-callback-factory.py From dash-recipes with MIT License | 5 votes |
def layout(): divs = divs_list() return [html.Div([ html.H1('Example'), html.Div(divs, id='model-k2-divs'), ], style={'maxWidth': '720px', 'margin': '0 auto'}, id='example')]
Example #4
Source File: tabs-and-intervals.py From dash-recipes with MIT License | 5 votes |
def display_content(selected_tab): return html.Div([ html.H1(selected_tab), dcc.Graph(id='graph', figure=generate_figure(selected_tab)) ])
Example #5
Source File: _example_plugin.py From webviz-config with MIT License | 5 votes |
def layout(self) -> html.Div: return html.Div( [ html.H1(self.title), html.Button( id=self.uuid("submit-button"), n_clicks=0, children="Submit" ), html.Div(id=self.uuid("output-state")), ] )
Example #6
Source File: _example_data_download.py From webviz-config with MIT License | 5 votes |
def layout(self) -> html.H1: return html.H1(self.title)
Example #7
Source File: utils.py From dash-docs with MIT License | 5 votes |
def create_doc_page(examples, component_names, component_hyphenated, component_examples=None): '''Generates a documentation page for a component. :param (dict[object]) examples: A dictionary that contains the loaded examples for all components. :param (dict[list]) component_names: A dictionary defining which components are React components, and which are Python components. The keys in the dictionary are 'react' and 'python', and the values for each are lists containing the names of the components that belong to each category. :param (string) component_hyphenated: The name of the component in snake case, with underscores (_) replaced with dashes (-). :rtype (object): A div containing the contents of the component's documentation page. ''' component_name = component_hyphenated\ .replace('-', ' ')\ .title()\ .replace(' ', '')\ .replace('.Py', '') if component_examples is None: component_examples = [] component_examples = create_examples(component_examples) if component_name == 'Molecule3DViewer': component_name = 'Molecule3dViewer' elif component_name == 'Molecule2DViewer': component_name = 'Molecule2dViewer' return html.Div( children=[ html.H1('{} Examples and Reference'.format( component_name))] + create_default_example(component_name, examples[component_hyphenated], styles, component_hyphenated.replace('.py', '')) + component_examples + [rc.ComponentReference( component_name, lib=dash_bio)] )
Example #8
Source File: components.py From slapdash with MIT License | 5 votes |
def make_brand(**kwargs): return html.Header( className="brand", children=dcc.Link( href=get_url(""), children=html.H1([fa("far fa-chart-bar"), server.config["TITLE"]]), ), **kwargs, )
Example #9
Source File: dash-plot.py From dash-recipes with MIT License | 4 votes |
def plot_bar(data): app.layout = html.Div(children=[html.H1(children='CM PT'), html.Div(children='''History.'''), dcc.Graph( figure=go.Figure( data = data, layout=go.Layout(title='Streams', showlegend=False, barmode='stack', margin=go.Margin(l=200, r=0, t=40, b=20))), style={'height': 300}, id='my-graph') ])
Example #10
Source File: chapter_index.py From dash-docs with MIT License | 4 votes |
def component_list( package, content_module, base_url, import_alias, component_library, escape_tags=False, ad='dash-enterprise-kubernetes.jpg', adhref='https://plotly.com/dash/kubernetes/?utm_source=docs&utm_medium=sidebar&utm_campaign=june&utm_content=kubernetes'): return [ { 'url': tools.relpath('/{}/{}'.format(base_url, component.lower())), 'name': '{}.{}'.format(import_alias, component), 'description': ' '.join([ 'Official examples and reference documentation for {name}.', '{which_library}' ]).format( name='{}.{}'.format(import_alias, component), component_library=component_library, which_library=( '{name} is a {component_library} component.'.format( name='{}.{}'.format(import_alias, component), component_library=component_library, ) if component_library != import_alias else '' ) ).strip(), 'content': ( getattr(content_module, component) if (content_module is not None and hasattr(content_module, component)) else html.Div([ html.H1(html.Code('{}.{}'.format( import_alias, component ))), html.H2('Reference & Documentation'), rc.Markdown( getattr(package, component).__doc__, escape_tags=escape_tags ), ]) ), 'ad': ad, 'adhref': adhref } for component in sorted(dir(package)) if not component.startswith('_') and component[0].upper() == component[0] ]