Back to Kibana

README

x-pack/solutions/security/packages/side-nav/README.mdx

9.4.02.2 KB
Original Source

Security Solution Side Nav

This package provides a component to render a two-level side navigation for Security.

It uses EuiPortal to render the secondary panel.

This package is being considered for adoption by Shared UX so it can be reused by other solutions.

Example

Using the SecurityNav wrapper provided by @kbn/shared-ux-page-solution-nav is recommended in order to display the proper layout.

JSX
<SolutionNav
    name={'Security'}
    icon={'logoSecurity'}
    children={
        <SolutionSideNavigation
            items={items}
            selectedId={selectedId}
        />
    }
/>

Both items and footerItems props are arrays of SolutionSideNavItem type. The definition of this type is the following:

PropTypeDescription
id (required)stringThe identifier of the link
label (required)stringThe label that will be displayed for the link
href (required)stringThe path to be used in the link anchor
onClickReact.MouseEventHandlerThe handler for the click event
positionstring (top | bottom)The position of the link in the main panel, defaults: top
itemsSolutionSideNavItem[]The sub-items that will be displayed in the panel
categoriesCategory[]The categories to display in the panel for sub-items
iconTypeIconTypeThe EUI IconType to be pre-pended to the label
labelSizestringThe custom size for the label (xs | s | m | l), default: s
descriptionstringThe description displayed in the panel. Only for sub-items
appendSeparatorbooleanThe flag to display an horizontal line separator after the item link
isBetabooleanThe flag to display "beta" badge next to the item link
betaOptionsObjectThe beta badge option only text is supported to define a custom badge label

The Category object consists of:

PropTypeDescription
label (required)stringThe label displayed for the category
linkIds (required)string[]The list of links that the category include, in order