Hero Image

Components

Items Menu

Items menu has built in support for displaying scroll helpers, scroll faders, and to scroll active item into view when menu will not fit on the screen.

Basic examples

Play around with props, edit and copy code.

Advanced examples

Play around with the animations, clicks and copy code.

Should be used when you need a navigation with only text or links. If there is a need for icon support, icon-item should be used.

<ItemsMenu
  branding="sport"
  hiddenScrollbar
  useScrollFaders
  useScrollHelpers
>
  <LinkItem
    Component="a"
    label="Start"
    onClick={function noRefCheck() {}}
    selected
  />
  <LinkItem
    Component="a"
    label="Kom i gång"
    onClick={function noRefCheck() {}}
  />
  <LinkItem
    Component="a"
    label="Spelguide"
    onClick={function noRefCheck() {}}
  />
  <LinkItem
    Component="a"
    label="Andra chansen"
    onClick={function noRefCheck() {}}
  />
  <LinkItem
    Component="a"
    label="Tredje chansen"
    onClick={function noRefCheck() {}}
  />
  <LinkItem
    Component="a"
    label="Fjärde chansen"
    onClick={function noRefCheck() {}}
  />
  <LinkItem
    Component="a"
    label="Vinnare"
    onClick={function noRefCheck() {}}
  />
</ItemsMenu>

Icon Items

Should be used when you need a navigation containing icons and text.

<ItemsMenu
  centered
  hiddenScrollbar
  useScrollFaders
  useScrollHelpers
>
  <IconItem
    Component="a"
    alignment="horizontal"
    gutter={1}
    iconName="user"
    isSelected
    label="Mitt konto"
    onClick={function noRefCheck() {}}
  />
  <IconItem
    Component="a"
    alignment="horizontal"
    gutter={1}
    iconName="withdrawal"
    label="Överföringar"
    onClick={function noRefCheck() {}}
  />
  <IconItem
    Component="a"
    alignment="horizontal"
    gutter={1}
    iconName="viewsummary"
    label="Översikt"
    onClick={function noRefCheck() {}}
  />
  <IconItem
    Component="a"
    alignment="horizontal"
    gutter={1}
    iconName="document"
    label="Dokument"
    onClick={function noRefCheck() {}}
  />
  <IconItem
    Component="a"
    alignment="horizontal"
    gutter={1}
    iconName="calendar"
    label="Kalender"
    onClick={function noRefCheck() {}}
  />
</ItemsMenu>

Ball Items

Should be used for functions in games.

<ItemsMenu
  branding="tur"
  centered
  useScrollFaders
  useScrollHelper
>
  <BallItem
    label="Mitt konto"
    onClick={function noRefCheck() {}}
    selected
    width={6.5}
  >
    <Icon icon="user" />
  </BallItem>
  <BallItem
    label="Saldo"
    onClick={function noRefCheck() {}}
    width={6.5}
  >
    <Icon icon="balance" />
  </BallItem>
  <BallItem
    label="Favoriter"
    onClick={function noRefCheck() {}}
    width={6.5}
  >
    <Icon icon="favorites" />
  </BallItem>
  <BallItem
    label="Gränser"
    onClick={function noRefCheck() {}}
    width={6.5}
  >
    <Icon icon="deposit-limits" />
  </BallItem>
  <BallItem
    label="Insättning"
    onClick={function noRefCheck() {}}
    width={6.5}
  >
    <Icon icon="deposit" />
  </BallItem>
</ItemsMenu>

Branding

Items menu has support for branding as described in the usage tab. Continue to read to find out how to create a new branding for the items menu.

How to create and implement new branding

  • Internal use (Trinidad)

Properties

ItemsMenu

Prop nameTypeDefault ValueDescription
brandingunion'neutral'Branding for items menu ( possible to create your own)
centeredboolfalseIf centered
compactboolfalseCompact menu
customClassstring'default'Custom class
customerenum'neutral'Customer default is neutral
hiddenScrollbarboolfalseHide the scroll bar
invertedboolfalseInverted theme
scrollToSelectedbooltrueScroll active item in to viewport
useScrollFadersOnHoverboolfalseShow scrollfaders only on hover. Use Scrollfaders needs to be true
useScrollHelpersboolfalseUse scroll helpers for horizontal scroll
childrennodeContent
classNamestringAdd class
scrollIconsshapeAny svs icons used as scroll helpers
useScrollFadersboolUse scroll faders for horizontal scroll

LinkItem

Prop nameTypeDefault ValueDescription
Componentcustom'button'
onClickfunc() => { }Function to run on click
selectedboolfalseIf items is selected
badgeboolIf item should have a badge
badgeNrstringNumber in badge
childrennodeContent
classNamestringCustom css classes
fixedItemenumBranding if first item should be fixed
labelstringLabel for item
widthnumberWidth of item if value is less then 16 em will be used, oterwhise px.

IconItem

Prop nameTypeDefault ValueDescription
Componentcustom'button'
hasIconCircleboolfalse
hasUnderlinebooltrue
isSelectedboolfalse
onClickfunc() => { }
alignmentenum
badgeunion
brandNamestring
classNamestring
gutterenum
iconNamestring
labelstring
minWidthnumber

BallItem

Prop nameTypeDefault ValueDescription
Componentcustom'button'
onClickfunc() => { }Function to handle click
selectedboolfalseSet item to selected
borderOnlyboolBorder only
childrennodeContent
classNamestringAdd custom class
diameternumberDiameter of ball
disabledboolDisable item
labelstringLabel for item
typestringType of element
widthnumberWidth of item if value is less then 16, em will be used, otherwise px.th

Accessibility

This component has been validated to meet the WCAG 2.1 AA accessibility guidelines.

Read more about WCAG 2.1 AA.