Volue logo
Volue logomark
Wave Core
Show Hide
v1.14.1 16-10-2024
Jump to section

Text

Heading Giga (x3.157 - 51px)

Heading Alpha (x2.369 - 38px)

Heading Beta (x1.777 - 28px)

Heading Gamma (x1.333 - 21px)

Heading Delta (x1.17 - 19px)

Heading Epsilon (x1.00 - 16px)
Heading Zeta (x0.857 - 14px)

Blockquote Suspendisse aliquam in ante a ornare. Pellentesque quis sapien sit amet dolor euismod congue. Donec non semper arcu. Sed tortor ante, cursus in dui vitae, interdum vestibulum massa.

Paragraph (16px) - Suspendisse link in ante a ornare. Pellentesque quis sapien sit amet dolor euismod congue. Donec non semper arcu. Sed tortor ante, cursus in dui vitae, interdum vestibulum massa.

Quotes Suspendisse aliquam in ante a ornare.

Bold Normal

Uppercased text

uppercased first letter

Lowercased text

Capitalized text

Headings use the Augmented Fourth modular scale to ensure consistent size progression. Every heading has a corresponding class to go with it. This allows us to apply, say class .gamma to a <h2>; a double-stranded heading hierarchy:

h2 - .gamma

p - .beta

div - .gamma--l (large viewports)

You can include horizontal dashed lines on either side of heading text:

Line-on-sides heading

Line-on-left-side heading

Line-on-right-side heading

You can track text that is set to uppercase to improve readability (lowercase text should never be tracked):

Heading Example

This is an eyebrow

This is a headline

If you want to prevent the text contents of an element from being selectable, use .unselectable:

Paragraph with disabled text selection Nulla fringilla, erat vel lobortis adipiscing, lorem massa elementum felis, quis aliquet orci felis consectetur enim. Curabitur facilisis eget orci vitae tempor.

Use .txtTruncate to truncate a single line of text, with ellipsis:

Truncated paragraph Nulla fringilla, erat vel lobortis adipiscing, lorem massa elementum felis, quis aliquet orci felis consectetur enim. Curabitur facilisis eget orci vitae tempor. Phasellus arcu lorem, dapibus sit amet elit vitae, porta mattis magna. Donec interdum felis at iaculis dictum. Aliquam convallis lorem vitae orci porttitor blandit.

Use .txtHyphenate to enable word hyphenation for text wrapping to the next line:

Hyphenated paragraph CSS Hyphenation is locale-aware (depending on the dictionaries available for your browser) and inserts the hyphen character in the correct place when breaking the words. Browser support for text hyphenation is currently limited (see https://caniuse.com/#feat=flexbox) but in some cases (mobile for example) it's more elegant to have an hyphenated text. You have to define a lang-attribute on an element that carries text that should be hyphenated.

Use .wsNW to prevent whitespace wrapping:

Prevent whitespace wrapping Nulla fringilla, erat vel lobortis adipiscing, lorem massa elementum felis, quis aliquet orci felis consectetur enim. Curabitur facilisis eget orci vitae tempor. Phasellus arcu lorem, dapibus sit amet elit vitae, porta mattis magna. Donec interdum felis at iaculis dictum. Aliquam convallis lorem vitae orci porttitor blandit.

Use .txtAnimatedEllipsis to create an animated ellipsis:

Text with animated ellipsis at the end

Use measure helpers to control typographical measure. This is useful for avoiding extra long lines of text in fluid layouts and ensuring a comfortable range of characters per line.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Use .owB or .wbA to break strings when their length exceeds the width of their container. .owN or .wbN revert to the default value: normal.

normal – lines will be broken at normal break points (spaces etc.). Text will exceed the bounding box. Spårvagnsaktiebolagsskensmutsskjutarefackföreningspersonalbeklädnadsmagasinsförrådsförvaltarensmultiplikationsudregningstabelshæfteopbevaringsreolsproduktion.

owB (break-word) – words that exceed the bounds of the box will be broken. Text will stay within the box border. Spårvagnsaktiebolagsskensmutsskjutarefackföreningspersonalbeklädnadsmagasinsförrådsförvaltarensmultiplikationsudregningstabelshæfteopbevaringsreolsproduktionsfacilitet.

wbA (break-all) – lines may break between any two letters. Text will stay within the box border. Spårvagnsaktiebolagsskensmutsskjutarefackföreningspersonalbeklädnadsmagasinsförrådsförvaltarensmultiplikationsudregningstabelshæfteopbevaringsreolsproduktionsfacilitet.

Use .lh to set the line-height to be equal to the size of the font. .lhI forces the line-height to be inherited from a parent element.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Use .txtAssistive to make text visually hidden but accessible. It is recommended to include a visually hidden label along with icons to provide meaningful text alternative:

Tasks

Use .txtInheritColor if you want an element to explicitly inherit the ancestor's text color:

This header should be green


Links

Use .textLink for visually styled text links with color cues. Text links usually appear inside paragraphs or lists.

This is some text with a Styled text link placed in a paragraph. Nulla fringilla, erat vel lobortis adipiscing, lorem massa elementum felis, quis aliquet orci felis consectetur enim.

Use .linkClean to remove text-decoration for any state:

Use .linkComplex together with .linkComplex-target to limit text-decoration to only selected items within links:

Use .linkTouchFriendly to increase hit area of an inline link for a better usability with touch devices:

Use .linkOverlay and .with-linkOverlay on the containing element to make the entire container clickable:

Heading

Secondary content

Overlay link


Colors & backgrounds

A background fill can be applied using one of the fill helpers.

If you want to just set the text color, you can use one of the text color helpers.

A full list of the available color helper classes is available in the colors documentation page.

See colors documentation

Elevation

Helper classes for shadow effects to give the illusion of elevation

The effect of the elevation is defined by the intensity and depth of the shadow:

elevationXs Cards
elevationS Tooltips, toasts
elevationM Dropdowns, popovers
elevationL Panels, Modal dialogs

Borders

Helper classes to set the desired border on any element

.bdr<direction><size>

<direction>

  • A = all
  • T = top
  • R = right
  • B = bottom
  • L = left
  • H = horizontal
  • V = vertical

<size>

  • n = none
  • s = small
  • m = medium
  • l = large
  • xl = extra large
bdrAs
bdrAm
bdrAl
bdrAxl

Replace .bdrV<size> with .bdrH<size> for horizontal borders:

bdrVs
bdrVm
bdrVl
bdrVxl

Replace .bdrT<size> with .bdrB<size> for bottom border, .bdrL<size> for left border and .bdrR<size> for right border:

bdrTs
bdrTm
bdrTl
bdrTxl

You can tweak borders using one of the style modifiers and define their color using border color helpers.

By default border-color will be the same value as color.

bdrAm bdr--dots
bdrAl bdr-accent--bold
bdrHm bdrBl bdr-accent--strong
bdrAn bdrBs bdrLs bdr-neutral--moderate
bdrAn bdrVm bdr-neutral--bold bdr--dashed

To control the border radius of an element, use .rounded<direction><size> utilities:

<direction>

  • A = all
  • T = top
  • B = bottom

<size>

  • n = none
  • xs = extra small
  • s = small
  • m = medium
  • l = large
  • xl = extra large
  • full
roundedAxs
roundedAs
roundedTs
roundedAm
roundedBm
roundedAfull

Sizing

Helper classes for sizing elements

Percentage widths are preferred as they let elements adjust to device viewport dimensions. Percentage-based widths are great for creating fluid grid layouts (see grid component). Fixed widths should generally be used only for small fixed-sized items (for example fixed-sized number input).

Sizing helpers are namespaced across four breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)
  • --xl = extra large (1400px and higher)

For example .w50--m limits 50% width to medium breakpoint.

Percentage widths scale (10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100):

Fixed widths scale (1, 2, 3, 4, 5, 6):

Use .maw<scale> to set the maximum width of a given element:

.maw<scale>ch are designed for specific character lengths. They are useful when constraining form inputs width.

Use .wA/.mawN to reset width/max-width to original value (auto/none):

Use .miw0 to force min-width to become zero.

This is useful when working with flexbox. By default, flex items won’t shrink below their minimum content size, which is equal to the size of their contents. You can use .miw0 to change this:

flex item
nested flex item
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet.

Use .mih100 to make an element the height of its parent. .mah100 will make the maximum height equal parents height.

mih100
mah100
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet.

Spacing

Helper classes to adjust the spacing between components

Use these to tweak layout on a micro level.

Spacing helpers use the following spacing scale:

xs
s
m
l
xl
xxl
xxxl

Spacing should not be declared outside of these helpers. This is meant to help keep predictable and harmonious spacing for components and templates and avoid magic numbers.

.<type><direction><size>

<type>

  • m = margin
  • p = padding

<direction>

  • A = all
  • T = top
  • R = right
  • B = bottom
  • L = left
  • H = horizontal
  • V = vertical

<size>

  • n = none
  • xs = extra small
  • s = small
  • m = medium
  • l = large
  • xl = extra large
  • xxl = extra extra large
  • xxxl = 3x extra large

Spacing helpers are namespaced across four breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)
  • --xl = large (1400px and higher)

For example .mTm--m.pAl--m only kicks in at a medium breakpoint.

I have a medium vertical margin at a medium breakpoint
I have a large horizontal padding at a large breakpoint

Replace .<type>V<size> with .<type>H<size> for horizontal spacing:

Replace .<type>T<size> with .<type>B<size> for bottom spacing, .<type>L<size> for left spacing and .<type>R<size> for right spacing:

Combine spacing helpers to get the desired spacing:

Setting the width of a block-level element will prevent it from stretching out to the edges of its container to the left and right. Then, you can set margin-left and margin-right to auto using .mHa to horizontally center that element within its container:


Display

Helper classes to control display type

  • .dI – display inline
  • .dIB – display inline-block
  • .dB – display block
  • .dT – display table
  • .dTR – display table-row
  • .dTC – display table-cell

For example, to make a block-level element inline, use the .dI class. To make inline elements block-level, use .dB.

Display helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

For example .dB--m only kicks in at a medium breakpoint.

dB (block)
dIB (inline-block)
dIB (inline-block)
dIB (inline-block)
dI (inline)
I am a block item with padding at a medium breakpoint
dTC (table-cell)
dTC (table-cell)
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Ham bacon corned beef, sausage kielbasa flank tongue pig drumstick capicola swine short loin ham hock kevin.
dTC (table-cell)
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Ham bacon corned beef, sausage kielbasa flank tongue pig drumstick capicola swine short loin ham hock kevin.
dTC (table-cell)
Image

Body

To add padding to the body, nest another div within the full-width table-cell

Use .dT--l and .dTC--l to keep table objects stacked at smaller screen sizes. .tblF helper creates equal-width cells:

cell 1
cell 2
content
cell 3
more content

You can combine .dT and .mHa to horizontally center-align dynamic element with no side effects:


Alignment

Helper classes to set horizontal (text) alignment and vertical alignment

Vertical alignment works only on inline or inline-block elements and table cells and when not used on a table cell, it will affect the alignment of the element itself, not the element’s contents.

Text alignment helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

For example .txtL--m only kicks in at a medium breakpoint.

txtL (align left)
txtC (align center)
txtR (align right)
I am some right aligned text at a large breakpoint
vaBL (align to the baseline)
vaT (align to the top)
vaM (align to the middle)
vaB (align to the bottom)

Ratios

Helper classes for setting the ratio of an element

Use these helpers together with the responsive embed component.

Ratio helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

For example .fourByThree--ns only kicks in above mobile.

The padding property is the magic that sets a ratio. This is because the padding property is set as a percentage of the width of the containing block.

oneByOne
fourByThree
sixteenByNine
twoByOne
threeByOne

Offset

Helper classes for leading and trailing offsets

Offset helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

For example .before25--ns only kicks in above mobile.


Floats

Helper classes to control floating

When you float an element left or right, the content following the float will flow beside and around the element. Read more about floats.

Float helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

For example .fR--m only kicks in at a medium breakpoint.

Do not set display properties on floated elements. When elements are floated, they are set to display block.

If an element contains only floated children, its height will collapse. Clearfix-class (.cf) is used to ensure the parent element maintains the height of its content. Read more about the clearfix.

fL (float left)
fL
fR (float right)

Nesting elements with percentage-based widths:

fL w50
fR w50
fR w50

Using the new block formatting context on an element placed after one or more floated elements will prevent that element from wrapping under the floated elements.
Read more about the new block formatting context.

fL mRm
nbfc (new block formatting context).
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Ham bacon corned beef, sausage kielbasa flank tongue pig drumstick capicola swine short loin ham hock kevin. Bacon t-bone hamburger turkey capicola rump short loin. Drumstick pork fatback pork chop doner pork belly prosciutto pastrami sausage. Ground round prosciutto shank pastrami corned beef venison tail. Turkey short loin tenderloin jerky porchetta pork loin.
fL
fR
nbfc (new block formatting context – container with a flexible center).
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Ham bacon corned beef, sausage kielbasa flank tongue pig drumstick capicola swine short loin ham hock kevin.

Simple list with items containing icon to the left, with descriptive content:

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Ham bacon corned beef, sausage kielbasa flank tongue pig drumstick capicola swine short loin ham hock kevin.
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Ham bacon corned beef, sausage kielbasa flank tongue pig drumstick capicola swine short loin ham hock kevin.
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Ham bacon corned beef, sausage kielbasa flank tongue pig drumstick capicola swine short loin ham hock kevin.

Simple pagination example:


Positioning

Helper classes for positioning elements

  • .posR keeps elements in the default document flow but create a new positioning context.
  • .posA pulls elements from the default document flow and positions them according to their positioning context.
  • .posF gives an element fixed positioning relative to the viewport. Use it with caution, as mobile browsers have shaky support for fixed positioning.

Positioning helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

For example .posA--m.t0--m.r0--m only kicks in at a medium breakpoint.

Use positioning only when necessary. Absolute/fixed positioning alters the default document flow and places an element at a specific point of the page. Be sure to check out the way things look on smaller screens. Often it's a good idea to trigger absolute/fixed positioning only on larger viewports, by using .posA--l or .posF--l.

Use the .posR to give a context for absolute positioning. Use the .posA along with the .t0, .r0, .b0, and .l0 helpers to anchor elements to the top, right, bottom, or left of their current positioning context. You can add space around the anchored elements using the padding or margin helpers:

posA l20 mTs

Position anything

posA b0 l0 mAs
posA t0 r0 mAs
posA t0 r0 mAxl
posR
I am positioned to the right corner at a large breakpoint

Use the special .tH helper along with .posA to account for the top offset of the navigation bar:

I am positioned below the header

Using two opposing anchoring helpers, such as .l0 and .r0 will make an element span the full width:

posR
posA r0 t0 b0

You can accomplish horizontal centering by using a combination of .mHa and a width helper:

posR
posA--l t0 r0 l0 mHa--l maw40--l
posA t0 r0

You can center whatever you want, even if you don’t know it's width or height. Use .tC to center vertically and .lC to center horizontally:

posR
posA tC r0 l0
posA lC t0 b0

By default, positioned elements are stacked one on top of the other based on their position in the document. Try reordering elements in the document before applying z-index properties. If you need to set z-index, start with the .z1 and work up from there:

posR
posA t0 r0 z2
posA t0 r0 z1 mAs
posA t0 r0 mAxl

Overflow

Helper classes to control overflow

  • .ofV – overflow visible
  • .ofH – overflow hidden
  • .ofS – overflow scroll
  • .ofA – overflow auto

Overflow helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

For example .ofH--l only kicks in at a large breakpoint.

If you want to denote text that overflows the containing element with an ellipsis use .txtTruncate from text helpers.

ofA
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.
I am a div with a hidden overflow at mobile devices and a medium breakpoint
Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Use .scrollable-y or .scrollable-x to allow for one-axis scrolling of an overflow content. These classes will also enable native touch-based momentum scrolling (scrolling with inertia) on iOS devices.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Use .scrollable-y:hover or .scrollable-x:hover to enable one-axis scrolling of an overflow content on hover (applies only for non-touch devices). This is handy in case the scrollbar is visually awkward and you want to show it only upon interacting with an element. Use this with caution and always consider UX implications.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.

Add .themedScrollbar to enable themed scrollbar in case "native OS" scrollbar causes visual issues. Currently works only for WebKit browsers.

Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison. Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock filet mignon shoulder hamburger pig venison.


FlexLimited browser support

Helper classes based on CSS3 Flexbox Layout module

Flex helpers can help solve many page-level and micro layout problems. They provide:

  • Control over an elements vertical and horizontal alignment
  • Control over the content vertical and horizontal alignment
  • Automatic width distribution without having to declare widths
  • Reordering elements in your layouts independently of their order in the markup

If you need to make your application compatible with older versions of Internet Explorer (IE 9), be careful to use flex helpers, as they are not supported in these browsers (see detailed browser support and compatibility here).

You can use an older style layout hand in hand with flex helpers to achieve graceful degradation. Flex helpers take over when applicable, but browsers that don’t support them will ignore the flexbox layout and fall back to the simpler layout.

You can safely use flex helpers to enhance viewing experience on smaller screens, since flexbox layout has widespread support amongst mobile browsers.

Flex helpers are namespaced across three breakpoints:

  • --ns = not-small (covers everything larger than mobile: 500px and higher)
  • --m = medium (500px to 780px)
  • --l = large (780px and higher)

To begin, add the .dF class to a parent element to define a flex container or .dIF to define an inline flex container. This enables a flex context for all immediate child elements (flex items). By default, all flex items will be aligned to the left and equally matched in height. The flex container is displayed as a block element.

flex item
flex item
flex item
that is taller than the others

You can enable flexbox layout only for smaller screens by combining .dF and .dB--l helpers.

float, clear and vertical-align have no effect on a flex item, and do not take it out-of-flow.

Direction

These classes define the axis flex items are placed on and their direction. By default, items run horizontally from left to right. Think of flex items as primarily laying out either in horizontal rows or vertical columns.

  • .fdR – lay out flex items from left to right (default). Combine it with .fwW to enable wrapping of flex items.
  • .fdC – lay out flex items as vertical columns
flex item
flex item
flex item

Flex items sizing

Use .fg<factor> classes to set flex grow factor, which determines how much the flex item will grow relative to the rest of the flex items in the flex container. If all flex items have flex grow set to 1, every item will have an equal size inside the container. If you were to give one of the flex items a value of 3, that item would take up triple as much space as the others. If you were to give one of the items a value of 1 and did nothing to others, the item who was given value 1 will take up all of the rest available space.

If you want a flex item to grow independently from its content, set zero flex basis using .fb0 class.

flex item (fg1)
flex item (fg3 on large viewports)
flex item (fg1)
Hamburger
flex item
flex item (fg1)
that grows to fill the available space
flex item
flex item
flex item

flex item (fg1 fb0)
that grows to fill the available space

Bacon ipsum dolor amet laborum shank pariatur occaecat ea ad turkey strip steak anim chuck. Pork belly pancetta est hamburger. Strip steak doner bacon eu salami. Capicola pork loin consectetur ham hock short ribs tongue, andouille labore landjaeger filet mignon fugiat sausage.

Dolore duis cupidatat short ribs. Duis beef ribs prosciutto drumstick, voluptate ham anim elit laborum esse corned beef. Et laboris turkey, aliqua elit do irure ex doner velit incididunt. Turkey tri-tip qui voluptate, incididunt bresaola reprehenderit consectetur alcatra laborum shoulder pork loin pork.

flex item

Alignment

These classes define the vertical alignment of flex items.

  • .aiS – stretch flex items to fill the height of the flex container (default)
  • .aiC – center flex items vertically
  • .aiB – align flex items to their baseline
  • .aiFS – align flex items to the top
  • .aiFE – align flex items to the bottom
flex item
flex item
flex item
flex item

These classes define the horizontal alignment of flex items.

  • .jcC – center flex items horizontally
  • .jcSB – evenly distribute flex items horizontally; first item is on the left, last item on the right
  • .jcSA – evently distribute flex items hotizontally with equal space around them
  • .jcFS – align flex items to the left (default)
  • .jcFE – align flex items to the right
flex item
flex item
flex item
flex item

To ensure nested elements stretch as well, add the .dF class to relevant elements:

flex item
Hot dog
flex item

You can also use margins to move individual flex items up or down or left of right within the flex container. An auto margin will absorb extra space. It can be used to push flex Items into different positions.

Horizontally and vertically centered flex item (margin auto on the x and y axis)
flex item
flex item (margin-top auto)

Flex items order

By default, flex items are laid out according to the source order. Use .o<order> classes to control the order in which flex items appear inside the flex container.

flex item
flex item

Flex row

Layout helper object for grouping elements (such as form items) on a single row and distributing space automatically without the need for @media queries

Flex row uses flexbox internally for space distribution and wrapping.

Flex row expects to contain .flexRow-cols and .flexRow-col child nodes. By default columns created with .flexRow-col will grow to fill any available space in the flex row container. This results in equal distribution of space if you have more than one column:

col1
col2
col3
col1
col2
col3

Flex row columns will shrink as needed until minimum allowed width is reached. By default it's 20ch and can be customized using --col-width variable. When items cannot fit on one row, they will begin to break to a new row. Collapsing behavior is automatic based on the --col-width constrain and size of the Flex row container.

Resize the browser window to observe the collapsing.

Bacon ipsum dolor amet laborum shank pariatur occaecat ea ad turkey strip steak anim chuck.
Bacon ipsum dolor amet laborum shank pariatur occaecat ea ad turkey strip steak anim chuck.

You can use mixed column widths within the Flex row. Use .flexRow-col--auto modifier on a column which you want to manually control. The column no longer grows to fill the available space. Then inside the column set a max-width constrain using one of the .maw<scale> helpers.

My width is limited. Bacon ipsum dolor amet laborum.
Bacon ipsum dolor amet laborum shank pariatur occaecat ea ad turkey strip steak anim chuck.

If you want all of the columns within Flex row to take on their own variable width, use .flexRow--variable modifier.

col1
col2
col3

Flex row automatically handles spacing. The space between items within row will be consistent even when they wrap. By default, a base spacing unit is used, but you can customize the amount of space using --gap property.

item 1
item 2

Sometimes you may want to switch from a multi-column layout directly to a single column at a target container breakpoint. This is where .flexRow--switcher modifier is useful.

.flexRow--switcher specifies a container breakpoint at which the items should switch from a multi-column arrangement to a single column. Default breakpoint is 60ch, but you can override it as needed using --breakpoint custom property.

Note that the breakpoint is taking into account the Flex row container width rather than a fixed viewport width, so it automatically adapts to it's context.

--col-width has no effect when using .flexRow--switcher modifier.

item 1
item 2
item 3

Flex table

Layout helper object for creating dynamically resizable elements that always sit on the same horizontal line

A bit like flexbox, but makes use of CSS table layout for best cross-browser compatibility (back to at least IE 9).

Flex table must only contain .flexTable-sizeFit and .flexTable-sizeFill child nodes. .flexTable-sizeFill will expand to fill all of the remaining space not filled by .flexTable-sizeFit elements. It's recommended that you only use one .flexTable-sizeFill per object instance. Additional spacing helpers may be required to properly space content.

Bacon ipsum dolor amet laborum shank pariatur occaecat ea ad turkey strip steak anim chuck.
(fills the remaining space)

By default, flex table child nodes are vertically top-aligned. .flexTable--middle and .flexTable--bottom modifier classes can be used to change the alignment.

Bacon ipsum dolor amet laborum shank pariatur occaecat ea ad turkey strip steak anim chuck.

Forms

Forms can be laid out using one of the layout helpers such as Flex row. Another option is to use the grid component and layout your form as table rows and cells with .grid--arrange.

See Form page for more examples.

Photo
Label 6
Select day
Set status

Radio/checkbox inputs

Radio button <input type="radio"/> and checkbox <input type="checkbox"/> needs to be placed before label, everything else inside label. This makes WCAG happy (as focus can be visualized), and custom styling a breeze.

If you need more control over radio/checkbox inputs, pay attention to the markup of examples below. You can also create checkboxes or radios using .formControl object which gives you more flexibility:

Standalone checkbox inside table cell

Form field hints

Form field hints are used to provide an additional hint, description, or example of the information required for a particular field.

These hints are replacement for placeholder attribute which places text inside the input in a light gray color that fails the contrast requirements. What is more the placeholder text disappear when the user types in the field, which is also in conflict with WCAG.

Select start date and time
Must be a valid date in format dd.mm.yyyy
Must be a valid time in format hh:mm
Select end date and time
Must be a valid date in format dd.mm.yyyy
Must be a valid time in format hh:mm

Validation

Use standard validation using the HTML5 attributes required (boolean attribute) and/or pattern containing a regular expression that defines the validation format on the input elements. This is automatically used by most desktop browsers to validate fields on form submit. If validation fails, the browser will automatically use title to specify a descriptive text to explain the expected validation format to the user. In addition to be displayed on mouse-over, it is also used in some browsers as addition to the validation text when form validation fails.

<input type="text" id="time1" required pattern="([01]?[0-9]|2[0-3]):[0-5][0-9]" title="Required. Time in 24 hour format (hh:mm)." />

Standard HTML5 validation is useful for assisting the user and pre-validating his input. In cases where you want more control over the validation feedback, you may want to use styles for validation errors.


Lists/Tables

By default, lists have bullets or numbers and a left indent:

  1. Ordered list item 1
  2. Ordered list item 2
  3. Ordered list item 3
  4. Ordered list item 4

Use .bareList class to remove default styling from lists:


Example using standard table layout:

Owner John Doe
Contact information John Doe
Phone +47 22222424
Text Fusce vitae dologr a nulla rhoncus vulputate sed nec mauris. Mauris condimentum pretium arcu sed molestie. Suspendisse posuere vitae sapien sit amet tristique. Praesent non est augue. In hac habitasse platea dictumst. Curabitur quis diam ante. Ut at vestibulum leo. Integer porta posuere tincidunt. Mauris at eleifend risus.

In general no more than two-column tables are recommended because we want to ensure that they display well on mobiles in portrait mode.

For the data above definition list might actually be a better fit, because it has responsiveness baked-in:

Owner
John Doe
Contact information
John Doe
Phone
+47 22222424
Text
Fusce vitae dologr a nulla rhoncus vulputate sed nec mauris. Mauris condimentum pretium arcu sed molestie. Suspendisse posuere vitae sapien sit amet tristique. Praesent non est augue. In hac habitasse platea dictumst. Curabitur quis diam ante. Ut at vestibulum leo. Integer porta posuere tincidunt. Mauris at eleifend risus.

State

Visibility state classes let you show or hide elements. They are currently only available for block and table toggling.

.is-shown shows a hidden element.

.is-hidden hides and removes an element from the flow.

.is-hiddenVisually visually hides the element (removes an element from the flow but leaves it available to screen readers).

This should be shown
This should be hidden only visually

You can also toggle visibility state based on the size of the viewport. This is useful for showing and hiding elements on mobile devices.

Try to use these utilities on a limited basis and avoid creating entirely different versions of the same content for different viewport sizes. Instead, use them to complement each device's presentation.

Resize the browser window to see the effect.

.is-hiddenMedium
I am active on small viewport
(up to 499px)
I am inactive on medium viewports
(500px and higher)
.is-visibleMedium
I am active on medium viewports
(500px and higher)
I am inactive on small viewport
(up to 499px)
.is-hiddenLarge
I am active on small and medium viewports
(up to 779px)
I am inactive on large viewports
(780px and higher)
.is-visibleLarge
I am active on large viewports
(780px and higher)
I am inactive on small and medium viewports
(up to 779px)
.is-hiddenXLarge
I am active on small, medium and large viewports
(up to 1399px)
I am inactive on extra large viewports
(1400px and higher)
.is-visibleXLarge
I am active on extra large viewports
(1400px and higher)
I am inactive on small, medium and large viewports
(up to 1339px)
.is-visibleTouch
I am active on touch devices
I am inactive on touch devices

Responsive line break
To control wrapping at different screen widths

Use .is-actionable to indicate an element has an action or .is-disabled to indicate no associated action. Appropriate CSS cursor property will be set.

is-actionable
is-disabled
Announcement

This is the technical documentation of Wave Core library, the foundational part of Wave Design System.

Currently we are working on brand new design system site and a set of polished React components that aim to work out of the box, be accessible and deliver superior developer and user experience. Browse the new Wave Design System site and Wave React components docs at https://wave.volue.com.