Development
Checkbox
Euroflorist DS define one type of checkbox, which is prepared for all states and can be modified for need.
Default
Disabled
Collapse
The collapse element was created to show and hide content. To use it in the project copy template below.
Id attribute for the .collapse
element should be unique and put as a value for the href
attribute of .panel-title
element.
To initialize collapse use a function with parameter as a selector of .panel
element. There can be an id
(for single elements) or a class
(for group elements). For class name, it is recommended to write a prefix js-
.
Initialize modal via JavaScript:
CollapsePanel.init('#product-panel');
Cursor
Generic cursor classes allow to quickly change a cursor behavior without creating dedicated classes in code for elements, which need that type of cursor.
The following table presents the values for the CSS property cursor
:
.clickable |
pointer |
.not-allowed |
not-allowed |
Display
Generic display classes allow to quickly change property without creating dedicated classes in code for elements, which need that type of cursor.
The following table presents the values for the CSS property display
:
.block |
block |
.inline |
inline |
.inline-block |
inline-block |
Block
Inline
Inline-block
Dropdown
A dropdown receives user input, allowing it to choose one of several options. The DS library included three types of dropdown presented below.
Native
The native dropdown should be used for checkout flow or for dropdowns where is a lot of options. It will be more friendly user experience.
Custom
The custom dropdown can be used, that contains a few options, for example, sorting function.
Initialize modal via JavaScript:
new SingleDropdown('#dropdown');
Multiselect
The custom multi-select dropdown can be used, where user can choose more than one option, for example, filter function. It is important to include title
attribute in select
tag because the value of this attribute will be used as a placeholder text.
Initialize modal via JavaScript:
new MultipleDropdown('#multi-dropdown');
Float
Change how an element is positioned within the layout using float and clear generic classes.
Using float classes remember to add .clearfix
to the parent element.
The following table presents the CSS property float
:
.float-none |
none |
.float-left |
left |
.float-right |
right |
Form Field
Default form field size uses a height of 48px, small forms use a height of 36px (add .form-control-sm
).
Default
With helper text
Textarea
Grid System
Euroflorist DS Framework includes a responsive, mobile-first fluid grid system based on 12 columns. Predefined classes are easy to implement layout options.
Implementing
There are few rules to properly create page layouts through a series of rows and columns.
- Columns must be placed within a
.row
element for right alignment. - Rows can be used to create horizontal groups of columns.
- Grid columns are created by specifying the number of twelve available columns you wish to span. For example:
.col-xs-6
(50% of the width). - If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.
Classes
Euroflorist DS Grid System contains a group of flexible classes to prepare layout fitted to mobile devices the same as on desktop.
Wrap your grid by element with one of those class:
.container |
fixed-width (max-width: 1200px) |
.container-fluid |
full-width |
Build the responsive layout base on below classes:
.col-xs- * |
Extra small <768px |
.col-sm- * |
Small devices ≥768px |
.col-md- * |
Medium devices ≥992px |
.col-lg- * |
Large devices ≥1200px |
Hide or show elements using classes below:
.display |
Show for all resolution |
.display-none |
Hide for all resolution |
.display-tablet-block |
Show resolution ≥768px |
.display-tablet-none |
Hide resolution ≥768px |
.display-desktop-block |
Show resolution ≥992px |
.display-desktop-none |
Hide resolution ≥992px |
.display-lg-block |
Show resolution ≥1200px |
.display-lg-none |
Hide resolution ≥1200px |
Example
Image
Images are made responsive with .img-responsive
thanks to that class the image will be scaling with the parent element.
List styles
List inline
Remove a list’s bullets and apply some light margin
with a combination of two classes, .list-inline
and .list-inline-item
.
- First
- Second
- Third
List unstyled
Remove bullets from an unordered list or numbers from an ordered list by applying .list-unstyled
to the <ul>
.
- First
- Second
- Third
Modal
Modals are built with HTML, CSS, and JavaScript and they’re positioned over everything else in the document. That means there is a need to build an HTML structure of modal (based on the examples below) and put it in DOM, no matter in which place because modal will be moved to the bottom of HTML document.
In the button, which fire modal, there should be the date attribute data-modal
with the modal's id as a value.
Example:
<button id="idButton" type="button" data-modal="modal">Modal</button>
Initialize modal via JavaScript:
new Modal('#idButton');
If there is a need to fire modal by different buttons - use the dedicated class name. Example:
<button class="js-modal-btn" type="button" data-modal="modal">Modal</button>
<button class="js-modal-btn" type="button" data-modal="modal">Modal</button>
<script>
new Modal('.js-modal-btn');
</script>
Default
This is a title heading
Small
Content
This is a title heading
Position
Change an element’s position using generic positioning classes.
Prevent events
Generic utilities class no-events
causes the element to not be the target of pointer events.
Spinner
Spinner is a simple circle spinning around its own centre.
Text alignment
Use text alignment utilities to left align, centre, right align text or justify text.
Center
Everyone’s favourite flower is back, but only for a short time. This simply beautiful bouquet of blush pink peonies, complemented with gypsophila is the ideal gift this peony season.
Justify
Everyone’s favourite flower is back, but only for a short time. This simply beautiful bouquet of blush pink peonies, complemented with gypsophila is the ideal gift this peony season.
Left
Everyone’s favourite flower is back, but only for a short time. This simply beautiful bouquet of blush pink peonies, complemented with gypsophila is the ideal gift this peony season.
Right
Everyone’s favourite flower is back, but only for a short time. This simply beautiful bouquet of blush pink peonies, complemented with gypsophila is the ideal gift this peony season.
Tooltip
Euroflorist Design System is using Tippy.js library to create simple static text tooltips. Hover over the buttons below to see the four tooltips directions: top, right, bottom, and left.