Package Exports
- @gravity-ui/navigation
- @gravity-ui/navigation/build/cjs/index.js
- @gravity-ui/navigation/build/esm/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gravity-ui/navigation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@gravity-ui/navigation ·

Aside Header Navigation · Preview →

Install
npm install @gravity-ui/navigationEnsure that peer dependencies are installed in your project
npm install --dev @gravity-ui/uikit@^3.0.2 @bem-react/classname@1.6.0 react@^16.0.0Components
- AsideHeader
- MobileHeader
- FooterItem
- MobileHeaderFooterItem
- Drawer
- DrawerItem
- PageLayout
- PageLayoutAside
- AsideFallback
- Logo
- MobileLogo
- Footer
- MobileFooter
Optimization
If your app content needs to be rendered faster than by passing it throw AsideHeader props,
you may need to switch usage of AsideHeader to advanced style with PageLayout like this:
--- Main.tsx
+++ Main.tsx
-import {AsideHeader} from './AsideHeader'
+import {PageLayout, AsideFallback} from '@gravity-ui/navigation';
+const Aside = React.lazy(() =>
+ import('./Aside').then(({Aside}) => ({ default: Aside }))
+);
- <AsideHeader renderContent={renderContent} {...restProps} />
+ <PageLayout>
+ <Suspense fallback={<AsideFallback />}>
+ <Aside />
+ </Suspense>
+
+ <PageLayout.Content>
+ <ContentExample />
+ </PageLayout.Content>
+ </PageLayout>
--- Aside.tsx
+++ Aside.tsx
-import {AsideHeader} from '@gravity-ui/navigation';
+import {PageLayoutAside} from '@gravity-ui/navigation';
export const Aside: FC = () => {
return (
- <AsideHeader {...props}>
+ <PageLayoutAside {...props}/>
);
};Imports
import {AsideHeader} from '@gravity-ui/navigation';CSS API AsideHeader
Used for themization Navigation's components
| Name | Description |
|---|---|
--gn-aside-header-decoration-collapsed-background-color |
Decoration color for collapsed navigation |
--gn-aside-header-decoration-expanded-background-color |
Decoration color for expanded navigation |
--gn-aside-header-background-color |
Navigation background color |
--gn-aside-header-divider-horizontal-color |
All horizontal divider line color |
--gn-aside-header-divider-vertical-color |
Vertical divider line color between AsideHeader and content |
--gn-aside-top-panel-height |
Read only.AsideHeader top alert height |
| Item | |
--gn-aside-header-general-item-icon-color |
Icon color for Subheader and Footer items |
--gn-aside-header-item-icon-color |
Icon color for CompositeBar items |
--gn-aside-header-item-text-color |
|
--gn-aside-header-item-background-color-hover |
|
| Current Item | |
--gn-aside-header-item-current-background-color |
|
--gn-aside-header-item-current-icon-color |
|
--gn-aside-header-item-current-text-color |
|
--gn-aside-header-item-current-background-color-hover |