Components
Alert
Euroflorist Design System has five defined types of alerts, which are available for any length of text. Those elements can be modified for example changing the icon or adding optional dismiss button.
Default
<div class="alert" role="alert">
Default Text
</div>
<div class="alert alert-primary" role="alert">
Info Text
</div>
<div class="alert alert-warning" role="alert">
Warning Text
</div>
<div class="alert alert-success" role="alert">
Success Text
</div>
<div class="alert alert-danger" role="alert">
Error Text
</div>
Modificated
<div class="alert" role="alert">
Default Text
<i class="icon-check-filled alert-icon"></i>
</div>
<div class="alert alert-danger" role="alert">
Warning Text - <a href="">Link</a>
<i class="icon-warning-filled alert-icon"></i>
</div>
<div class="alert alert-primary" role="alert">
Info Text
<i class="icon-cross alert-icon clickable" aria-label="Close"></i>
</div>
Card
Euroflorist DS Framework contains two types of the card as a flexible container to present products.
Card with lifting animation was prepared in two options. One of them is prepared for full background images, there is no padding and floating element are not transparent. Another is prepared for images with white or transparent background.
Default

<div class="card">
<div class="card-img">
<img class="img-responsive" src="kss-assets/image/placeholder_white_200x200.png" alt="...">
</div>
<div class="card-body">Without animation</div>
</div>
Lifting

<div class="card card-lifting">
<div class="card-img">
<img class="img-responsive" src="kss-assets/image/placeholder_gray_200x200.png" alt="...">
</div>
<div class="card-body">
<div class="card-lifting-content">Example text</div>
<div class="card-lifting-hover">
hover
</div>
</div>
</div>
Lifting Transparent

<div class="card card-lifting card-transparent">
<div class="card-img">
<img class="img-responsive" src="kss-assets/image/placeholder_white_200x200.png" alt="...">
</div>
<div class="card-body">
<div class="card-lifting-content">Example text</div>
<div class="card-lifting-hover">
hover
</div>
</div>
</div>
Checkbox
Euroflorist DS define one type on of checkbox, which is prepared for all states and can be modified for need (for example gradient checkbox).
Default
<div class="form-check">
<input class="form-check-input" type="checkbox" id="default-checkbox">
<label class="form-check-label" for="default-checkbox">Default checkbox</label>
</div>
Disabled
<div class="form-check">
<input class="form-check-input" type="checkbox" id="disabled-checkbox-1" disabled checked>
<label class="form-check-label" for="disabled-checkbox-1">Disabled checkbox</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="disabled-checkbox-2" disabled>
<label class="form-check-label" for="disabled-checkbox-2">Disabled checkbox</label>
</div>
Gradient
<div class="form-check">
<input class="form-check-input" type="checkbox" id="gradient-checkbox">
<label class="form-check-label form-check-gradient" for="gradient-checkbox">Gradient checkbox</label>
</div>
Collapse
The collapse element was created to show and hide content. To use it in the project there need 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 there is need to 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, there is recommended to write a prefix js-
.
Initialize modal via JavaScript:
CollapsePanel.init('#product-panel');
<div id="product-panel" class="panel">
<div class="panel-heading">
<a class="panel-title" role="button" href="#product-info">Product information</a>
</div>
<div id="product-info" class="collapse">
<div class="panel-body">
The epitome of spring. Hot pinks mingled with yellow freesia, fragrant blue hyacinth, tulips
and orange roses to make a stunning arrangement, sure to impress. Packed up whilst still the
flowers are still in bud so the flowers remain fresh for longer.The epitome of spring. Hot pinks
mingled with yellow freesia, fragrant blue hyacinth, tulips and orange roses to make a stunning arrangement,
sure to impress. Packed up whilst still the flowers are still in bud so the flowers remain fresh for longer.
The epitome of spring. Hot pinks mingled with yellow freesia, fragrant blue hyacinth,
tulips and orange roses to make a stunning arrangement, sure to impress.
Packed up whilst still the flowers are still in bud so the flowers remain fresh for longer.
</div>
</div>
</div>
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.
<div class="dropdown dropdown-select">
<select class="dropdown-select-btn">
<option value="native-1">Item 1</option>
<option value="native-2">Item 2</option>
<option value="native-3">Item 3</option>
<option value="native-4">Item 4</option>
<option value="native-5">Item 5</option>
<option value="native-6">Item 6</option>
<option value="native-7">Item 7</option>
<option value="native-8">Item 8</option>
<option value="native-9">Item 9</option>
<option value="native-10">Item 10</option>
</select>
</div>
Custom
The custom dropdown can be used, where contain a few options, for example, sorting function.
Initialize modal via JavaScript:
new SingleDropdown('#dropdown');
<div class="dropdown">
<select id="dropdown" class="dropdown-select-btn">
<option value="native-1">Item 1</option>
<option value="native-2">Item 2</option>
<option value="native-3">Item 3</option>
<option value="native-4">Item 4</option>
<option value="native-5">Item 5</option>
<option value="native-6">Item 6</option>
<option value="native-7">Item 7</option>
<option value="native-8">Item 8</option>
<option value="native-9">Item 9</option>
<option value="native-10">Item 10</option>
</select>
</div>
Multiselect
The custom multi-select dropdown can be used, where user can choose more than one option, for example, filter function. There 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');
<div class="dropdown">
<select id="multi-dropdown" title="Select Multiple" multiple class="dropdown-select-btn">
<option value="native-1">Item 1</option>
<option value="native-2">Item 2</option>
<option value="native-3">Item 3</option>
<option value="native-4">Item 4</option>
<option value="native-5">Item 5</option>
<option value="native-6">Item 6</option>
<option value="native-7">Item 7</option>
<option value="native-8">Item 8</option>
<option value="native-9">Item 9</option>
<option value="native-10">Item 10</option>
</select>
</div>
Form
Default form field size uses a height of 48px, small forms use a height of 36px (add .form-control-sm
).
Default
<div class="form-group">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
</div>
<div class="form-group has-success">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
</div>
<div class="form-group has-error">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
</div>
<div class="form-group">
<input class="form-control" type="text" disabled="">
<label class="form-label" for="">Text label</label>
</div>
Small
<div class="form-group">
<input class="form-control form-control-sm" type="text">
<label class="form-label" for="">Text label</label>
</div>
<div class="form-group has-success">
<input class="form-control form-control-sm" type="text">
<label class="form-label" for="">Text label</label>
</div>
<div class="form-group has-error">
<input class="form-control form-control-sm" type="text">
<label class="form-label" for="">Text label</label>
</div>
<div class="form-group">
<input class="form-control form-control-sm" type="text" disabled="">
<label class="form-label" for="">Text label</label>
</div>
With helper text
<div class="form-group-container">
<div class="form-group">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
</div>
<span class="form-group-message">Helper text</span>
</div>
<div class="form-group-container">
<div class="form-group has-success">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
</div>
<span class="form-group-message">Helper text</span>
</div>
<div class="form-group-container">
<div class="form-group has-error">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
</div>
<span class="form-group-message">Helper text</span>
</div>
<div class="form-group-container">
<div class="form-group">
<input class="form-control" type="text" disabled="">
<label class="form-label" for="">Text label</label>
</div>
<span class="form-group-message">Helper text</span>
</div>
With icon
<div class="form-group form-group-with-icon">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
<span class="form-icon"><i class="icon-info-line"></i></span>
</div>
<div class="form-group form-group-with-icon has-success">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
<span class="form-icon"><i class="icon-info-line"></i></span>
</div>
<div class="form-group form-group-with-icon has-error">
<input class="form-control" type="text">
<label class="form-label" for="">Text label</label>
<span class="form-icon"><i class="icon-info-line"></i></span>
</div>
<div class="form-group form-group-with-icon">
<input class="form-control" type="text" disabled="">
<label class="form-label" for="">Text label</label>
<span class="form-icon"><i class="icon-info-line"></i></span>
</div>
Textarea
<div class="form-group">
<div class="group">
<label class="form-label-normal" for="">Text label</label>
<textarea class="form-control form-control-textarea"></textarea>
</div>
<span class="form-group-message form-group-message-right">Helper text</span>
</div>
<div class="form-group form-group-textarea has-success">
<div class="group">
<label class="form-label-normal" for="">Text label</label>
<textarea class="form-control form-control-textarea"></textarea>
</div>
<span class="form-group-message form-group-message-right">Helper text</span>
</div>
<div class="form-group form-group-textarea has-error">
<div class="group">
<label class="form-label-normal" for="">Text label</label>
<textarea class="form-control form-control-textarea"></textarea>
</div>
<span class="form-group-message form-group-message-right">Helper text</span>
</div>
Form Group
The form group is a set of two elements, easily extends form controls by text buttons or checkboxes.
Default
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">example</span>
</div>
<input type="text" class="form-control" placeholder="Input">
</div>
<div class="input-group">
<input type="text" class="form-control" placeholder="Input">
<div class="input-group-append">
<span class="input-group-text ">example</span>
</div>
</div>
Small
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text input-group-text-sm">example</span>
</div>
<input type="text" class="form-control form-control-sm" placeholder="Input">
</div>
<div class="input-group">
<input type="text" class="form-control form-control-sm" placeholder="Input">
<div class="input-group-append">
<span class="input-group-text input-group-text-sm">example</span>
</div>
</div>
Checkbox
<div class="input-group">
<div class="input-group-prepend">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="check-input-group">
<label class="form-check-label" for="check-input-group"></label>
</div>
</div>
<input type="text" class="form-control" placeholder="Input checkbox">
</div>
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 (base 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 to this 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
<button id="modalBtn" type="button" class="btn btn-primary" data-modal="modal">Modal</button>
<div class="modal" id="modal">
<div class="modal-dialog">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal">
<i class="icon-cross"></i>
</button>
<h3 class="modal-title">This is a title heading</h3>
<p class="modal-content">Välkommen! Det är jag som är FloristFia och det här min oas, en plats
för dig som tycker om blommor och vill ha inspiration till allt vackert du kan göra med
dem. Här delar jag med mig av mina bästa tips och visar hur du gör allt från vackra
bordsdukningar till ljuvliga buketter med säsongens blommor.</p>
<div class="modal-btn">
<button type="button" class="btn btn-ghost-dark btn-sm" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-secondary btn-sm">Save</button>
</div>
</div>
</div>
</div>
Small
<button id="modalBtn2" type="button" class="btn btn-primary" data-modal="modal2">Small Modal</button>
<div class="modal" id="modal2">
<div class="modal-dialog">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal">
<i class="icon-cross"></i>
</button>
<p class="modal-content">Välkommen! Det är jag som är FloristFia och det här min oas, en plats
för dig som tycker om blommor.</p>
</div>
</div>
</div>
Content
This is a title heading
<button id="modalBtn3" type="button" class="btn btn-primary" data-modal="modal3">Content Modal</button>
<div class="modal" id="modal3">
<div class="modal-dialog">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal">
<i class="icon-cross"></i>
</button>
<h3 class="modal-title">This is a title heading</h3>
<p class="modal-content">
<input class="form-control form-control-sm" type="text" placeholder="Input modal">
</p>
<div class="modal-btn">
<button type="button" class="btn btn-ghost-dark btn-sm" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-secondary btn-sm">Save</button>
</div>
</div>
</div>
</div>
Spinner
Spinner is a simple circle spinning around its own centre including small animation of color referring to main gradient.
<i class="spinner"></i>
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.
<button type="button" class="btn btn-primary" data-tippy="Tooltip" data-tippy-content="Tooltip" data-tippy-arrow="true"
data-tippy-placement="top">
Tooltip on top
</button>
<button type="button" class="btn btn-primary" data-tippy="Tooltip" data-tippy-content="Tooltip" data-tippy-arrow="true"
data-tippy-placement="bottom">
Tooltip on down
</button>
<button type="button" class="btn btn-primary" data-tippy="Tooltip" data-tippy-content="Tooltip" data-tippy-arrow="true"
data-tippy-placement="left">
Tooltip on left
</button>
<button type="button" class="btn btn-primary" data-tippy="Tooltip" data-tippy-content="Tooltip" data-tippy-arrow="true"
data-tippy-placement="right">
Tooltip on right
</button>