@@ -225,16 +218,17 @@ const ComponentsPage = React.createClass({

Menu Item MenuItem

This is a component used in other components (see Buttons, Navbars).

It supports the basic anchor properties href, target, title.

-

It also supports different properties of the normal Bootstrap MenuItem. -

    -
  • header: To add a header label to sections
  • -
  • divider: Adds an horizontal divider between sections
  • -
  • disabled: shows the item as disabled, and prevents the onclick
  • -
  • eventKey: passed to the callback
  • -
  • onSelect: a callback that is called when the user clicks the item.
  • -
-

The callback is called with the following arguments: eventKey, href and target

+

+ It also supports different properties of the normal Bootstrap MenuItem.

+
    +
  • header: To add a header label to sections
  • +
  • divider: Adds an horizontal divider between sections
  • +
  • disabled: shows the item as disabled, and prevents the onclick
  • +
  • eventKey: passed to the callback
  • +
  • onSelect: a callback that is called when the user clicks the item.
  • +
+

The callback is called with the following arguments: eventKey, href and target

Props

@@ -500,51 +494,74 @@ const ComponentsPage = React.createClass({ {/* Navbar */}
-

Navbars Navbar, NavBrand, Nav, CollapsibleNav, NavItem

+

+ Navbars{' '} + Navbar, NavbarBrand, NavbarHeader, NavbarToggle, NavbarCollapse +

-

Navbars are by default accessible and will provide role="navigation".

-

They also supports all the different Bootstrap classes as properties. Just camelCase the css class and remove navbar from it. For example navbar-fixed-top becomes the property fixedTop. The different properties are fixedTop, fixedBottom, staticTop, inverse, fluid.

-

You can specify a brand node by wrapping it in a NavBrand element and passing it as a child to the Navbar.

-

You can drag elements to the right by specifying the right property on the Nav component.

+

Navbars are responsive meta components that serve as navigation headers for your application or site.

+

+ They also support all the different Bootstrap classes as properties. Just camelCase + the css class and remove navbar from it. +

+

+ For example navbar-fixed-top becomes the property fixedTop. + The different properties are fixedTop, fixedBottom, staticTop + , inverse, and fluid. +

+

+ You can also align elements to the right by specifying the pullRight prop on + the Nav, and other sub-components. +

Navbar Basic Example

- -

Mobile Friendly

-

To have a mobile friendly Navbar, specify the property toggleNavKey on the Navbar with a value corresponding to an eventKey of one of his Nav children. This child will be the one collapsed.

-

By setting the property {React.DOM.code(null, 'defaultNavExpanded')} the Navbar will start expanded by default.

-

Scrollbar overflow

-

The height of the collapsible is slightly smaller than the real height. To hide the scroll bar, add the following css to your style files.

-
-                      {React.DOM.code(null,
-                        '.navbar-collapse {\n' +
-                        '  overflow: hidden;\n' +
-                        '}\n'
-                      )}
-                    
+

Additional Import Options

+

+ The Navbar Header, Toggle, Brand, and Collapse components are available as static properties + the {""} component but you can also import them directly from + the /lib directory + like: {'require("react-bootstrap/lib/NavbarHeader")'}. +

+ +

Responsive Navbars

+

+ To have a mobile friendly Navbar, Add a Navbar.Toggle to your Header and wrap your + Navs in a Navbar.Collapse component. The Navbar will automatically wire + the toggle and collapse together! +

+

+ By setting the prop defaultNavExpanded the Navbar will start + expanded by default. You can also finely control the collapsing behavior by using + the expanded and onToggle props. +

+ -

Mobile Friendly (Multiple Nav Components)

-

To have a mobile friendly Navbar that handles multiple Nav components use CollapsibleNav. The toggleNavKey must still be set, however, the corresponding eventKey must now be on the CollapsibleNav component.

-
-

Div collapse

-

The navbar-collapse div gets created as the collapsible element which follows the bootstrap collapsible navbar documentation.

-
<div class="collapse navbar-collapse"></div>
-
- +

Forms

+

+ Use the Navbar.Form convenience component to apply proper margins and alignment to + form components. +

+ + +

Text and Non-nav links

+

+ Loose text and links can be wraped in the convenience + components: Navbar.Link and Navbar.Text +

+ +

Props

Navbar

-

NavBrand

- - -

CollapsibleNav

- +

NavbarToggle, Navbar.Toggle

+
{/* Breadcrumb */} @@ -978,58 +995,87 @@ const ComponentsPage = React.createClass({

Props