Description
The sd-navigation-item is a flexible component, that can be used to quickly build navigations. Examples of the item are available on Figma: https://www.figma.com/file/2hDs56yh73azMZafmpvEeU/Rework-Navigation?type=design&node-id=750-40814&mode=design&t=p1jVFPsX1m2c2TTq-4
This component doesn't provide stuff like flyouts, but instead only has the "content" of a navigation in mind.
API
The API will soon be provided in another file, but we can start already with the one over here which was discussed and approved today: https://www.figma.com/file/cvr5GpzGeJzbWIPyi5MhGY/navigation-item?type=design&node-id=0-1&mode=design&t=hENJEUnDugfazCvx-11
Props
The most important difference is the horizontal prop. If set, it can be used for top navigations. If selected, the API is very reduced:
disabled
current: green line at the bottom
If the element is not horizontal, the component can have a lot more options:
disabled
current: green line at the left
chevron: on dev side, this might be just a boolean, as the "accordion"-functionality could be provided with a children-slot
nested: this just provides additional padding
size: base (default), lg, 14px
divider: sets a divider at the top which reflects nestedness etc.
If current is set, aria-current should be added.
Slots
For vertical and horizontal the main slot is available.
The main slot can be used to set additional content like badges.

The vertical navigation-item in addition can have a description slot. It can be used to offer additional descriptions e. g. in mega menus or in sidebars as well.
The icons should be slottable as well for themability.
I would suggest implementing a children slot, where people can drop-in other sd-navigation-items. If there's something in the children slot, the chevron should show up as like in the accordion. To implement the functionality, I would suggest to use browser-built-in details and summary elements for that, to build it as fast as possible. (That's something Shoelace does in its newest version of the sl-accordion, too.)
Functionality
This is a tough one. So – the whole element should be hoverable and clickable.
When a href is provided, it will be a link, if not, it is a button, like we did for the sd-button and the sd-tag.
This is only relevant if the element doesn't have something in the children slot.
See comment below.
People should of course be able to listen to an event if there is a button.
Hand-off
The tokens hand-off will be provided soon – most of the stuff can be read from the colors already. I would propose to start measuring by eye and make the hot-potato-approach instead of doing the component only waterfally.
Components detailed requirements
DoR
DoD
Description
The sd-navigation-item is a flexible component, that can be used to quickly build navigations. Examples of the item are available on Figma: https://www.figma.com/file/2hDs56yh73azMZafmpvEeU/Rework-Navigation?type=design&node-id=750-40814&mode=design&t=p1jVFPsX1m2c2TTq-4
This component doesn't provide stuff like flyouts, but instead only has the "content" of a navigation in mind.
API
The API will soon be provided in another file, but we can start already with the one over here which was discussed and approved today: https://www.figma.com/file/cvr5GpzGeJzbWIPyi5MhGY/navigation-item?type=design&node-id=0-1&mode=design&t=hENJEUnDugfazCvx-11
Props
The most important difference is the
horizontalprop. If set, it can be used for top navigations. If selected, the API is very reduced:disabledcurrent: green line at the bottomIf the element is not horizontal, the component can have a lot more options:
disabledcurrent: green line at the leftchevron: on dev side, this might be just a boolean, as the "accordion"-functionality could be provided with achildren-slotnested: this just provides additional paddingsize: base (default), lg, 14pxdivider: sets a divider at the top which reflects nestedness etc.If
currentis set, aria-current should be added.Slots
For
verticalandhorizontalthe main slot is available.The main slot can be used to set additional content like badges.

The vertical navigation-item in addition can have a description slot. It can be used to offer additional descriptions e. g. in mega menus or in sidebars as well.
The icons should be slottable as well for themability.
I would suggest implementing a
childrenslot, where people can drop-in other sd-navigation-items. If there's something in the children slot, the chevron should show up as like in the accordion. To implement the functionality, I would suggest to use browser-built-indetailsandsummaryelements for that, to build it as fast as possible. (That's something Shoelace does in its newest version of the sl-accordion, too.)Functionality
This is a tough one. So – the whole element should be hoverable and clickable.
When a
hrefis provided, it will be a link, if not, it is a button, like we did for thesd-buttonand thesd-tag.This is only relevant if the element doesn't have something in the children slot.See comment below.
People should of course be able to listen to an event if there is a button.
Hand-off
The tokens hand-off will be provided soon – most of the stuff can be read from the colors already. I would propose to start measuring by eye and make the
hot-potato-approach instead of doing the component only waterfally.Components detailed requirements
sd-accordion)DoR
DoD
featurebranch