Content
- Variables
- Typography
- Icons
- Buttons
- Checkbox
- Toggle
- Radio button
- Link
- Textarea
- Input
- Select
- Tabs
- Divider
- Label
- App Layouts
Mirotone is a small & lightweight skeleton UI Kit that tries to match Miro styles for building apps and plugins. The package contains a HTML & CSS files which can be used for any project.
Install the package as a dependancy on your own project by running
npm install mirotone
// or with yarn
yarn add mirotone
Link the css directly by standart css linking, recommended to be used if you don't want to consume the package and icons pack
<link rel="stylesheet" href="https://unpkg.com/mirotone/dist/styles.css">
Read more on Github
Mirotone uses the BEM naming conventation. You define the type of CSS and add a modifier to it.
Example:
<button class="button button-primary">Primary button</button>
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.
Those variables are defined by literal value.
Example:
--space-xsmall: 8px
Those variables are calculated based on a initial variable created.
Example:
--space-xsmall: 8px
--space-small: calc(var(--space-xsmall) * 2)
Use .h1
– .h4
class to change an elements, it is also normalizing each text
element. font size and weight to match Miro heading styles.
<h1 class="h1">Heading 1</h1>
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
<p class="p-large">Paragraph large</p>
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.
<div class="icon icon-eye"></div>
Use the .checkbox
class.
<label class="checkbox"> <input type="checkbox" checked=""> <span>Checkbox</span> </label>
<label class="checkbox"> <input type="checkbox"> <span>Checkbox</span> </label>
Use the .toggle
class.
<label class="toggle">
<input type="checkbox" checked="">
<span>First toggle</span>
</label>
<label class="toggle">
<input type="checkbox">
<span>Second toggle</span>
</label>
Use the .link
class to stlye the <a>
tag
Use the .link-primary
to add modificator for color.
<a class="link link-primary" href="">Primary</a>
Use a .form-group
to group the textarea with label and status if needed.
<div class="form-group">
<label>Textarea</label>
<textarea class="textarea" placeholder="Placeholder text" spellcheck="true" rows="4"></textarea>
</div>
Use a .form-group
to group the input with label and status if needed.
You can find two sizes of inputs: .input
and .input-small
For .input-small
combine it with a .form-group-small
as wrapping style.
Input is supporting disabled=''
attribute and also the following type attributes:
type="text"
type="password"
type="email"
type="tel"
<div class="form-group">
<label>Input</label>
<input class="input" type="text" placeholder="Enter something"/>
</div>
<div class="form-group-small">
<label>Input</label>
<input class="input input-small" type="text" placeholder="Enter something"/>
</div>
Use a .select
class to style your select
HTML Element.
<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>
Use a .tabs
class to style your wrapper. Use .tab
to style each pill.
You can add data-badge
attribute if you want to present a numerical values inside each tab.
You can use tabindex="0"
for indicating that its element can be focused.
<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>
Use a <hr/>
or class .hr
to use a divider.
<hr/>
Use a class .label
to use a label element.
Use the .label-warning
to add modificator.
<span class="label label-warning">Warning label</span>
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. Currently Mirotone provides three basic layouts which are hosted in glitch and can be taken
from there.
• Gallery grid allows you to create basic setup for your drag and drop visual assets.
• Icon grid allows you to create basic setup for your drag and drop icon assets.
• Mixed grid allows you to create basic setup with different elements.
Mirotone is an open source project, so if you want to report bugs,improvements or feature request please fill out the form.