+ + + + - - {/* Buttons */} -
-

Buttons Button

-

Options

-

Use any of the available button style types to quickly create a styled button. Just modify the bsStyle prop.

- -
-

Button spacing

-

Because React doesn"t output newlines between elements, buttons on the same line are displayed - flush against each other. To preserve the spacing between multiple inline buttons, wrap your - button group in {""}.

-
- -

Sizes

-

Fancy larger or smaller buttons? Add bsSize="large", bsSize="small", or bsSize="xsmall" for additional sizes.

- - -

Create block level buttons—those that span the full width of a parent— by adding the block prop.

- - -

Active state

-

To set a buttons active state simply set the components active prop.

- - -

Disabled state

-

Make buttons look unclickable by fading them back 50%. To do this add the disabled attribute to buttons.

- - -
-

Event handler functionality not impacted

-

This prop will only change the {"

- -

Button tags

-

The DOM element tag is choosen automatically for you based on the props you supply. Passing - a href will result in the button using a {""} element otherwise - a {"

- - {/* Button Groups */} -
-

Button groups ButtonGroup, ButtonToolbar

-

Group a series of buttons together on a single line with the button group.

- -

Basic example

-

Wrap a series of {"

- -
-

Button dropdowns

-

Use {""} or {""} components to display a button with a dropdown menu.

- -

Single button dropdowns

-

Create a dropdown button with the {""} component.

- - -

Split button dropdowns

-

Similarly, create split button dropdowns with the {""} component.

- - -

Sizing

-

Button dropdowns work with buttons of all sizes.

- - -

No caret variation

-

Remove the caret using the noCaret prop.

- - -

Dropup variation

-

Trigger dropdown menus that site above the button by adding the dropup prop.

- - -

Dropdown right variation

-

Trigger dropdown menus that align to the right of the button using the pullRight prop.

- - -

Dropdown Customization

-

- If the default handling of the dropdown menu and toggle components aren"t to your liking, you can - customize them, by using the more basic Dropdown Component to explicitly specify - the Toggle and Menu components -

-
-

Additional Import Options

-

- As a convenience Toggle and Menu components available as static properties - on the Dropdown component. However, you can also import them directly, from - the /lib directory like: {'require("react-bootstrap/lib/DropdownToggle")'}. -

-
- - -

Custom Dropdown Components

- -

- For those that want to customize everything, you can forgo the included Toggle and Menu components, - and create your own. In order to tell the Dropdown component what role your custom components play - add a special prop bsRole to your menu or toggle components. The Dropdown expects - at least one component with bsRole="toggle" and exactly one with bsRole="menu". -

- - -

Props

- -

DropdownButton

- - -

SplitButton

- - -

Dropdown

- -
- - {/* Menu Item */} -
-

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

- - -

Props

- -
- - {/* Panels */} -
-

Panels Panel, PanelGroup, Accordion

- -

Basic example

-

By default, all the <Panel /> does is apply some basic border and padding to contain some content.

-

You can pass on any additional properties you need, e.g. a custom onClick handler, as it is shown in the example code. They all will apply to the wrapper div element.

- - -

Collapsible Panel

- - -

Panel with heading

-

Easily add a heading container to your panel with the header prop.

- - -

Panel with footer

-

Pass buttons or secondary text in the footer prop. Note that panel footers do not inherit colors and borders when using contextual variations as they are not meant to be in the foreground.

- - -

Contextual alternatives

-

Like other components, easily make a panel more meaningful to a particular context by adding a bsStyle prop.

- - -

With tables and list groups

-

Add the fill prop to <Table /> or <ListGroup /> elements to make them fill the panel.

- - -

Controlled PanelGroups

-

PanelGroups can be controlled by a parent component. The activeKey prop dictates which panel is open.

- - -

Uncontrolled PanelGroups

-

PanelGroups can also be uncontrolled where they manage their own state. The defaultActiveKey prop dictates which panel is open when initially.

- - -

Accordions

-

<Accordion /> aliases <PanelGroup accordion />.

- - -

Props

- -

Panels, Accordion

- - -

PanelGroup

- - -
- -
-

Modals Modal

- -

Static Markup

-

A modal dialog component

- - -

Basic example

-

-

- A modal with header, body, and set of actions in the footer. Use {""} in combination with other components to - show or hide your Modal. The {""} Component comes with - a few convenient "sub components": {""}, {""}, {""}, - and {""}, which you can use to build the Modal content. -

- -
-

Additional Import Options

-

- The Modal Header, Title, Body, and Footer components are available as static properties the {""} component, but you can also, - import them directly from the /lib directory like: {'require("react-bootstrap/lib/ModalHeader")'}. -

-
- -

Contained Modal

-

You will need to add the following css to your project and ensure that your container has the modal-container class.

-
-                    {React.DOM.code(null,
-                      '.modal-container {\n' +
-                      '  position: relative;\n' +
-                      '}\n' +
-                      '.modal-container .modal, .modal-container .modal-backdrop {\n' +
-                      '  position: absolute;\n' +
-                      '}\n'
-                    )}
-                  
- - -

Sizing modals using standard Bootstrap props

-

You can specify a bootstrap large or small modal by using the "bsSize" prop.

- - -

Sizing modals using custom CSS

-

You can apply custom css to the modal dialog div using the "dialogClassName" prop. Example is using a custom css class with width set to 90%.

- - -

Props

- -

Modal

- - -

Modal.Header

- - -

Modal.Title

- - -

Modal.Body

- - -

Modal.Footer

- -
- - - {/* Tooltip */} -
-

Tooltip

-

- Tooltip component for a more stylish alternative to that anchor tag title attribute. -

- - -

With OverlayTrigger

-

Attach and position tooltips with OverlayTrigger.

- - -

In text copy

-

Positioned tooltip in text copy.

- - -

Props

- -

Overlay Trigger

- - -

Tooltip

- -
- - {/* Popover */} -
-

Popovers

- -

- The Popover, offers a more robust alternative to the Tooltip for displaying overlays of content. -

- - -

With OverlayTrigger

-

The Popover component, like the Tooltip can be used with an OverlayTrigger Component, and positioned around it.

- - -

Trigger behaviors

-

It"s inadvisable to use "hover" or "focus" triggers for popovers, because they have poor accessibility from keyboard and on mobile devices.

- - -

Popover component in container

- - -

Positioned popover components in scrolling container

- - -

Props

- -
- - {/* Overlay */} -
-

Overlay

- -

- The OverlayTrigger component is great for most use cases, but as a higher level abstraction it can lack the flexibility needed - to build more nuanced or custom behaviors into your Overlay components. For these cases it can be helpful to forgo the trigger and use - the Overlay component directly. -

- - -

Use Overlay instead of Tooltip and Popover

-

- You don"t need to use the provided Tooltip or Popover components. Creating custom overlays - is as easy as wrapping some markup in an Overlay component -

- - -

Props

- -
- - {/* Progress Bar */} -
-

Progress bars ProgressBar

- -

Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.

- -

Basic example

-

Default progress bar.

- - -

With label

-

Add a label prop to show a visible percentage. For low percentages, consider adding a min-width to ensure the label"s text is fully visible.

-

The following keys are interpolated with the current values: %(min)s, %(max)s, %(now)s, %(percent)s, %(bsStyle)s

- - -

Screenreader only label

-

Add a srOnly prop to hide the label visually.

- - -

Contextual alternatives

-

Progress bars use some of the same button and alert classes for consistent styles.

- - -

Striped

-

Uses a gradient to create a striped effect. Not available in IE8.

- - -

Animated

-

Add active prop to animate the stripes right to left. Not available in IE9 and below.

- - -

Stacked

-

Nest <ProgressBar />s to stack them.

- - -

ProgressBar

- -
- - {/* Nav */} -
-

Navs Nav, NavItem

- -

Navs come in two styles, pills and tabs. Disable a tab by adding disabled.

- - -

Dropdown

-

Add dropdowns using the NavDropdown component.

- - -

Stacked

-

They can also be stacked vertically.

- - -

Justified

-

They can be justified to take the full width of their parent.

- - -

Props

- -

Nav

- - -

NavItem

- - -
- - {/* Navbar */}

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

-

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

- -
-

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. -

- - - -

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

- - -

NavbarToggle, Navbar.Toggle

- -
- - {/* Breadcrumb */} -
-

Breadcrumbs Breadcrumb, BreadcrumbItems

-

Breadcrumbs are used to indicate the current page's location. Add active attribute to active BreadcrumbItem.

-

Do not set both active and href attributes. active overrides href and span element is rendered instead of a.

- -

Breadcrumbs Example

- - -

Props

-

Breadcrumb component itself doesn't have any specific public properties

- -

BreadcrumbItem

- -
- - {/* Tabbed Areas */} -
-

Togglable tabs Tabs, Tab

- -

Add quick, dynamic tab functionality to transition through panes of local content.

- -

Uncontrolled

-

Allow the component to control its own state.

- - -

Controlled

-

Pass down the active state on render via props.

- - -

No animation

-

Set the animation prop to false

- - -

Left tabs

-

Set position to "left". Optionally, tabWidth can be passed the number of columns for the tabs.

- - -

Props

- -

Tabs

- - -

Tab

- -
- - {/* Pager */} -
-

Pager Pager, PageItem

-

Quick previous and next links.

- -

Centers by default

- - -

Aligned

-

Set the previous or next prop to true, to align left or right.

- - -

Disabled

-

Set the disabled prop to true to disable the link.

- - -

Props

- -

Pager

- - -

PageItem

- -
- - {/* Pagination */} -
-

Pagination Pagination

- -

Provide pagination links for your site or app with the multi-page pagination component. Set items to the number of pages. activePage prop dictates which page is active

- - -

More options

-

such as first, last, previous, next and ellipsis.

- - -

Props

- -
- - {/* Alerts */} -
-

Alert messages Alert

- -

Basic alert styles.

- - -

Closeable alerts

-

just pass in a onDismiss function.

- - -
-

Screen Reader Accessibility

-

Unlike regular Bootstrap, alerts have an sr-only dismiss button after the content.

-
- -

Auto closeable

-

Auto close after a set time with dismissAfter prop.

- - -

Props

- -
- - {/* Carousels */} -
-

Carousels Carousel, CarouselItem

- -

Uncontrolled

-

Allow the component to control its own state.

- - -

Controlled

-

Pass down the active state on render via props.

- - -

Props

- -

Carousel

- - -

CarouselItem

- -
- - {/* Grids */} -
-

Grids Grid, Row, Col

- - - -

Props

- -

Grid

- - -

Row

- - -

Col

- -
- - {/* Images */} -
-

Images

- -

Shape

-

Use the rounded, circle and thumbnail props to customise the image.

- - -

Responsive

-

Use the responsive to scale image nicely to the parent element.

- - -

Props

- -
- - {/* Thumbnail */} -
-

Thumbnail

- -

Thumbnails are designed to showcase linked images with minimal required markup. You can extend the grid component with thumbnails.

- -

Anchor Thumbnail

-

Creates an anchor wrapping an image.

- - -

Divider Thumbnail

-

Creates a divider wrapping an image and other children elements.

- - -

Props

- +

React-Bootstrap offers a number of accessible overlay components built using react-overlays.

- {/* ListGroup */} -
-

List group ListGroup, ListGroupItem

-

Quick previous and next links.

- -

Centers by default

- - -

Linked

-

Set the href or onClick prop on ListGroupItem, to create a linked or clickable element.

- - -

Styling by state

-

Set the active or disabled prop to true to mark or disable the item.

- - -

Styling by color

-

Set the bsStyle prop to style the item

- - -

With header

-

Set the header prop to create a structured item, with a heading and a body area.

- - -

With custom component children

-

- When using ListGroupItems directly, ListGroup looks at whether the items have href - or onClick props to determine which DOM elements to emit. However, with custom item - components as children to ListGroup, set the - componentClass prop to specify which element ListGroup should output. -

- - -

Props

- -

ListGroup

- + + + + -

ListGroupItem

- -
- - {/* Labels */}
-

Labels

- -

Create a {""} to highlight information

- - -

Available variations

-

Add any of the below mentioned modifier classes to change the appearance of a label.

- +

+ Navigation +

-

Props

- +

React-Bootstrap offers a variety of responsive, accessible components for setting up navigation both across your website and within your pages.

- {/* Badges */} -
-

Badges

- -

Easily highlight new or unread items by adding a {""} to links, Bootstrap navs, and more.

- -
-

Cross-browser compatibility

-

Unlike regular Bootstrap badges self collapse even in Internet Explorer 8.

-
- -

Props

- -
+ + + + + + - {/* Jumbotron */}
-

Jumbotron

- -

A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.

- +

+ Page layout +

-

Props

- +

The components in this section offer different ways to structure and present data on your page.

- {/* Page Header */} -
-

Page Header

+ + + + + + + -

A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1’s default small element, as well as most other components (with additional styles).

- -
+ - {/* Responsive embed */}
-

Responsive embed

- -

Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device.

-

You don't need to include frameborder="0" in your iframes.

-

Either 16by9 or 4by3 aspect ratio via a16by9 or a4by3 attribute must be set.

- +

+ Media content +

-

Props

- +

The React-Bootstrap media content components offer ways to present images and other media to your users in a responsive way, along with support for styling those components.

- {/* Wells */} -
-

Wells

- -

Use the well as a simple effect on an element to give it an inset effect.

- + + + + -

Optional classes

-

Control padding and rounded corners with two optional modifier classes.

- - -

Props

- -
- - {/* Glyphicons */}
-

Glyphicons

- -

Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

- +

+ Miscellaneous components +

-

Props

- +

React-Bootstrap also offers various standalone components that can be used to present specific, relevant kinds of information across your pages.

- {/* Tables */} -
-

Tables

- -

Use the striped, bordered, condensed and hover props to customise the table.

- - -

Responsive

-

Add responsive prop to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.

- - -

Props

- -
+ + + + + - {/* Input */}
-

Input

- -

Renders an input in bootstrap wrappers. Supports label, help, text input add-ons, validation and use as wrapper. - Use getValue() or getChecked() to get the current state. - The helper method getInputDOMNode() returns the internal input element. If you don"t want the form-group class applied apply the prop named standalone.

- - -

Types

-

Supports select, textarea, as well as standard HTML input types. getValue() returns an array for multiple select.

- - -

FormControls.Static

-

Static text can be added to your form controls through the use of the FormControls.Static component.

- - -

Button Input Types

-

Form buttons are encapsulated by ButtonInput. Pass in type="reset" or type="submit" to suit your needs. Styling is the same as Button.

- - -

Add-ons

-

Use addonBefore and addonAfter for normal addons, buttonBefore and buttonAfter for button addons. - Exotic configurations may require some css on your side.

- - -

Sizes

-

Use bsSize to change the size of inputs. It also works with addons and most other options.

- - -

Validation

-

Set bsStyle to one of success, warning or error. - Add hasFeedback to show glyphicon. Glyphicon may need additional styling if there is an add-on or no label.

- - -

Horizontal forms

-

Use labelClassName and wrapperClassName properties to add col classes manually. - checkbox and radio types need special treatment because label wraps input.

- - -

Use as a wrapper

-

If type is not set, child element(s) will be rendered instead of an input element. - getValue() will not work when used this way.

- +

+ Utilities +

-

Props

- +

React-Bootstrap also exposes certain utility components used internally. They can be used to enhance your own custom components as well.

- {/* Utilities */} -
-

Utilities Portal, Position

- -

Portal

-

- A Component that renders its children into a new React "subtree" or container. The Portal component kind of like the React - equivalent to jQuery"s .appendTo(), which is helpful for components that need to be appended to a DOM node other than - the component"s direct parent. The Modal, and Overlay components use the Portal component internally. -

- -

Props

- - -

Position

-

- A Component that absolutely positions its child to a target component or DOM node. Useful for creating custom - popups or tooltips. Used by the Overlay Components. -

- -

Props

- - -

Transitions

- -

Collapse

-

Add a collapse toggle animation to an element or component.

-
-

Smoothing animations

-

- If you're noticing choppy animations, - and the component that's being collapsed - has non-zero margin or padding, - try wrapping the contents - of your <Collapse> - {" "}inside a node with no margin or padding, - like the <div> in the example below. - This will allow the height to be computed properly, - so the animation can proceed smoothly. -

-
- - -

Props

- - -

Fade

-

Add a fade animation to a child element or component.

- - -

Props

- -
+ - {/* Missing components */}
-

Missing components

+

+ Missing components +

We've intentionally omitted a few components from React-Bootstrap. Don't worry, though – we cover what to do in this section.

-

Affix

+

+ Affix +

Use {''} or {''} from react-overlays.

There isn't really any additional Bootstrap markup associated with affixes, so we didn't add a Bootstrap-specific affix class. The upstream ones already give you everything you need.

-

Scrollspy

+

+ Scrollspy +

Setting up a scrollspy in idiomatic React requires wiring up a number of components across your entire page, both to handle elements scrolling in and to wire that up to the navigation. It's a poor fit for a component library, because it's not a standalone component.

To implement this functionality, use a library like React Waypoint along with a bit of your own state management.

@@ -1033,46 +210,67 @@ const ComponentsPage = React.createClass({ activeHref={this.state.activeNavItemHref} onSelect={this.handleNavItemSelect} > - - Button groups - Button dropdowns - Menu Item + + Button groups + Dropdowns + Menu items + + + + Modals + Tooltips + Popovers + Custom overlays + + + + Navs + Navbars + Breadcrumbs + Tabs + Pagination + Pager + + + + Grid system + Jumbotron + Page header + List group + Tables + Panels + Wells - Panels - Modals - Tooltips - Popovers - Overlays - Progress bars - Navs - Navbars - Breadcrumbs - Tabs - Pager - Pagination - Alerts - Carousels - Grids - Images - Thumbnail - List group - Labels - Badges - Jumbotron - Page Header - Responsive embed - Wells - Glyphicons - Tables - Input - Utilities - - Affix - Scrollspy + + Forms + + + Images + Thumbnails + Responsive embed + Carousels + + + + Glyphicons + Labels + Badges + Alerts + Progress bars + + + + Transitions + + + + Affix + Scrollspy + - Back to top + Back to top
diff --git a/docs/src/sections/AlertsSection.js b/docs/src/sections/AlertsSection.js new file mode 100644 index 0000000000..c3efeab539 --- /dev/null +++ b/docs/src/sections/AlertsSection.js @@ -0,0 +1,35 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function AlertsSection() { + return ( +
+

+ Alert messages Alert +

+ +

Basic alert styles.

+ + +

Closeable alerts

+

just pass in a onDismiss function.

+ + +
+

Screen Reader Accessibility

+

Unlike regular Bootstrap, alerts have an sr-only dismiss button after the content.

+
+ +

Auto closeable

+

Auto close after a set time with dismissAfter prop.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/BadgeSection.js b/docs/src/sections/BadgeSection.js new file mode 100644 index 0000000000..746f740db5 --- /dev/null +++ b/docs/src/sections/BadgeSection.js @@ -0,0 +1,26 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function BadgeSection() { + return ( +
+

+ Badges Badge +

+ +

Easily highlight new or unread items by adding a {""} to links, Bootstrap navs, and more.

+ +
+

Cross-browser compatibility

+

Unlike regular Bootstrap badges self collapse even in Internet Explorer 8.

+
+ +

Props

+ +
+ ); +} diff --git a/docs/src/sections/BreadcrumbSection.js b/docs/src/sections/BreadcrumbSection.js new file mode 100644 index 0000000000..0a87e86c6f --- /dev/null +++ b/docs/src/sections/BreadcrumbSection.js @@ -0,0 +1,28 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function BreadcrumbSection() { + return ( +
+

+ Breadcrumbs Breadcrumb, BreadcrumbItem +

+ +

Breadcrumbs are used to indicate the current page's location. Add active attribute to active BreadcrumbItem.

+

Do not set both active and href attributes. active overrides href and span element is rendered instead of a.

+ +

Breadcrumbs Example

+ + +

Props

+

Breadcrumb component itself doesn't have any specific public properties

+ +

BreadcrumbItem

+ +
+ ); +} diff --git a/docs/src/sections/ButtonGroupSection.js b/docs/src/sections/ButtonGroupSection.js new file mode 100644 index 0000000000..a6046d1bb5 --- /dev/null +++ b/docs/src/sections/ButtonGroupSection.js @@ -0,0 +1,55 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ButtonGroupSection() { + return ( +
+

+ Button groups ButtonGroup, ButtonToolbar +

+ +

Group a series of buttons together on a single line with the button group.

+ +

Basic example

+

Wrap a series of {"

+ ); +} diff --git a/docs/src/sections/ButtonSection.js b/docs/src/sections/ButtonSection.js new file mode 100644 index 0000000000..dd741ebfe6 --- /dev/null +++ b/docs/src/sections/ButtonSection.js @@ -0,0 +1,62 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ButtonSection() { + return ( +
+

+ Buttons Button +

+ +

Options

+

Use any of the available button style types to quickly create a styled button. Just modify the bsStyle prop.

+ +
+

Button spacing

+

Because React doesn't output newlines between elements, buttons on the same line are displayed + flush against each other. To preserve the spacing between multiple inline buttons, wrap your + button group in {""}.

+
+ +

Sizes

+

Fancy larger or smaller buttons? Add bsSize="large", bsSize="small", or bsSize="xsmall" for additional sizes.

+ + +

Create block level buttons—those that span the full width of a parent— by adding the block prop.

+ + +

Active state

+

To set a buttons active state simply set the components active prop.

+ + +

Disabled state

+

Make buttons look unclickable by fading them back 50%. To do this add the disabled attribute to buttons.

+ + +
+

Event handler functionality not impacted

+

This prop will only change the {"

+ +

Button tags

+

The DOM element tag is choosen automatically for you based on the props you supply. Passing + a href will result in the button using a {""} element otherwise + a {"

+ ); +} diff --git a/docs/src/sections/CarouselSection.js b/docs/src/sections/CarouselSection.js new file mode 100644 index 0000000000..33e49d1c32 --- /dev/null +++ b/docs/src/sections/CarouselSection.js @@ -0,0 +1,32 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function CarouselSection() { + return ( +
+

+ Carousels Carousel, CarouselItem +

+ +

Uncontrolled

+

Allow the component to control its own state.

+ + +

Controlled

+

Pass down the active state on render via props.

+ + +

Props

+ +

Carousel

+ + +

CarouselItem

+ +
+ ); +} diff --git a/docs/src/sections/DropdownSection.js b/docs/src/sections/DropdownSection.js new file mode 100644 index 0000000000..bb35914352 --- /dev/null +++ b/docs/src/sections/DropdownSection.js @@ -0,0 +1,77 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function DropdownSection() { + return ( +
+

+ Dropdowns DropdownButton, SplitButton, Dropdown +

+ +

Single button dropdowns

+

Create a dropdown button with the {""} component.

+ + +

Split button dropdowns

+

Similarly, create split button dropdowns with the {""} component.

+ + +

Sizing

+

Dropdowns work with buttons of all sizes.

+ + +

No caret variation

+

Remove the caret using the noCaret prop.

+ + +

Dropup variation

+

Trigger dropdown menus that site above the button by adding the dropup prop.

+ + +

Dropdown right variation

+

Trigger dropdown menus that align to the right of the button using the pullRight prop.

+ + +

Dropdown Customization

+

+ If the default handling of the dropdown menu and toggle components aren't to your liking, you can + customize them, by using the more basic Dropdown Component to explicitly specify + the Toggle and Menu components +

+
+

Additional Import Options

+

+ As a convenience Toggle and Menu components available as static properties + on the Dropdown component. However, you can also import them directly, from + the /lib directory like: {'require("react-bootstrap/lib/DropdownToggle")'}. +

+
+ + +

Custom Dropdown Components

+ +

+ For those that want to customize everything, you can forgo the included Toggle and Menu components, + and create your own. In order to tell the Dropdown component what role your custom components play + add a special prop bsRole to your menu or toggle components. The Dropdown expects + at least one component with bsRole="toggle" and exactly one with bsRole="menu". +

+ + +

Props

+ +

DropdownButton

+ + +

SplitButton

+ + +

Dropdown

+ +
+ ); +} diff --git a/docs/src/sections/FormSection.js b/docs/src/sections/FormSection.js new file mode 100644 index 0000000000..df79d04df0 --- /dev/null +++ b/docs/src/sections/FormSection.js @@ -0,0 +1,60 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function FormSection() { + return ( +
+

+ Forms Input, ButtonInput, FormControls +

+ +

The {''} component renders an input in Bootstrap wrappers. Supports label, help, text input add-ons, validation and use as wrapper. + Use getValue() or getChecked() to get the current state. + The helper method getInputDOMNode() returns the internal input element. If you don't want the form-group class applied apply the prop named standalone.

+ + +

Types

+

Supports select, textarea, as well as standard HTML input types. getValue() returns an array for multiple select.

+ + +

FormControls.Static

+

Static text can be added to your form controls through the use of the FormControls.Static component.

+ + +

Button Input Types

+

Form buttons are encapsulated by ButtonInput. Pass in type="reset" or type="submit" to suit your needs. Styling is the same as Button.

+ + +

Add-ons

+

Use addonBefore and addonAfter for normal addons, buttonBefore and buttonAfter for button addons. + Exotic configurations may require some css on your side.

+ + +

Sizes

+

Use bsSize to change the size of inputs. It also works with addons and most other options.

+ + +

Validation

+

Set bsStyle to one of success, warning or error. + Add hasFeedback to show glyphicon. Glyphicon may need additional styling if there is an add-on or no label.

+ + +

Horizontal forms

+

Use labelClassName and wrapperClassName properties to add col classes manually. + checkbox and radio types need special treatment because label wraps input.

+ + +

Use as a wrapper

+

If type is not set, child element(s) will be rendered instead of an input element. + getValue() will not work when used this way.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/GlyphiconSection.js b/docs/src/sections/GlyphiconSection.js new file mode 100644 index 0000000000..b9ecaa89e2 --- /dev/null +++ b/docs/src/sections/GlyphiconSection.js @@ -0,0 +1,22 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function GlyphiconSection() { + return ( +
+

+ Glyphicons Glyphicon +

+ +

Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/GridSection.js b/docs/src/sections/GridSection.js new file mode 100644 index 0000000000..eae94e3bf2 --- /dev/null +++ b/docs/src/sections/GridSection.js @@ -0,0 +1,29 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function GridSection() { + return ( +
+

+ Grid system Grid, Row, Col +

+ + + +

Props

+ +

Grid

+ + +

Row

+ + +

Col

+ +
+ ); +} diff --git a/docs/src/sections/ImageSection.js b/docs/src/sections/ImageSection.js new file mode 100644 index 0000000000..ea44cfb084 --- /dev/null +++ b/docs/src/sections/ImageSection.js @@ -0,0 +1,27 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ImageSection() { + return ( +
+

+ Images Image +

+ +

Shape

+

Use the rounded, circle and thumbnail props to customise the image.

+ + +

Responsive

+

Use the responsive to scale image nicely to the parent element.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/JumbotronSection.js b/docs/src/sections/JumbotronSection.js new file mode 100644 index 0000000000..2cde01461a --- /dev/null +++ b/docs/src/sections/JumbotronSection.js @@ -0,0 +1,22 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function JumbotronSection() { + return ( +
+

+ Jumbotron Jumbotron +

+ +

A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/LabelSection.js b/docs/src/sections/LabelSection.js new file mode 100644 index 0000000000..5173356a73 --- /dev/null +++ b/docs/src/sections/LabelSection.js @@ -0,0 +1,26 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function LabelSection() { + return ( +
+

+ Labels Label +

+ +

Create a {""} to highlight information

+ + +

Available variations

+

Add any of the below mentioned modifier classes to change the appearance of a label.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/ListGroupSection.js b/docs/src/sections/ListGroupSection.js new file mode 100644 index 0000000000..fce6aac5a6 --- /dev/null +++ b/docs/src/sections/ListGroupSection.js @@ -0,0 +1,54 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ListGroupSection() { + return ( +
+

+ List group ListGroup, ListGroupItem +

+ +

List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.

+ +

Centers by default

+ + +

Linked

+

Set the href or onClick prop on ListGroupItem, to create a linked or clickable element.

+ + +

Styling by state

+

Set the active or disabled prop to true to mark or disable the item.

+ + +

Styling by color

+

Set the bsStyle prop to style the item

+ + +

With header

+

Set the header prop to create a structured item, with a heading and a body area.

+ + +

With custom component children

+

+ When using ListGroupItems directly, ListGroup looks at whether the items have href + or onClick props to determine which DOM elements to emit. However, with custom item + components as children to ListGroup, set the + componentClass prop to specify which element ListGroup should output. +

+ + +

Props

+ +

ListGroup

+ + +

ListGroupItem

+ +
+ ); +} diff --git a/docs/src/sections/MenuItemSection.js b/docs/src/sections/MenuItemSection.js new file mode 100644 index 0000000000..1e6aaa3f34 --- /dev/null +++ b/docs/src/sections/MenuItemSection.js @@ -0,0 +1,34 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function MenuItemSection() { + return ( +
+

+ Menu items MenuItem +

+ +

This component represents a menu item in a dropdown.

+

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

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/ModalSection.js b/docs/src/sections/ModalSection.js new file mode 100644 index 0000000000..6cde1f0229 --- /dev/null +++ b/docs/src/sections/ModalSection.js @@ -0,0 +1,76 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ModalSection() { + return ( +
+

+ Modals Modal +

+ +

Static Markup

+

A modal dialog component

+ + +

Basic example

+

+

+ A modal with header, body, and set of actions in the footer. Use {""} in combination with other components to + show or hide your Modal. The {""} Component comes with + a few convenient "sub components": {""}, {""}, {""}, + and {""}, which you can use to build the Modal content. +

+ +
+

Additional Import Options

+

+ The Modal Header, Title, Body, and Footer components are available as static properties the {""} component, but you can also, + import them directly from the /lib directory like: {'require("react-bootstrap/lib/ModalHeader")'}. +

+
+ +

Contained Modal

+

You will need to add the following css to your project and ensure that your container has the modal-container class.

+
+        {React.DOM.code(null,
+          '.modal-container {\n' +
+          '  position: relative;\n' +
+          '}\n' +
+          '.modal-container .modal, .modal-container .modal-backdrop {\n' +
+          '  position: absolute;\n' +
+          '}\n'
+        )}
+      
+ + +

Sizing modals using standard Bootstrap props

+

You can specify a bootstrap large or small modal by using the "bsSize" prop.

+ + +

Sizing modals using custom CSS

+

You can apply custom css to the modal dialog div using the "dialogClassName" prop. Example is using a custom css class with width set to 90%.

+ + +

Props

+ +

Modal

+ + +

Modal.Header

+ + +

Modal.Title

+ + +

Modal.Body

+ + +

Modal.Footer

+ +
+ ); +} diff --git a/docs/src/sections/NavSection.js b/docs/src/sections/NavSection.js new file mode 100644 index 0000000000..94fd3d9aa1 --- /dev/null +++ b/docs/src/sections/NavSection.js @@ -0,0 +1,39 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function NavSection() { + return ( +
+

+ Navs Nav, NavItem +

+ +

Navs come in two styles, pills and tabs. Disable a tab by adding disabled.

+ + +

Dropdown

+

Add dropdowns using the NavDropdown component.

+ + +

Stacked

+

They can also be stacked vertically.

+ + +

Justified

+

They can be justified to take the full width of their parent.

+ + +

Props

+ +

Nav

+ + +

NavItem

+ +
+ ); +} diff --git a/docs/src/sections/NavbarSection.js b/docs/src/sections/NavbarSection.js new file mode 100644 index 0000000000..2950a708b9 --- /dev/null +++ b/docs/src/sections/NavbarSection.js @@ -0,0 +1,80 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function NavbarSection() { + return ( +
+

+ Navbars Navbar +

+ +

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

+ +
+

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. +

+ + + +

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

+ + +

NavbarToggle, Navbar.Toggle

+ +
+ ); +} diff --git a/docs/src/sections/OverlaySection.js b/docs/src/sections/OverlaySection.js new file mode 100644 index 0000000000..3e62648380 --- /dev/null +++ b/docs/src/sections/OverlaySection.js @@ -0,0 +1,33 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function OverlaySection() { + return ( +
+

+ Custom overlays Overlay +

+ +

+ The OverlayTrigger component is great for most use cases, but as a higher level abstraction it can lack the flexibility needed + to build more nuanced or custom behaviors into your Overlay components. For these cases it can be helpful to forgo the trigger and use + the Overlay component directly. +

+ + +

Use Overlay instead of Tooltip and Popover

+

+ You don't need to use the provided Tooltip or Popover components. Creating custom overlays + is as easy as wrapping some markup in an Overlay component +

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/PageHeaderSection.js b/docs/src/sections/PageHeaderSection.js new file mode 100644 index 0000000000..1376e537a7 --- /dev/null +++ b/docs/src/sections/PageHeaderSection.js @@ -0,0 +1,22 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function PageHeaderSection() { + return ( +
+

+ Page header PageHeader +

+ +

A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1’s default small element, as well as most other components (with additional styles).

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/PagerSection.js b/docs/src/sections/PagerSection.js new file mode 100644 index 0000000000..5ffb265e06 --- /dev/null +++ b/docs/src/sections/PagerSection.js @@ -0,0 +1,37 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function PagerSection() { + return ( +
+

+ Pager Pager, PageItem +

+ +

Quick previous and next links.

+ +

Centers by default

+ + +

Aligned

+

Set the previous or next prop to true, to align left or right.

+ + +

Disabled

+

Set the disabled prop to true to disable the link.

+ + +

Props

+ +

Pager

+ + +

PageItem

+ +
+ ); +} diff --git a/docs/src/sections/PaginationSection.js b/docs/src/sections/PaginationSection.js new file mode 100644 index 0000000000..ae6375f403 --- /dev/null +++ b/docs/src/sections/PaginationSection.js @@ -0,0 +1,26 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function PaginationSection() { + return ( +
+

+ Pagination Pagination +

+ +

Provide pagination links for your site or app with the multi-page pagination component. Set items to the number of pages. activePage prop dictates which page is active

+ + +

More options

+

such as first, last, previous, next and ellipsis.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/PanelSection.js b/docs/src/sections/PanelSection.js new file mode 100644 index 0000000000..39dcfebdd9 --- /dev/null +++ b/docs/src/sections/PanelSection.js @@ -0,0 +1,60 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function PanelSection() { + return ( +
+

+ Panels Panel, PanelGroup, Accordion +

+ +

Basic example

+

By default, all the <Panel /> does is apply some basic border and padding to contain some content.

+

You can pass on any additional properties you need, e.g. a custom onClick handler, as it is shown in the example code. They all will apply to the wrapper div element.

+ + +

Collapsible Panel

+ + +

Panel with heading

+

Easily add a heading container to your panel with the header prop.

+ + +

Panel with footer

+

Pass buttons or secondary text in the footer prop. Note that panel footers do not inherit colors and borders when using contextual variations as they are not meant to be in the foreground.

+ + +

Contextual alternatives

+

Like other components, easily make a panel more meaningful to a particular context by adding a bsStyle prop.

+ + +

With tables and list groups

+

Add the fill prop to <Table /> or <ListGroup /> elements to make them fill the panel.

+ + +

Controlled PanelGroups

+

PanelGroups can be controlled by a parent component. The activeKey prop dictates which panel is open.

+ + +

Uncontrolled PanelGroups

+

PanelGroups can also be uncontrolled where they manage their own state. The defaultActiveKey prop dictates which panel is open when initially.

+ + +

Accordions

+

<Accordion /> aliases <PanelGroup accordion />.

+ + +

Props

+ +

Panels, Accordion

+ + +

PanelGroup

+ +
+ ); +} diff --git a/docs/src/sections/PopoverSection.js b/docs/src/sections/PopoverSection.js new file mode 100644 index 0000000000..9b5e16eca7 --- /dev/null +++ b/docs/src/sections/PopoverSection.js @@ -0,0 +1,38 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function PopoverSection() { + return ( +
+

+ Popovers Popover +

+ +

+ The Popover, offers a more robust alternative to the Tooltip for displaying overlays of content. +

+ + +

With OverlayTrigger

+

The Popover component, like the Tooltip can be used with an OverlayTrigger Component, and positioned around it.

+ + +

Trigger behaviors

+

It's inadvisable to use "hover" or "focus" triggers for popovers, because they have poor accessibility from keyboard and on mobile devices.

+ + +

Popover component in container

+ + +

Positioned popover components in scrolling container

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/ProgressBarSection.js b/docs/src/sections/ProgressBarSection.js new file mode 100644 index 0000000000..2c2f79b94b --- /dev/null +++ b/docs/src/sections/ProgressBarSection.js @@ -0,0 +1,50 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ProgressBarSection() { + return ( +
+

+ Progress bars ProgressBar +

+ +

Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.

+ +

Basic example

+

Default progress bar.

+ + +

With label

+

Add a label prop to show a visible percentage. For low percentages, consider adding a min-width to ensure the label's text is fully visible.

+

The following keys are interpolated with the current values: %(min)s, %(max)s, %(now)s, %(percent)s, %(bsStyle)s

+ + +

Screenreader only label

+

Add a srOnly prop to hide the label visually.

+ + +

Contextual alternatives

+

Progress bars use some of the same button and alert classes for consistent styles.

+ + +

Striped

+

Uses a gradient to create a striped effect. Not available in IE8.

+ + +

Animated

+

Add active prop to animate the stripes right to left. Not available in IE9 and below.

+ + +

Stacked

+

Nest <ProgressBar />s to stack them.

+ + +

ProgressBar

+ +
+ ); +} diff --git a/docs/src/sections/ResponsiveEmbedSection.js b/docs/src/sections/ResponsiveEmbedSection.js new file mode 100644 index 0000000000..c7883a62e0 --- /dev/null +++ b/docs/src/sections/ResponsiveEmbedSection.js @@ -0,0 +1,24 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ResponsiveEmbedSection() { + return ( +
+

+ Responsive embed ResponsiveEmbed +

+ +

Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device.

+

You don't need to include frameborder="0" in your iframes.

+

Either 16by9 or 4by3 aspect ratio via a16by9 or a4by3 attribute must be set.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/TableSection.js b/docs/src/sections/TableSection.js new file mode 100644 index 0000000000..919b0c33dc --- /dev/null +++ b/docs/src/sections/TableSection.js @@ -0,0 +1,26 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function TableSection() { + return ( +
+

+ Tables Table +

+ +

Use the striped, bordered, condensed and hover props to customise the table.

+ + +

Responsive

+

Add responsive prop to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/TabsSection.js b/docs/src/sections/TabsSection.js new file mode 100644 index 0000000000..cccdd6f2b9 --- /dev/null +++ b/docs/src/sections/TabsSection.js @@ -0,0 +1,42 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function TabsSection() { + return ( +
+

+ Togglable tabs Tabs, Tab +

+ +

Add quick, dynamic tab functionality to transition through panes of local content.

+ +

Uncontrolled

+

Allow the component to control its own state.

+ + +

Controlled

+

Pass down the active state on render via props.

+ + +

No animation

+

Set the animation prop to false

+ + +

Left tabs

+

Set position to "left". Optionally, tabWidth can be passed the number of columns for the tabs.

+ + +

Props

+ +

Tabs

+ + +

Tab

+ +
+ ); +} diff --git a/docs/src/sections/ThumbnailSection.js b/docs/src/sections/ThumbnailSection.js new file mode 100644 index 0000000000..52e77f2a41 --- /dev/null +++ b/docs/src/sections/ThumbnailSection.js @@ -0,0 +1,29 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function ThumbnailSection() { + return ( +
+

+ Thumbnails Thumbnail +

+ +

Thumbnails are designed to showcase linked images with minimal required markup. You can extend the grid component with thumbnails.

+ +

Anchor Thumbnail

+

Creates an anchor wrapping an image.

+ + +

Divider Thumbnail

+

Creates a divider wrapping an image and other children elements.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/TooltipSection.js b/docs/src/sections/TooltipSection.js new file mode 100644 index 0000000000..b4aa8f1290 --- /dev/null +++ b/docs/src/sections/TooltipSection.js @@ -0,0 +1,37 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function TooltipSection() { + return ( +
+

+ Tooltips Tooltip +

+ +

+ Tooltip component for a more stylish alternative to that anchor tag title attribute. +

+ + +

With OverlayTrigger

+

Attach and position tooltips with OverlayTrigger.

+ + +

In text copy

+

Positioned tooltip in text copy.

+ + +

Props

+ +

Overlay Trigger

+ + +

Tooltip

+ +
+ ); +} diff --git a/docs/src/sections/TransitionSection.js b/docs/src/sections/TransitionSection.js new file mode 100644 index 0000000000..3002819849 --- /dev/null +++ b/docs/src/sections/TransitionSection.js @@ -0,0 +1,52 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function TransitionSection() { + return ( +
+

+ Transitions Collapse, Fade +

+ +

Transition components animate their children transitioning in and out.

+ +

+ Collapse +

+ +

Add a collapse toggle animation to an element or component.

+
+

Smoothing animations

+

+ If you're noticing choppy animations, + and the component that's being collapsed + has non-zero margin or padding, + try wrapping the contents + of your <Collapse> + {" "}inside a node with no margin or padding, + like the <div> in the example below. + This will allow the height to be computed properly, + so the animation can proceed smoothly. +

+
+ + +

Props

+ + +

+ Fade +

+ +

Add a fade animation to a child element or component.

+ + +

Props

+ +
+ ); +} diff --git a/docs/src/sections/WellSection.js b/docs/src/sections/WellSection.js new file mode 100644 index 0000000000..4d5db7bc73 --- /dev/null +++ b/docs/src/sections/WellSection.js @@ -0,0 +1,26 @@ +import React from 'react'; + +import Anchor from '../Anchor'; +import PropTable from '../PropTable'; +import ReactPlayground from '../ReactPlayground'; +import Samples from '../Samples'; + +export default function WellSection() { + return ( +
+

+ Wells Well +

+ +

Use the well as a simple effect on an element to give it an inset effect.

+ + +

Optional classes

+

Control padding and rounded corners with two optional modifier classes.

+ + +

Props

+ +
+ ); +}