Plasma Design System
Home
Foundations
Typekit
Links
Spacing
Layout
Banner
Blankslate
Bordered line
Browser preview
Chart
Child form
Collapsible
Icon card
Info box
Labeled value
Limit card
Modal
Modal wizard
Page header
Section
Split layout
Sticky footer
Table
Form
Actionable item
Button
Checkbox
Code editor
Color picker
Countdown
Date picker
Diff viewer
Facet
File picker
Filter box
Flat select
JSON editor
Multiline box
Numeric input
Radio button
Search bar
Select - single
Select - multi
Slider
Text area
Text input
Navigation
Breadcrumbs
Sidebar navigation
SubNavigation
Tabs
Feedback
Badge
Color bar
Color dot
Icon badge
Last updated
Loading spinner
Step progress bar
Sync feedback
Toast
Tooltip
Advanced
Action bar
Info token
Link svg
List box
Options cycle
Partial string match
Slide Y
You are viewing the legacy documentation of Plasma featuring the components from the@coveord/plasma-react and @coveord/plasma-style packages. Those packages are deprecated and replaced by the @coveord/plasma-mantine package.
Return to the latest documentation
Navigation

SubNavigation

A subnavigation is a secondary vertical navigation component that allows users to navigate between sections of the same interface.
View source
  • Avatar
  • Titanic
  • The Avengers
  • Banana
1
import {SubNavigationConnected} from '@coveord/plasma-react';
2
3
export default () => {
4
const exampleItems = [
5
{label: 'Avatar', id: 'avatar'},
6
{label: 'Titanic', id: 'titanic'},
7
{label: 'The Avengers', id: 'the-avengers'},
8
{label: 'Banana', id: 'banana'},
9
];
10
11
return <SubNavigationConnected id="first-sub-nav" items={exampleItems} />;
12
};

Props

NameTypeDefaultDescription
itemsrequiredISubNavigationItem[]
Array of elements composing the subNavigation
"aria-activedescendant"string
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
"aria-atomic"Booleanish
Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
"aria-autocomplete""list" | "none" | "inline" | "both"
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
"aria-busy"Booleanish
Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
"aria-checked"boolean | "true" | "false" | "mixed"
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
"aria-colcount"number
Defines the total number of columns in a table, grid, or treegrid.
"aria-colindex"number
Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
"aria-colspan"number
Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
"aria-controls"string
Identifies the element (or elements) whose contents or presence are controlled by the current element.
"aria-current"boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time"
Indicates the element that represents the current item within a container or set of related elements.
"aria-describedby"string
Identifies the element (or elements) that describes the object.
"aria-details"string
Identifies the element that provides a detailed, extended description for the object.
"aria-disabled"Booleanish
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
"aria-errormessage"string
Identifies the element that provides an error message for the object.
"aria-expanded"Booleanish
Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
"aria-flowto"string
Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
"aria-haspopup"boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree"
Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
"aria-hidden"Booleanish
Indicates whether the element is exposed to an accessibility API.
"aria-invalid"boolean | "true" | "false" | "grammar" | "spelling"
Indicates the entered value does not conform to the format expected by the application.
"aria-keyshortcuts"string
Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
"aria-label"string
Defines a string value that labels the current element.
"aria-labelledby"string
Identifies the element (or elements) that labels the current element.
"aria-level"number
Defines the hierarchical level of an element within a structure.
"aria-live""off" | "assertive" | "polite"
Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
"aria-modal"Booleanish
Indicates whether an element is modal when displayed.
"aria-multiline"Booleanish
Indicates whether a text box accepts multiple lines of input or only a single line.
"aria-multiselectable"Booleanish
Indicates that the user may select more than one item from the current selectable descendants.
"aria-orientation""horizontal" | "vertical"
Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
"aria-owns"string
Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
"aria-placeholder"string
Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
"aria-posinset"number
Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
"aria-pressed"boolean | "true" | "false" | "mixed"
Indicates the current "pressed" state of toggle buttons.
"aria-readonly"Booleanish
Indicates that the element is not editable, but is otherwise operable.
"aria-relevant""text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals"
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
"aria-required"Booleanish
Indicates that user input is required on the element before a form may be submitted.
"aria-roledescription"string
Defines a human-readable, author-localized description for the role of an element.
"aria-rowcount"number
Defines the total number of rows in a table, grid, or treegrid.
"aria-rowindex"number
Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
"aria-rowspan"number
Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
"aria-selected"Booleanish
Indicates the current "selected" state of various widgets.
"aria-setsize"number
Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
"aria-sort""none" | "ascending" | "descending" | "other"
Indicates if items in a table or grid are sorted in ascending or descending order.
"aria-valuemax"number
Defines the maximum allowed value for a range widget.
"aria-valuemin"number
Defines the minimum allowed value for a range widget.
"aria-valuenow"number
Defines the current value for a range widget.
"aria-valuetext"string
Defines the human readable text alternative of aria-valuenow for a range widget.
aboutstring
accessKeystring
autoCapitalizestring
autoCorrectstring
autoSavestring
childrenReact.ReactNode & React.ReactNode
classNamestring
colorstring
contentEditableBooleanish | "inherit"
contextMenustring
dangerouslySetInnerHTML{ __html: string; }
datatypestring
defaultCheckedboolean
defaultSelectedstring
Element selected by default
defaultValuestring | number | readonly string[]
descriptionstring
A small description that appears once the subNavigation selected
dirstring
draggableBooleanish
hiddenboolean
idstring
Id of the SubNavigation
inlistany
inputMode"none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal"
Hints at the type of data that might be entered by the user while editing the element or its contents
isstring
Specify that a standard HTML element should behave like a defined custom built-in element
itemIDstring
itemPropstring
itemRefstring
itemScopeboolean
itemTypestring
langstring
noncestring
onAbortReactEventHandler<HTMLElement>
onAbortCaptureReactEventHandler<HTMLElement>
onAnimationEndAnimationEventHandler<HTMLElement>
onAnimationEndCaptureAnimationEventHandler<HTMLElement>
onAnimationIterationAnimationEventHandler<HTMLElement>
onAnimationIterationCaptureAnimationEventHandler<HTMLElement>
onAnimationStartAnimationEventHandler<HTMLElement>
onAnimationStartCaptureAnimationEventHandler<HTMLElement>
onAuxClickMouseEventHandler<HTMLElement>
onAuxClickCaptureMouseEventHandler<HTMLElement>
onBeforeInputFormEventHandler<HTMLElement>
onBeforeInputCaptureFormEventHandler<HTMLElement>
onBlurFocusEventHandler<HTMLElement>
onBlurCaptureFocusEventHandler<HTMLElement>
onCanPlayReactEventHandler<HTMLElement>
onCanPlayCaptureReactEventHandler<HTMLElement>
onCanPlayThroughReactEventHandler<HTMLElement>
onCanPlayThroughCaptureReactEventHandler<HTMLElement>
onChangeFormEventHandler<HTMLElement>
onChangeCaptureFormEventHandler<HTMLElement>
onClickMouseEventHandler<HTMLElement>
onClickCaptureMouseEventHandler<HTMLElement>
onClickItem(id: string) => void
onCompositionEndCompositionEventHandler<HTMLElement>
onCompositionEndCaptureCompositionEventHandler<HTMLElement>
onCompositionStartCompositionEventHandler<HTMLElement>
onCompositionStartCaptureCompositionEventHandler<HTMLElement>
onCompositionUpdateCompositionEventHandler<HTMLElement>
onCompositionUpdateCaptureCompositionEventHandler<HTMLElement>
onContextMenuMouseEventHandler<HTMLElement>
onContextMenuCaptureMouseEventHandler<HTMLElement>
onCopyClipboardEventHandler<HTMLElement>
onCopyCaptureClipboardEventHandler<HTMLElement>
onCutClipboardEventHandler<HTMLElement>
onCutCaptureClipboardEventHandler<HTMLElement>
onDestroy() => void
onDoubleClickMouseEventHandler<HTMLElement>
onDoubleClickCaptureMouseEventHandler<HTMLElement>
onDragDragEventHandler<HTMLElement>
onDragCaptureDragEventHandler<HTMLElement>
onDragEndDragEventHandler<HTMLElement>
onDragEndCaptureDragEventHandler<HTMLElement>
onDragEnterDragEventHandler<HTMLElement>
onDragEnterCaptureDragEventHandler<HTMLElement>
onDragExitDragEventHandler<HTMLElement>
onDragExitCaptureDragEventHandler<HTMLElement>
onDragLeaveDragEventHandler<HTMLElement>
onDragLeaveCaptureDragEventHandler<HTMLElement>
onDragOverDragEventHandler<HTMLElement>
onDragOverCaptureDragEventHandler<HTMLElement>
onDragStartDragEventHandler<HTMLElement>
onDragStartCaptureDragEventHandler<HTMLElement>
onDropDragEventHandler<HTMLElement>
onDropCaptureDragEventHandler<HTMLElement>
onDurationChangeReactEventHandler<HTMLElement>
onDurationChangeCaptureReactEventHandler<HTMLElement>
onEmptiedReactEventHandler<HTMLElement>
onEmptiedCaptureReactEventHandler<HTMLElement>
onEncryptedReactEventHandler<HTMLElement>
onEncryptedCaptureReactEventHandler<HTMLElement>
onEndedReactEventHandler<HTMLElement>
onEndedCaptureReactEventHandler<HTMLElement>
onErrorReactEventHandler<HTMLElement>
onErrorCaptureReactEventHandler<HTMLElement>
onFocusFocusEventHandler<HTMLElement>
onFocusCaptureFocusEventHandler<HTMLElement>
onGotPointerCapturePointerEventHandler<HTMLElement>
onGotPointerCaptureCapturePointerEventHandler<HTMLElement>
onInputFormEventHandler<HTMLElement>
onInputCaptureFormEventHandler<HTMLElement>
onInvalidFormEventHandler<HTMLElement>
onInvalidCaptureFormEventHandler<HTMLElement>
onKeyDownKeyboardEventHandler<HTMLElement>
onKeyDownCaptureKeyboardEventHandler<HTMLElement>
onKeyUpKeyboardEventHandler<HTMLElement>
onKeyUpCaptureKeyboardEventHandler<HTMLElement>
onLoadReactEventHandler<HTMLElement>
onLoadCaptureReactEventHandler<HTMLElement>
onLoadedDataReactEventHandler<HTMLElement>
onLoadedDataCaptureReactEventHandler<HTMLElement>
onLoadedMetadataReactEventHandler<HTMLElement>
onLoadedMetadataCaptureReactEventHandler<HTMLElement>
onLoadStartReactEventHandler<HTMLElement>
onLoadStartCaptureReactEventHandler<HTMLElement>
onLostPointerCapturePointerEventHandler<HTMLElement>
onLostPointerCaptureCapturePointerEventHandler<HTMLElement>
onMouseDownMouseEventHandler<HTMLElement>
onMouseDownCaptureMouseEventHandler<HTMLElement>
onMouseEnterMouseEventHandler<HTMLElement>
onMouseLeaveMouseEventHandler<HTMLElement>
onMouseMoveMouseEventHandler<HTMLElement>
onMouseMoveCaptureMouseEventHandler<HTMLElement>
onMouseOutMouseEventHandler<HTMLElement>
onMouseOutCaptureMouseEventHandler<HTMLElement>
onMouseOverMouseEventHandler<HTMLElement>
onMouseOverCaptureMouseEventHandler<HTMLElement>
onMouseUpMouseEventHandler<HTMLElement>
onMouseUpCaptureMouseEventHandler<HTMLElement>
onPasteClipboardEventHandler<HTMLElement>
onPasteCaptureClipboardEventHandler<HTMLElement>
onPauseReactEventHandler<HTMLElement>
onPauseCaptureReactEventHandler<HTMLElement>
onPlayReactEventHandler<HTMLElement>
onPlayCaptureReactEventHandler<HTMLElement>
onPlayingReactEventHandler<HTMLElement>
onPlayingCaptureReactEventHandler<HTMLElement>
onPointerCancelPointerEventHandler<HTMLElement>
onPointerCancelCapturePointerEventHandler<HTMLElement>
onPointerDownPointerEventHandler<HTMLElement>
onPointerDownCapturePointerEventHandler<HTMLElement>
onPointerEnterPointerEventHandler<HTMLElement>
onPointerEnterCapturePointerEventHandler<HTMLElement>
onPointerLeavePointerEventHandler<HTMLElement>
onPointerLeaveCapturePointerEventHandler<HTMLElement>
onPointerMovePointerEventHandler<HTMLElement>
onPointerMoveCapturePointerEventHandler<HTMLElement>
onPointerOutPointerEventHandler<HTMLElement>
onPointerOutCapturePointerEventHandler<HTMLElement>
onPointerOverPointerEventHandler<HTMLElement>
onPointerOverCapturePointerEventHandler<HTMLElement>
onPointerUpPointerEventHandler<HTMLElement>
onPointerUpCapturePointerEventHandler<HTMLElement>
onProgressReactEventHandler<HTMLElement>
onProgressCaptureReactEventHandler<HTMLElement>
onRateChangeReactEventHandler<HTMLElement>
onRateChangeCaptureReactEventHandler<HTMLElement>
onRender() => void
onResetFormEventHandler<HTMLElement>
onResetCaptureFormEventHandler<HTMLElement>
onResizeReactEventHandler<HTMLElement>
onResizeCaptureReactEventHandler<HTMLElement>
onScrollUIEventHandler<HTMLElement>
onScrollCaptureUIEventHandler<HTMLElement>
onSeekedReactEventHandler<HTMLElement>
onSeekedCaptureReactEventHandler<HTMLElement>
onSeekingReactEventHandler<HTMLElement>
onSeekingCaptureReactEventHandler<HTMLElement>
onSelectReactEventHandler<HTMLElement>
onSelectCaptureReactEventHandler<HTMLElement>
onStalledReactEventHandler<HTMLElement>
onStalledCaptureReactEventHandler<HTMLElement>
onSubmitFormEventHandler<HTMLElement>
onSubmitCaptureFormEventHandler<HTMLElement>
onSuspendReactEventHandler<HTMLElement>
onSuspendCaptureReactEventHandler<HTMLElement>
onTimeUpdateReactEventHandler<HTMLElement>
onTimeUpdateCaptureReactEventHandler<HTMLElement>
onTouchCancelTouchEventHandler<HTMLElement>
onTouchCancelCaptureTouchEventHandler<HTMLElement>
onTouchEndTouchEventHandler<HTMLElement>
onTouchEndCaptureTouchEventHandler<HTMLElement>
onTouchMoveTouchEventHandler<HTMLElement>
onTouchMoveCaptureTouchEventHandler<HTMLElement>
onTouchStartTouchEventHandler<HTMLElement>
onTouchStartCaptureTouchEventHandler<HTMLElement>
onTransitionEndTransitionEventHandler<HTMLElement>
onTransitionEndCaptureTransitionEventHandler<HTMLElement>
onVolumeChangeReactEventHandler<HTMLElement>
onVolumeChangeCaptureReactEventHandler<HTMLElement>
onWaitingReactEventHandler<HTMLElement>
onWaitingCaptureReactEventHandler<HTMLElement>
onWheelWheelEventHandler<HTMLElement>
onWheelCaptureWheelEventHandler<HTMLElement>
placeholderstring
prefixstring
propertystring
radioGroupstring
resourcestring
resultsnumber
roleAriaRole
securitystring
selectedstring
slotstring
spellCheckBooleanish
styleCSSProperties
suppressContentEditableWarningboolean
suppressHydrationWarningboolean
tabIndexnumber
titlestring
translate"yes" | "no"
typeofstring
unselectable"on" | "off"
vocabstring
"aria-dropeffect"deprecated"link" | "none" | "copy" | "execute" | "move" | "popup"
in ARIA 1.1
Indicates what functions can be performed when a dragged object is released on the drop target.
"aria-grabbed"deprecatedBooleanish
in ARIA 1.1
Indicates an element's "grabbed" state in a drag-and-drop operation.
onKeyPressdeprecatedKeyboardEventHandler<HTMLElement>
onKeyPressCapturedeprecatedKeyboardEventHandler<HTMLElement>

Examples

Default selected
  • Avatar
  • Titanic
  • Star Wars: The Force Awakens
  • Jurassic World
  • The Avengers
1
import {SubNavigationConnected} from '@coveord/plasma-react';
2
3
export default () => {
4
const exampleItems = [
5
{label: 'Avatar', id: 'avatar'},
6
{label: 'Titanic', id: 'titanic'},
7
{label: 'Star Wars: The Force Awakens', id: 'star-wars'},
8
{label: 'Jurassic World', id: 'jurasic-world'},
9
{label: 'The Avengers', id: 'the-avengers'},
10
];
11
12
return <SubNavigationConnected id="second-sub-nav" items={exampleItems} defaultSelected="star-wars" />;
13
};
Custom JSX labels and disabled item
  • Avatar
  • Titanic
  • Star Wars: The Force Awakens
  • Jurassic World
  • The Avengers
1
import {SubNavigationConnected} from '@coveord/plasma-react';
2
import {ThumbsDownSize16Px, ThumbsUpSize16Px} from '@coveord/plasma-react-icons';
3
4
export default () => (
5
<SubNavigationConnected
6
id="third-sub-nav"
7
items={[
8
{
9
label: (
10
<span className="flex space-between">
11
<span className="truncate">Avatar</span>
12
<ThumbsUpSize16Px />
13
</span>
14
),
15
id: 'avatar',
16
disabled: true,
17
},
18
{
19
label: (
20
<span className="flex space-between">
21
<span className="truncate">Titanic</span>
22
<ThumbsUpSize16Px />
23
</span>
24
),
25
id: 'titanic',
26
},
27
{
28
label: (
29
<span className="flex space-between">
30
<span className="truncate pr1">Star Wars: The Force Awakens</span>
31
<ThumbsUpSize16Px />
32
</span>
33
),
34
id: 'star-wars',
35
},
36
{
37
label: (
38
<span className="flex space-between">
39
<span className="truncate">Jurassic World</span>
40
<ThumbsDownSize16Px />
41
</span>
42
),
43
id: 'jurasic-world',
44
},
45
{
46
label: (
47
<span className="flex space-between">
48
<span className="truncate">The Avengers</span>
49
<ThumbsDownSize16Px />
50
</span>
51
),
52
id: 'the-avengers',
53
},
54
]}
55
defaultSelected="titanic"
56
/>
57
);
When there are descriptions in Sub Nav
  • H3 React Node

  • Gummies
    Brownie cheesecake brownie shortbread toffee. Candy danish gingerbread cake powder cake. Marzipan marzipan sweet roll apple pie cupcake lollipop.
  • Cupcake
    Cupcake ipsum dolor sit amet. Lemon drops croissant sesame snaps cookie jelly beans tootsie roll muffin. Liquorice liquorice fruitcake tiramisu sesame snaps sugar plum lollipop gummi bears cookie
  • Chocolate
  • Banana
    Sweet lollipop toffee donut candy brownie shortbread icing pudding. Caramels ice cream dragée lemon drops soufflé cotton candy cheesecake. Toffee apple pie pastry gummi bears danish.
1
import {SubNavigationConnected} from '@coveord/plasma-react';
2
3
export default () => {
4
const exampleItems = [
5
{label: <h3>H3 React Node</h3>, id: 'react-node'},
6
{
7
label: 'Gummies',
8
id: 'gummies',
9
description:
10
'Brownie cheesecake brownie shortbread toffee. Candy danish gingerbread cake powder cake. Marzipan marzipan sweet roll apple pie cupcake lollipop.',
11
},
12
{
13
label: 'Cupcake',
14
id: 'cupcake',
15
description:
16
'Cupcake ipsum dolor sit amet. Lemon drops croissant sesame snaps cookie jelly beans tootsie roll muffin. Liquorice liquorice fruitcake tiramisu sesame snaps sugar plum lollipop gummi bears cookie',
17
},
18
{label: 'Chocolate', id: 'chocolate'},
19
{
20
label: 'Banana',
21
id: 'banana',
22
description:
23
'Sweet lollipop toffee donut candy brownie shortbread icing pudding. Caramels ice cream dragée lemon drops soufflé cotton candy cheesecake. Toffee apple pie pastry gummi bears danish.',
24
},
25
];
26
27
return <SubNavigationConnected id="first-sub-nav" items={exampleItems} />;
28
};

No guidelines exist for SubNavigation yet.

Create guidelines