Materialish

Navigation

Navigations organize content or pages within your application.

🙌 Heads up! This code is editable. The preview above will update to reflect your changes.

Usage

import { Navigation } from 'materialish';
import 'materialish/materialish.css';

Navigation

Props

Prop NameDefault ValueDescription
classNameAdditional class name(s) to add to the navigation
childrenOne or more Navigation.Item components
verticalfalseWhether to render the navigation vertically or horizontally
centeredfalsePass true to center the Navigation.Items within the navigation
fullWidthfalsePass true for the Navigation.Items to span the entire width of the navigation
rippletruePass false to disable the ripple effect on the Navigation
nodeRefPass a ref to get access to the root node
...restOther props are placed on the root node of the navigation

CSS Variables

VariableDefault ValueDescription
--mt-baseFontSize1remThe size of text within the navigation is based off of this value
--mt-fontFamily'Roboto'The font family to use for text
--mt-navigation-colorvar(--mt-mainColor, #2196f3)This variable determines the color of the navigation

Navigation.Item

Props

Prop NameDefault ValueDescription
classNameAdditional class name(s) to add to the navigation item
childrenThe contents to render within the navigation item
activefalsePass true for this item to be active. Only one item should be active at a time.
rippleUse this prop to override the Navigation's ripple prop on a per-Navigation.Item basis
nodeRefPass a ref to get access to the root node
...restOther props are placed on the root element of the navigation item

Useful Links