Search the design system

Components – legacy

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.

Link Items

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.

StartKom i gångSpelguideAndra chansenTredje chansenFjärde chansenVinnare
<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.

Mitt kontoÖverföringarÖversiktDokumentKalender
<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)

    // Less mixins
    @import (reference) '/components/ui/items-menu/assets/stylesheets/items-menu';
    .items-menu-wrapper-my-brand {
    .items-menu-create-branding(...)
    }
    
    Params:
    @default-icon-color    : Color on icon
    @default-icon-color    : Color on icon on selected item
    @default-text          : Color on label on item
    @selected-text         : Color on label on selected item
    @default-bg            : Background color on item
    @selected-bg           : Background color on selected item
    @default-border-color  : Color of border
    @selected-border-color : Color of border when item is selected
    @fade-from             : Color to fade from in fader
    @fade-to               : Color to fade to in fader
    @fixed-bg              : Background-color of fixed item_link
    @nav-bg                : Background-color of the entire nav
    @hover-bg              : Background-color on hover
    @hover-icon-color      : Color of icon on hover
    @border-hover-color    : Color of border on hover
    @scroll-icon-color     : Color of icon in dimmer ( defaults to white)
    @scroll-icon-bg        : Background for icon in dimmer (defaults to transparent)
    @scroll-icon-radius    : Use 50% if ball i needed. (defaults to 0)
    @border-bottom-color   : Color of border bottom (Defaults to transparent)
    
    <ItemsMenu branding={'my-brand'}>...</ItemsMenu>

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
ariaDescribedbystringAria describedby for the nav-element
ariaLabelstringAria label for the nav-element
ariaLabelledbystringAria labelledby for the nav-element
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.

ComponentsItems menu / Usage
ComponentsList Group / Usage

© DesignTech - AB Svenska Spel

What's newTerms of useAccessibility statementCookiesTeams channel [Internal]
@svs/ui version
2.3.0

Feedback

We always want to improve the Design System and would be thrilled to get your feedback.

Please share your wisdom with us.

Microsoft Teams [internal]

Designsystem@svenskaspel.se