Navigation Bar
- Web Components
- Flutter
Demo
zeta-web v0.6.6
Web Components
Navigation Bars (Bottom navigation) allow movement between primary destinations in an app.
Storybook
https://design.zebra.com/web/storybook/?path=/docs/components-navigation-bar--docs
Slots
Name | Description | Type |
---|---|---|
default | A collection of 'zeta-grid-menu-item's to be displayed in the navigation bar. | text |
Attributes
Name | Description | Type | Default |
---|---|---|---|
shrinkItems | boolean | false |
Demo
Navigation Bars (Bottom navigation) allow movement between primary destinations in an app.
Widgetbook
Inheritance
Object
> DiagnosticableTree
> Widget
> StatelessWidget
> ZetaStatelessWidget
Constructors
Creates a new ZetaNavigationBar.
ZetaNavigationBar.new({Key? key, bool? rounded, required List<ZetaNavigationBarItem> items, int? currentIndex, void onTap(int value)?, bool splitItems = false, int? dividerIndex, Widget? action, String? semanticLabel, bool shrinkItems = false, bool useSafeArea = true})
Creates a ZetaNavigationBar with an action.
ZetaNavigationBar.action({Key? key, bool? rounded, required List<ZetaNavigationBarItem> items, required Widget? action, int? currentIndex, void onTap(int value)?, String? semanticLabel, bool shrinkItems = false, bool useSafeArea = true})
Creates a ZetaNavigationBar with a divider after the item at the given index.
ZetaNavigationBar.divided({bool? rounded, Key? key, required List<ZetaNavigationBarItem> items, int? currentIndex, void onTap(int value)?, int? dividerIndex, String? semanticLabel, bool shrinkItems = false, bool useSafeArea = true})
Creates a ZetaNavigationBar and splits the items in half.
ZetaNavigationBar.split({bool? rounded, Key? key, required List<ZetaNavigationBarItem> items, int? currentIndex, void onTap(int value)?, int? dividerIndex, String? semanticLabel, bool useSafeArea = true})
Properties
Name | Description | Type | Features |
---|---|---|---|
action | The action shown on the navigation bar. | Widget? | final |
currentIndex | The index of the currently active item. | int? | final |
dividerIndex | The index of the item the divider should be displayed after. | int? | final |
hashCode | The hash code for this object. | int | no setter inherited |
items | The items displayed on the navigation bar. | List<ZetaNavigationBarItem> | final |
key | Controls how one widget replaces another widget in the tree. | Key? | final inherited |
onTap | Called when an item is tapped with the index of the tapped item. | void Function(int value)? | final |
rounded | Sets rounded or sharp border of the containing box and the icon style. | bool? | final inherited |
runtimeType | A representation of the runtime type of the object. | Type | no setter inherited |
semanticLabel | Value passed to the Semantics widget. | String? | final |
shrinkItems | When set to true the items will shrink to take up less space. | bool | final |
splitItems | Divides the navigation items in half. | bool | final |
useSafeArea | Whether the child should be wrapped in a SafeArea. | bool | final |
Methods
Name | Description | Type | Features |
---|---|---|---|
build(BuildContext context) | Describes the part of the user interface represented by this widget. | Widget | override |
createElement() | Creates a StatelessElement to manage this widget's location in the tree. | StatelessElement | inherited |
debugDescribeChildren() | Returns a list of DiagnosticsNode objects describing this node's children. | List<DiagnosticsNode> | inherited |
debugFillProperties(DiagnosticPropertiesBuilder properties) | Add additional properties associated with the node. | void | override |
noSuchMethod(Invocation invocation) | Invoked when a nonexistent method or property is accessed. | dynamic | inherited |
paddingAll(double space) | Available on Widget, provided by the SpacingWidget extension | Widget | undefined |
paddingBottom(double space) | Available on Widget, provided by the SpacingWidget extension | Widget | undefined |
paddingEnd(double space) | Available on Widget, provided by the SpacingWidget extension | Widget | undefined |
paddingHorizontal(double space) | Available on Widget, provided by the SpacingWidget extension | Widget | undefined |
paddingStart(double space) | Available on Widget, provided by the SpacingWidget extension | Widget | undefined |
paddingTop(double space) | Available on Widget, provided by the SpacingWidget extension | Widget | undefined |
paddingVertical(double space) | Available on Widget, provided by the SpacingWidget extension | Widget | undefined |
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) | Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. | DiagnosticsNode | inherited |
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) | A string representation of this object. | String | inherited |
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) | Returns a string representation of this node and its descendants. | String | inherited |
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) | Returns a one-line detailed description of the object. | String | inherited |
toStringShort() | A short, textual description of this widget. | String | inherited |
Figma