No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

TreeItem

The TreeItem component allows users to collapse and expand list items, this is specifically designed to be used as menu navtree. This component is designed to be nested within itself, for now there are supported three layers small/medium/large. In comparison to Accordion and ArrowToggle this one is different visually and in behaviour. TreeItem component has different styling on each level of nesting, and has few optional variants to fit in for StepNav needs.

1.1

Welcome to the course

Video(1.23 mins)

1.2

Case Study: Val's pizzas

Article

1.3

Another step type goes here

Article

1.1

Welcome to the course

Video(1.23 mins)

1.2

Case Study: Val's pizzas

Article

1.3

Another step type goes here

Article

1.1

Abc def efd

Article

1.2

What is this

Video(1.23 mins)

1.3

End of example

This week is coming soon, and this meessage is very long to make sure it's not going to be truncated

How it works

The TreeItem component consists of a title, subTitle, heading, numbering, arrow icon and tick icon.

If the item has some content within it, it can be expanded by clicking on the title and arrow icon, also it will indicate interactivity by hovering the mouse over it.

After interacting with the item the arrow orientation should indicate the current state (expanded or collapsed). The expand/collapse interaction is animated for better user experience.

Every item can be button for expanding/collapsing the content, or if the href is passed it will behave as a link.

Items also have locked and completed variants.

Implementation

NameDescriptionDefault
isOpen
boolean
-
title*
string
-
heading
string
-
isLocked
boolean
false
isWeekLocked
boolean
false
isActive
boolean
false
isComplete
boolean
false
href
string
-
size
string
"medium"
subTitle
string
-
numbering
string
-
isTopLevel
boolean
-
tracking
((event: MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>, isOpen?: boolean) => void)
-
isWeeklyAccessLimitingApplicable
boolean
-
weekUnlocksAt
string
-