Introduction

Mirotone CSS components is the base library which enables everyone to design and build their Miro apps. The goal of this design system is to enable makers to quickly jump into a simple, yet consistent and efficient user experience while creating their functional solutions. The framework aims to provide ready-to-use frontend components that you can incorporate into your app in Miro.


Getting started

Mirotone is a CSS library, which means you can use the classes to style your HTML elements. To use it you can either:

• Install the package as a dependancy on your own project by running:

yarn

 yarn add mirotone

npm

npm install mirotone

• Link the css directly by standart css linking

HTML <link>

<link rel="stylesheet" href="https://unpkg.com/mirotone/dist/styles.css"/>

How does it work

Mirotone is inspired from the BEM architecture, Object Oriented CSS principles and functional CSS. You define the main class and you use a another class as a modifier to add the cusmotization.

Example:

HTML

<button class="button button-primary">Primary button</button>

Variables

Mirotone uses variables, they are split in two groups, initial and derived variables. All those values are in the src/foundation-core.css. You can override the foundation-core before importing Mirotone or with ruling the CSS. For now please use the DevTools to check the full list of created variables.

Initial variables

Those variables are defined by literal value.

Example:

--space-xsmall: 8px

Derived variables

Those variables are calculated based on a initial variable created.

Example:

--space-small: calc(var(--space-xsmall) * 2)

Layout

Mirotone supports .grid. it is based on 12 column grid-template-columns. Each of the 12 cells are using the fr (fractional unit).

How to use

You can create your own grid html element or add a class .grid to the wrapper you want to create the grid layout. Then you should declare start and values for each of your columns to create the layout. The grid uses the Fluidigrid logic and comes with pre-declared naming convention, we use cs[n] for grid-column-start:[n] andce[n] for grid-column-end:[n].

The grid system is part of the foundation-core, and it is highly recommended when creating App layouts.

Example,if you want to declare a column which starts from the first to the last column you will declare:

HTML

<div class="cs1 ce12"></div>
cs1 ce2
cs3 ce7
cs8 ce10
cs11 ce12
cs1 ce8
cs9 ce12
cs1 ce5
cs6 ce12
cs1 ce3
cs4 ce6
cs7 ce9
cs10 ce12
Check App template

Colors

--blue100: rgba(244, 246, 255, 1);--blue200: rgba(240, 242, 255, 1);--blue300: rgba(232, 236, 255, 1);--blue400: rgba(217, 224, 255, 1);--blue500: rgba(179, 192, 255, 1);--blue600: rgba(104, 129, 255, 1);--blue700: rgba(66, 98, 255, 1);--blue800: rgba(69, 91, 237, 1);--blue900: rgba(61, 81, 212, 1);--indigo50: rgba(245, 245, 247, 1);--indigo100: rgba(240, 240, 243, 1);--indigo200: rgba(235, 235, 239, 1);--indigo300: rgba(225, 224, 231, 1);--indigo400: rgba(205, 204, 215, 1);--indigo500: rgba(155, 153, 175, 1);--indigo600: rgba(95, 92, 128, 1);--indigo700: rgba(5, 0, 56, 1);--indigoAlpha80: rgba(5, 0, 56, 0.8);--indigoAlpha40: rgba(5, 0, 56, 0.4);--indigoAlpha20: rgba(5, 0, 56, 0.2);--indigoAlpha12: rgba(5, 0, 56, 0.12);--indigoAlpha8: rgba(5, 0, 56, 0.08);--indigoAlpha6: rgba(5, 0, 56, 0.06);--indigoAlpha4: rgba(5, 0, 56, 0.04);--green700: rgba(119, 204, 102, 1);--black: rgba(9, 9, 9, 1);--blackAlpha80: rgba(9, 9, 9, 0.8);--blackAlpha40: rgba(9, 9, 9, 0.4);--white: rgba(255, 255, 255, 1);--whiteAlpha80: rgba(255, 255, 255, 0.8);--whiteAlpha40: rgba(255, 255, 255, 0.4);--whiteAlpha20: rgba(255, 255, 255, 0.2);--red50: rgba(254, 247, 247, 1);--red100: rgba(253, 242, 242, 1);--red400: rgba(247, 212, 212, 1);--red600: rgba(225, 84, 84, 1);--red700: rgba(217, 41, 41, 1);--red800: rgba(199, 20, 20, 1);--red900: rgba(184, 13, 13, 1);--yellow100: rgba(255, 252, 243, 1);--yellow400: rgba(255, 246, 213, 1);--yellow700: rgba(255, 208, 47, 1);

Typography

Headings

Use .h1 – .h4 class to change an elements font size and weight to match Miro heading styles. It is also normalizing each one of them.

Heading 1

Heading 2

Heading 3

Heading 4

HTML

<h1 class="h1">Heading 1</h1>

Paragraph

Use .p-large,.p-medium or .p-small to change an elements font size and weight to match Miro paragraph styles.

Paragraph large

Paragraph medium

Paragraph small

HTML

<p class="p-large">Paragraph</h1>

Spacing

The spacing scale is a base-8 scale. We chose a base-8 scale because eight is a highly composable number (it can be divided and multiplied many times and result in whole numbers), yet allows spacing dense enough for different interface solutions. The scale's exception is that it begins at 4px to allow smaller padding and margin for denser parts of the site, from there on it steps up consistently in equal values of 8px.

--space-xxxsmall: calc(var(--space-xsmall) / 4);--space-xxsmall: calc(var(--space-xsmall) / 2);--space-xsmall: 8px;--space-small: calc(var(--space-xsmall) * 2);--space-medium: calc(var(--space-xsmall) * 3);--space-large: calc(var(--space-xsmall) * 4);--space-xlarge: calc(var(--space-xsmall) * 5);--space-xxlarge: calc(var(--space-xsmall) * 6);--space-xxxlarge: calc(var(--space-xsmall) * 8);

Icons

You can use the Miro icons by adding class .icon + .icon-eye, eye in this case is the icon name. You can find all icons in the dist/icons folder.

HTML

<div class="icon icon-eye"></div>

Buttons

You can find two sizes of buttons: .button and .button-small.

Primary button

Use the .button class to trigger the default button. Use the .button-primary to add modificator for color. When using a button element, always specify a type="".

Secondary button

Use the .button class to trigger the default button. Use the .button-secondary to add modificator for color. When using a button element, always specify a type="".

Danger button

Use the .button class to trigger the default button. Use the .button-danger to add modificator for color. When using a button element, always specify a type="".

Secondary border button

Use the .button class to trigger the default button. Use the .button-secondary-border to add modificator for color. When using a button element, always specify a type="".

Danger border button

Use the .button class to trigger the default button. Use the .button-danger-border to add modificator for color. When using a button element, always specify a type="".

Disabled button

Use the disabled="" attribute for disabling buttons. When using a button element, always specify a type="".

Loading button

Use the .button-loading class for calling a loading button appereance. When using a button element, always specify atype="".

Icon button

Use the .button-icon class + .icon-name to render an icon button. Add .button-icon-small if you want to add a smaller icon button.

Checkbox

Use .checkbox class.

HTML

<label class="checkbox"><input type="checkbox" checked=""><span>Checkbox</span></label>

Toggle

Use .toggle class.

HTML

<label class="toggle"><input type="checkbox" checked=""><span>Toggle</span></label>

Radio button

Use .radiobutton class.

HTML

<label class="toggle"><input type="checkbox" checked=""><span>Toggle</span></label>

Textarea

Use .form-group to group the textarea with label and status if needed.

HTML

<div class="form-group">
	<label>Textarea</label>
	<textarea class="textarea" placeholder="Placeholder text" spellcheck="true" rows="4"></textarea>
</div>

Input

Use .form-group to group the input with label and status if needed.

You can find two sizes of inputs: .input and .input-small. Wrap it with .form-group-small

Input is supporting disabled='' attribute and also the following type attributes: type="text",type="password", type="email" & type="tel"

HTML

<div class="form-group">
	<label>Input</label>
	<input class="input" type="text" placeholder="Enter something"/>
</div>

HTML

<div class="form-group-small">
	<label>Input</label>
	<input class="input input-small" type="text" placeholder="Enter something"/>
</div>
Saved, good job!

Select

Use .select to style your select HTML Element.

HTML

<select class="select">
	<option value="1">Option one</option>
	<option value="3">Option two</option>
	<option value="4">Option three</option>
	<option value="5">Option four</option>
</select>

Tabs

Use .tabs to style your wrapper.Use .tab to style each pill inside.

You can add data-badge attribute if you want to present a numerical values inside each tab. Use tabindex="0" for indicating that its element can be focused.

Photos
Videos
Gifs

HTML

<div class="tabs">
<div class="tabs-header-list">
	<div tabindex="0" class="tab tab-active">
		<div class="tab-text tab-badge" data-badge="1,000">Tab</div>
	</div>
	<div tabindex="0" class="tab">
		<div class="tab-text tab-badge" data-badge="2,201">Tab</div>
	</div>
	<div tabindex="0" class="tab">
		<div class="tab-text tab-badge" data-badge="2,858">Tab</div>
	</div>
</div>
</div>

Divider

Use <hr/> to clase .hr to add a divider.


HTML

<hr/>

Label

Use .label to use a label element. Use the .label-warning to add modificator.

Warning labelInfo label

HTML

<span class="label label-warning">Warning label</span>

App templates

Explore different startig kits layouts, which you can use to make good composition for your Miro app. The layout is based on grid. You can explore src/grid-system.css to get more details. You can get the basic structure and start building your app in no time.

You can use Gallery grid to quickly setup a fast layout composition for images, videos or other visual like assets which can be dragged and dropped on the board. You can add different elements inside this composition to answer your design needs.

HTML

<div class="grid">
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
	<div class="cs1 ce12"></div>
</div>

Icon template

You can use Icon grid to quickly setup a fast layout composition for icon like assets which can be dragged and dropped on the board. You can add different elements inside this composition to answer your design needs.

HTML

<div class="grid">
	<div class="cs1 ce3"></div>
	<div class="cs4 ce6"></div>
	<div class="cs7 ce9"></div>
	<div class="cs10 ce12"></div>
	<div class="cs1 ce3"></div>
	<div class="cs4 ce6"></div>
	<div class="cs7 ce9"></div>
	<div class="cs10 ce12"></div>
	<div class="cs1 ce3"></div>
	<div class="cs4 ce6"></div>
	<div class="cs7 ce9"></div>
	<div class="cs10 ce12"></div>
</div>

Mixed template

You can use Mixed grid to quickly setup a fast layout composition for images, videos or other visual like assets which can be dragged and dropped on the board. You can add different elements inside this composition to answer your design needs.

Photos
Videos
Gifs

HTML

<div class="grid">
<!-- input -->
	<div class="cs1 ce12">
		<input class="input input-small" type="text" placeholder="Enter something"/>
	</div>
	<div class="cs1 ce12">
<!-- tabs -->
		<div class="tabs">
			<div class="tabs-header-list">
				<div tabindex="0" class="tab tab-active">
					<div class="tab-text tab-badge">Tab one</div>
				</div>
				<div tabindex="0" class="tab">
					<div class="tab-text tab-badge">Tab one</div>
				</div>
				<div tabindex="0" class="tab">
					<div class="tab-text tab-badge">Tab one</div>
				</div>
			</div>
		</div>
	</div>
<!-- buttons -->
	<div class="cs1 ce12">
		<button class="button-icon button-icon-small icon-eye" type="button" ></button>
		<button class="button-icon button-icon-small icon-parameters" type="button" ></button>
	</div>
<!-- assets -->
	<div class="cs1 ce12 placeholder"></div>
	<div class="cs1 ce12 placeholder"></div>
	<div class="cs1 ce12 placeholder"></div>
</div>

Report an issue or request a feature

Mirotone is an open source project, so if you want to report bugs, improvements or feature request please fill out the form.