Akeneo styleguides
Overview
In the following pages you will find a comprehensive list of available modules for Akeneo PIM. We organize our styles using the BEM methodology.
BEM means:
- Block: a designed entity,
- Element: a part of the block,
- Modifier: a variation on a block or on an element.
Different naming conventions are available for the BEM methodology. In Akeneo PIM, we implement the following convention:
- AknBlockName for the main block declaration. We use the prefix Akn to distinguish Akeneo blocks from those of external libraries. The block name is in upper CamelCase.
- AknBlockName-elementName for each element of the block. The element is linked to the block name with a simple dash, and uses lower camelCase.
- AknBlockName-elementName--modifierName or AknBlockName--modifierName for the modifiers. The modifier is linked to the block or element with 2 dashes and uses lower camelCase
You can use every block in your custom development, simply with a copy-paste of the HTML code.
You can also mix 2 blocks together. For example, the module AknButtonList prints a list of buttons, centered with the modifier --center:
<div class="AknButtonList AknButtonList--centered">
<div class="AknButtonList-item">Item 1</div>
<div class="AknButtonList-item">Item 2</div>
</div>
The AknButtonList-item is an element of AknButtonList, but can also be a module itself, for example AknIconButton:
<div class="AknButtonList AknButtonList--centered">
<div class="AknButtonList-item AknIconButton AknIconButton--important"><i class="icon-star"></i></div>
<div class="AknButtonList-item AknIconButton AknIconButton--apply"><i class="icon-star"></i></div>
</div>
AknButton Show code
Prints buttons with text, with or without an icon. You can mix this module's modifiers: for example, you can create a big important uppercase button with an icon. If the button contains only an icon, please use the AknIconButton module.
Modifiers
AknButtonList Show code
Prints a list of buttons. This can be used with a single button. By default, buttons are left-aligned.
Modifiers
AknActionButton Show code
The action buttons are used for all the secondary actions on a page (it should not change or reload the current page).
Modifiers
AknSeveralActionsButton Show code
Prints a button with several actions: a primary action and secondary actions. The text of the primary action is displayed on the button, and a caret is available to display the other actions.
Modifiers
AknDropdownButton Show code
Prints a button to choose the action within a dropdown (there is no primary action).
Modifiers
AknGrid Show code
Header 1 | Header 2 | Header 3 |
---|---|---|
Content 1 | Content 2 | Content 3 |
Content 4 | Content 5 | Content 6 |
Modifiers
Condensed Show code
Header 1 | Header 2 | Header 3 |
---|---|---|
Content 1 | Content 2 | Content 3 |
Content 4 | Content 5 | Content 6 |
Unclickable Show code
Header 1 | Header 2 | Header 3 |
---|---|---|
Content 1 | Content 2 | Content 3 |
Content 4 | Content 5 | Content 6 |
AknGridContainer Show code
This is a container for a grid. The goal is to display the empty set.
AknFormContainer Show code
Prints a fixed-width container for listing form elements vertically.
Modifiers
AknFieldContainer Show code
A Field container is mainly composed of a label and an input. You can create a very simple field container with these 2 elements. You can also add a footer (for validation errors, for example), add icons next to the input, etc. Basically, a field container will take all the width of the parent container. To resize it, use the AknFormContainer module.
Modifiers
AknTextField Show code
Prints a simple text field. The radius modifiers can be used to create inline forms.
Modifiers
AknMetricField Show code
Prints an inline field containing a text field and a dropdown menu to choose a unit.
AknPriceList Show code
Prints a list of prices. The width of each price is computed to display 3 inline prices on an AknFormContainer
AknColumnConfigurator Show code
AknProjectWidget Show code
AknCommentPanel Show code
-
-
John Doe comments the product 11/07/2017 10:27 AM
-
John Doe replies to the comment 11/07/2017 10:27 AM
-
AknLoadingMask Show code
The loading mask is used when an element is being loaded. Please note than all the style attributes in the source example are automatically generated by the application, you don't need to add them.
AknDiff Show code
Displays text with differences (add or remove). Basically, the style only displays inline text, so you have to use one of the available modifiers to see the difference.
Modifiers
AknSquareList Show code
Found a typo or a hole in the documentation and feel like contributing?
Join us on Github!