{% extends 'layout.twig' %} {% set title %}Matomo UI demo{% endset %} {% block head %} {{ parent() }} {% endblock %} {% block root %}

{{ title }}

This page is intended to show all the UI components and styles available to use in Matomo.

Grid system

Materialize's grid system allows to organize the content in columns, all the while staying responsive for smaller screens.

.col m1
.col m1
.col m1
.col m1
.col m1
.col m1
.col m1
.col m1
.col m1
.col m1
.col m1
.col m1
.col m8
.col m4
.col m4
.col m4
.col m4
.col m6
.col m6

Read more about Materialize's grid system.

Typography

h1. heading

h2. heading

h3. heading

h4. heading

h5. heading
h6. heading

This is a paragraph, and this is a link.

Another paragraph, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Alignment classes

Left aligned block.

Center aligned block.

Right aligned block.

<p class="left">Left aligned block.</p>
<p class="center">Center aligned block.</p>
<p class="right">Right aligned block.</p>

Left aligned text.

Center aligned text.

Right aligned text.

<p class="left-align">Left aligned text.</p>
<p class="center-align">Center aligned text.</p>
<p class="right-align">Right aligned text.</p>

Lists

<ul>
  <li>...</li>
</ul>

Buttons

Link
<a class="btn" href="#">Link</a>
<input type="button" class="btn" value="Input">
<input type="submit" class="brn" value="Submit">
Large button
<button class="btn btn-large">Large button</button>
<a class="btn btn-large" href="#">Large button</a>
<a class="btn btn-block" href="#">Block button</a>
<a class="btn btn-large btn-block" href="#">Large block button</a>

Flat buttons

Flat button Flat button
<a class="btn-flat" href="#">Flat button</a>
<a class="btn-flat" href="#"><span class="icon-add"></span></a>
<a class="btn-flat btn-large" href="#">Flat button</a>
<a class="btn-flat btn-large" href="#"><span class="icon-add"></span></a>

Loading indicator

<div piwik-activity-indicator loading="true"></div>

This is an angular component. You can change the loading state via angular.

Progressbar

<div piwik-progressbar progress="5" label="Downloading database"></div>

This is an angular component. Update the progress and label via angular.

Alerts

Info! This alert needs your attention, but it's not super important.
Success! You successfully read this important alert message.
Warning! Better check yourself, you're not looking too good.
Error! Change a few things up and try submitting again.
<div piwik-alert="info">
    <strong>Info!</strong> This alert needs <a>your attention</a>, but it's not super important.
</div>
<div piwik-alert="success">
    <strong>Success!</strong> You successfully read this important <a>alert message</a>.
</div>
<div piwik-alert="warning">
    <strong>Warning!</strong> Better <a>check</a> yourself, you're not looking too good.
</div>
<div piwik-alert="danger">
    <strong>Error!</strong> Change <a>a few things</a> up and try submitting again.
</div>

Forms

Simple form

{% set inputElements%}
It is possible to use all kind of HTML in the help text, including links.
{% endset %}

If you do not want to use one ouf our form fields we recommend to add the class browser-default to the input or select element.

{% for input in inputElements|split("\n\n") %}
{{ input|raw }}
{{ input|e }}
{% endfor %}

Code

Inline

You can put code in a text using the code tag.

You can put code in a text using the <code piwik-select-on-focus>code</code> tag.

Block

Or you can display a code block:

<!-- Matomo -->
<script type="text/javascript">
</script>
<!-- End Matomo Code -->
<pre piwik-select-on-focus>...</pre>

Tables

First Name Last Name Username
Mark Otto @mdo
Jacob Thornton @fat
Larry the Bird @twitter
<table><thead>...</thead><tbody>...</tbody></table>

Content intro

My headline

My text goes is in here

<div piwik-content-intro>
    <h2>My headline</h2>
    <p>My text goes is in here</p>
</div>

A content intro can be used as an introduction to the following content and is usually used as the first part of a page followed by one or multiple content blocks.

Content blocks

My text goes is in here

<div piwik-content-block content-title="My title" help-url="https://matomo.org">
    <p>My text goes is in here</p>
</div>

Content Table

My intro text is here

Column 1Column 2
Value 1Value 2
Value 1Value 2
<div piwik-content-block content-title="My title" help-url="https://matomo.org">
    <p>My intro text is here</p>
    <table piwik-content-table>
        <thead><tr><th>Column 1</th><th>Column 2</th></tr></thead>
        <tbody>
            <tr><td>Value 1</td><td>Value 2</td></tr>
            <tr><td>Value 1</td><td>Value 2</td></tr>
        </tbody>
    </table>
</div>

Icons

<span class="icon-ok"></span>
{% endblock %}