components.html 48.8 KB
Newer Older
1
2
3
4
5
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap, from Twitter</title>
Raul Riera's avatar
Raul Riera committed
6
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles -->
    <link href="../bootstrap.css" rel="stylesheet">
    <link href="assets/css/docs.css" rel="stylesheet">
    <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" type="image/x-icon" href="assets/ico/favicon.ico">
    <link rel="apple-touch-icon" href="assets/ico/bootstrap-apple-57x57.png">
    <link rel="apple-touch-icon" sizes="72x72" href="assets/ico/bootstrap-apple-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="assets/ico/bootstrap-apple-114x114.png">
  </head>

  <body>

    <!-- Navbar
    ================================================== -->
    <div class="navbar navbar-fixed">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="./index.html">Bootstrap</a>
          <ul class="nav">
            <li><a href="./index.html">Overview</a></li>
37
38
39
40
41
42
            <li class="dropdown">
              <a href="./scaffolding.html" class="dropdown-toggle" data-toggle="dropdown">
                Scaffolding
                <b class="caret"></b>
              </a>
              <ul class="dropdown-menu">
43
                <li><a href="./scaffolding.html#grid-system">Grid system</a></li>
44
45
46
47
48
49
50
51
52
53
                <li><a href="./scaffolding.html#layouts">Layouts</a></li>
                <li><a href="./scaffolding.html#responsive">Responsive design</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="./base-css.html" class="dropdown-toggle" data-toggle="dropdown">
                Base CSS
                <b class="caret"></b>
              </a>
              <ul class="dropdown-menu">
54
                <li><a href="./base-css.html#typography">Typography</a></li>
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
                <li><a href="./base-css.html#tables">Tables</a></li>
                <li><a href="./base-css.html#forms">Forms</a></li>
                <li><a href="./base-css.html#buttons">Buttons</a></li>
                <li><a href="./base-css.html#icons">Icons by Glyphicons</a></li>
              </ul>
            </li>
            <li class="dropdown active">
              <a href="./components.html" class="dropdown-toggle" data-toggle="dropdown">
                Components
                <b class="caret"></b>
              </a>
              <ul class="dropdown-menu">
                <li><a href="./components.html#buttonGroups">Button groups</a></li>
                <li><a href="./components.html#buttonDropdowns">Split button dropdowns</a></li>
                <li><a href="./components.html#navs">Nav, tabs, pills</a></li>
                <li><a href="./components.html#navbar">Navbar</a></li>
                <li><a href="./components.html#breadcrumbs">Breadcrumbs</a></li>
                <li><a href="./components.html#pagination">Pagination</a></li>
                <li><a href="./components.html#thumbnails">Thumbnails</a></li>
                <li><a href="./components.html#alerts">Alert messages</a></li>
75
                <li><a href="./components.html#progress">Progress bars</a></li>
76
77
78
79
80
81
82
83
              </ul>
            </li>
            <li class="dropdown">
              <a href="./javascript.html" class="dropdown-toggle" data-toggle="dropdown">
                Javascript plugins
                <b class="caret"></b>
              </a>
              <ul class="dropdown-menu">
Purwandi's avatar
Purwandi committed
84
85
86
                <li><a href="./javascript.html#transitions">Transition</a></li>
                <li><a href="./javascript.html#modals">Modal</a></li>
                <li><a href="./javascript.html#dropdowns">Dropdown</a></li>
87
                <li><a href="./javascript.html#scrollspy">Scrollspy</a></li>
Purwandi's avatar
Purwandi committed
88
89
90
                <li><a href="./javascript.html#tabs">Tab</a></li>
                <li><a href="./javascript.html#tooltips">Tooltip</a></li>
                <li><a href="./javascript.html#popovers">Popover</a></li>
91
92
93
94
95
96
97
98
99
100
101
102
                <li><a href="./javascript.html#alerts">Alert</a></li>
                <li><a href="./javascript.html#buttons">Button</a></li>
                <li><a href="./javascript.html#collapse">Collapse</a></li>
                <li><a href="./javascript.html#carousel">Carousel</a></li>
                <li><a href="./javascript.html#typeahead">Typeahead</a></li>
              </ul>
            </li>
            <li>
              <a href="./less.html">
                Using LESS
              </a>
            </li>
103
104
105
106
107
108
109
110
111
112
113
          </ul>
        </div>
      </div>
    </div>

    <div class="container">

      <!-- Masthead
      ================================================== -->
      <header class="jumbotron subhead" id="overview">
        <h1>Components</h1>
Mark Otto's avatar
Mark Otto committed
114
        <p class="lead">Dozens of reusable components are built into Bootstrap to provide navigation, alerts, popovers, and much more.</p>
115
116
117
      </header>


118

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
  <!-- Button Groups
  ================================================== -->
  <section id="buttonGroups">
    <div class="page-header">
      <h1>Button groups <small>Join buttons for more toolbar-like functionality</small></h1>
    </div>
    <div class="row">
      <div class="span4">
        <h3>Button groups</h3>
        <p>Use button groups to join multiple buttons together as one composite component. Build them with a series of <code>&lt;a&gt;</code> or <code>&lt;button&gt;</code> elements.</p>
        <p>You can also combine sets of <code>&lt;div class="btn-group"&gt;</code> into a <code>&lt;div class="btn-toolbar"&gt;</code> for more complex projects.</p>
        <div class="well" style="padding: 10px; margin-bottom: 9px;">
          <div class="btn-group">
            <a class="btn" href="#">Left</a>
            <a class="btn" href="#">Middle</a>
            <a class="btn" href="#">Right</a>
          </div>
        </div>
        <div class="well" style="padding: 10px;">
          <div class="btn-toolbar">
            <div class="btn-group">
              <a class="btn" href="#">1</a>
              <a class="btn" href="#">2</a>
              <a class="btn" href="#">3</a>
              <a class="btn" href="#">4</a>
            </div>
            <div class="btn-group">
              <a class="btn" href="#">5</a>
              <a class="btn" href="#">6</a>
              <a class="btn" href="#">7</a>
            </div>
            <div class="btn-group">
              <a class="btn" href="#">8</a>
            </div>
          </div>
        </div>

      </div>
      <div class="span4">
        <h3>Example markup</h3>
        <p>Here's how the HTML looks for a standard button group built with anchor tag buttons:</p>
<pre class="prettyprint linenums">
&lt;div class="btn-group"&gt;
  &lt;a class="btn" href="#"&gt;1&lt;/a&gt;
  &lt;a class="btn" href="#"&gt;2&lt;/a&gt;
  &lt;a class="btn" href="#"&gt;3&lt;/a&gt;
&lt;/div&gt;
</pre>
      <p>And with a toolbar for multiple groups:</p>
<pre class="prettyprint linenums">
&lt;div class="btn-toolbar"&gt;
  &lt;div class="btn-group"&gt;
    ...
  &lt;/div&gt;
&lt;/div&gt;
</pre>
      </div>
      <div class="span4">
        <h3>Checkbox and radio flavors</h3>
        <p>Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View <a href="./javascript.html#buttons">the Javascript docs</a> for that.</p>
        <p><a class="btn js-btn" href="./javascript.html#buttons">Get the javascript &raquo;</a></p>
        <hr>
        <h4 class="muted">Heads up</h4>
        <p class="muted">CSS for button groups is in a separate file, button-groups.less.</p>
      </div>
    </div>
  </section>



  <!-- Split button dropdowns
  ================================================== -->
191
  <section id="buttonDropdowns">
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
    <div class="page-header">
      <h1>Split button dropdowns <small>Built on button groups to provide contextual menus</small></h1>
    </div>
    <div class="row">
      <div class="span4">
        <h3>Split button dropdowns</h3>
        <p>Building on the button group styles and markup, we can easily create a split button. Split buttons feature a standard action on the left and a dropdown toggle on the right with contextual links.</p>
        <div class="well" style="padding: 10px; margin-bottom: 9px;">
          <div class="btn-toolbar" style="margin-bottom: 9px;">
            <div class="btn-group">
              <a class="btn" href="#">Action</a>
              <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="#">Action</a></li>
                <li><a href="#">Another action</a></li>
                <li><a href="#">Something else here</a></li>
                <li class="divider"></li>
                <li><a href="#">Separated link</a></li>
              </ul>
211
            </div><!-- /btn-group -->
212
213
214
215
216
217
218
219
220
221
            <div class="btn-group">
              <a class="btn primary" href="#">Action</a>
              <a class="btn primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="#">Action</a></li>
                <li><a href="#">Another action</a></li>
                <li><a href="#">Something else here</a></li>
                <li class="divider"></li>
                <li><a href="#">Separated link</a></li>
              </ul>
222
            </div><!-- /btn-group -->
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
            <div class="btn-group">
              <a class="btn danger" href="#">Danger</a>
              <a class="btn danger dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="#">Action</a></li>
                <li><a href="#">Another action</a></li>
                <li><a href="#">Something else here</a></li>
                <li class="divider"></li>
                <li><a href="#">Separated link</a></li>
              </ul>
            </div><!-- /btn-group -->
          </div>
          <div class="btn-toolbar">
            <div class="btn-group">
              <a class="btn success" href="#">Success</a>
              <a class="btn success dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="#">Action</a></li>
                <li><a href="#">Another action</a></li>
                <li><a href="#">Something else here</a></li>
                <li class="divider"></li>
                <li><a href="#">Separated link</a></li>
              </ul>
            </div><!-- /btn-group -->
            <div class="btn-group">
              <a class="btn info" href="#">Info</a>
              <a class="btn info dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="#">Action</a></li>
                <li><a href="#">Another action</a></li>
                <li><a href="#">Something else here</a></li>
                <li class="divider"></li>
                <li><a href="#">Separated link</a></li>
              </ul>
            </div><!-- /btn-group -->
          </div>
        </div> <!-- /well -->
      </div>
      <div class="span8">
        <h3>Example markup</h3>
        <p>Similar to a button group, our markup uses regular button markup, but with a handful of additions to refine the style and support Bootstrap's dropdown jQuery plugin.</p>
<pre class="prettyprint linenums">
&lt;div class="btn-group"&gt;
  &lt;a class="btn" href="#"&gt;Action&lt;/a&gt;
  &lt;a class="btn dropdown-toggle" data-toggle="dropdown" href="#"&gt;
    &lt;span class="caret"&gt;&lt;/span&gt;
  &lt;/a&gt;
  &lt;ul class="dropdown-menu"&gt;
    &lt;!-- dropdown menu links --&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</pre>
      </div>
    </div>
  </section>
278

279
280


281
<!-- Nav, Tabs, & Pills
282
================================================== -->
283
<section id="navs">
284
  <div class="page-header">
285
    <h1>Nav, tabs, and pills <small>Highly customizable list-style navigation</small></h1>
286
  </div>
287

288
  <h2>Lightweight defaults <small>Same markup, different classes</small></h2>
289
  <div class="row">
290
291
292
293
294
295
296
297
298
299
300
301
302
303
    <div class="span4">
      <h3>Powerful base class</h3>
      <p>All nav components here&mdash;tabs, pills, and lists&mdash;<strong>share the same base markup and styles</strong> through the <code>.nav</code> class.</p>
      <h3>Why tabs and pills</h3>
      <p>Tabs and pills in Bootstrap are built on a <code>&lt;ul&gt;</code> with the same core HTML, a list of links. Swap between tabs or pills with only a class.</p>
      <p>Both options are great for sub-sections of content or navigating between pages of related content.</p>
    </div>
    <div class="span4">
      <h3>Basic tabs</h3>
      <p>Take a regular <code>&lt;ul&gt;</code> of links and add <code>.tabs</code>:</p>
      <ul class="nav tabs">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Profile</a></li>
        <li><a href="#">Messages</a></li>
304
      </ul>
305
306
307
308
309
310
311
312
313
<pre class="prettyprint linenums">
&lt;ul class="nav tabs"&gt;
  &lt;li class="active"&gt;
    &lt;a href="#"&gt;Home&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;...&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;...&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
314
    </div>
315
316
317
318
319
320
321
    <div class="span4">
      <h3>Basic pills</h3>
      <p>Take that same HTML, but use <code>.pills</code> instead:</p>
      <ul class="nav pills">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Profile</a></li>
        <li><a href="#">Messages</a></li>
322
      </ul>
323
324
325
326
327
328
329
330
331
<pre class="prettyprint linenums">
&lt;ul class="nav pills"&gt;
  &lt;li class="active"&gt;
    &lt;a href="#"&gt;Home&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;...&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;...&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
332
333
334
    </div>
  </div>

335
  <h2>Stackable <small>Make tabs or pills vertical</small></h2>
336
337
  <div class="row">
    <div class="span4">
338
339
      <h3>How to stack 'em</h3>
      <p>As tabs and pills are horizontal by default, just add a second class, <code>.stacked</code>, to make them appear vertically stacked.</p>
340
341
    </div>
    <div class="span4">
342
343
344
345
346
347
      <h3>Stacked tabs</h3>
      <ul class="nav tabs stacked">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Profile</a></li>
        <li><a href="#">Messages</a></li>
      </ul>
348
<pre class="prettyprint linenums">
349
&lt;ul class="nav tabs stacked"&gt;
350
351
352
  ...
&lt;/ul&gt;
</pre>
353
354
355
356
357
358
359
360
    </div>
    <div class="span4">
      <h3>Stacked pills</h3>
      <ul class="nav pills stacked">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Profile</a></li>
        <li><a href="#">Messages</a></li>
      </ul>
361
<pre class="prettyprint linenums">
362
&lt;ul class="nav pills stacked"&gt;
363
364
365
366
  ...
&lt;/ul&gt;
</pre>
    </div>
367
368
  </div>

369
  <h2>Dropdowns <small>For advanced nav components</small></h2>
370
  <div class="row">
371
372
373
374
    <div class="span4">
      <h3>Rich menus made easy</h3>
      <p>Dropdown menus in Bootstrap tabs and pills are super easy and require only a little extra HTML and a lightweight jQuery plugin.</p>
      <p>Head over to the Javascript page to read the docs on <a href="./javascript.html#tabs">initializing dropdowns</a> in Bootstrap.</p>
375
    </div>
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
    <div class="span4">
      <h3>Tabs with dropdowns</h3>
      <ul class="nav tabs">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Profile</a></li>
        <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="#">Action</a></li>
            <li><a href="#">Another action</a></li>
            <li><a href="#">Something else here</a></li>
            <li class="divider"></li>
            <li><a href="#">Separated link</a></li>
          </ul>
        </li>
      </ul>
392
<pre class="prettyprint linenums">
393
394
&lt;ul class="nav tabs"&gt;
  &lt;li class="dropdown"&gt;
395
    &lt;a class="dropdown-toggle"
396
397
398
399
400
401
402
403
404
405
       data-toggle="dropdown"
       href="#"&gt;
        Dropdown
        &lt;b class="caret"&gt;&lt;/b&gt;
      &lt;/a&gt;
    &lt;ul class="dropdown-menu"&gt;
      &lt;!-- links --&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
406
</pre>
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
    </div>
    <div class="span4">
      <h3>Pills with dropdowns</h3>
      <ul class="nav pills">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Profile</a></li>
        <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="#">Action</a></li>
            <li><a href="#">Another action</a></li>
            <li><a href="#">Something else here</a></li>
            <li class="divider"></li>
            <li><a href="#">Separated link</a></li>
          </ul>
        </li>
      </ul>
424
<pre class="prettyprint linenums">
425
426
&lt;ul class="nav pills"&gt;
  &lt;li class="dropdown"&gt;
427
    &lt;a class="dropdown-toggle"
428
429
430
431
432
433
434
435
436
437
       data-toggle="dropdown"
       href="#"&gt;
        Dropdown
        &lt;b class="caret"&gt;&lt;/b&gt;
      &lt;/a&gt;
    &lt;ul class="dropdown-menu"&gt;
      &lt;!-- links --&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
438
439
</pre>
    </div>
440
441
  </div>

442
443
444
445
446
447
  <h2>Nav lists <small>Build simple stacked navs, great for sidebars</small></h2>
  <div class="row">
    <div class="span4">
      <h3>Application-style navigation</h3>
      <p>Nav lists provide a simple and easy way to build groups of nav links with optional headers. They're best used in sidebars like the Finder in OS X.</p>
      <p>Structurally, they're built on the same core nav styles as tabs and pills, so usage and customization are straightforward.</p>
448
449
      <h4>With icons</h4>
      <p>Nav lists are also easy to equip with icons. Add the proper <code>&lt;i&gt;</code> tag with class and you're set.</p>
450
451
    </div>
    <div class="span4">
452
453
      <h3>Example nav list</h3>
      <p>Take a list of links and add <code>class="nav list"</code>:</p>
454
455
456
      <div class="well" style="padding: 8px 0;">
        <ul class="nav list">
          <li class="nav-header">List header</li>
457
          <li class="active"><a href="#">Home</a></li>
458
459
460
461
462
463
          <li><a href="#">Library</a></li>
          <li><a href="#">Applications</a></li>
          <li class="nav-header">Another list header</li>
          <li><a href="#">Profile</a></li>
          <li><a href="#">Settings</a></li>
          <li><a href="#">Help</a></li>
464
        </ul>
465
      </div> <!-- /well -->
466
<pre class="prettyprint linenums">
467
468
469
470
&lt;ul class="nav list"&gt;
  &lt;li class="nav-header"&gt;
    List header
  &lt;/li&gt;
471
  &lt;li class="active"&gt;
472
    &lt;a href="#"&gt;Home&lt;/a&gt;
473
  &lt;/li&gt;
474
475
  &lt;li&gt;
    &lt;a href="#"&gt;Library&lt;/a&gt;
476
  &lt;/li&gt;
477
  ...
478
&lt;/ul&gt;
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
</pre>
    </div>
    <div class="span4">
      <h3>Example with icons</h3>
      <p>Same example, but with <code>&lt;i&gt;</code> tags for icons.</p>
      <div class="well" style="padding: 8px 0;">
        <ul class="nav list">
          <li class="nav-header">List header</li>
          <li class="active"><a href="#"><i class="home"></i> Home</a></li>
          <li><a href="#"><i class="book"></i> Library</a></li>
          <li><a href="#"><i class="pencil"></i> Applications</a></li>
          <li class="nav-header">Another list header</li>
          <li><a href="#"><i class="user"></i> Profile</a></li>
          <li><a href="#"><i class="cog"></i> Settings</a></li>
          <li><a href="#"><i class="flag"></i> Help</a></li>
        </ul>
      </div> <!-- /well -->
<pre class="prettyprint linenums">
&lt;ul class="nav list"&gt;
  ...
  &lt;li&gt;
    &lt;a href="#"&gt;
      &lt;i class="book"&gt;&lt;/i&gt;
      Library
    &lt;/a&gt;
  &lt;/li&gt;
  ...
&lt;/ul&gt;
507
</pre>
508
509
    </div>
  </div>
510

511

512
  <h2>Tabbable nav <small>Bring tabs to life via javascript</small></h2>
513
514
515
  <div class="row">
    <div class="span4">
      <h3>What's included</h3>
516
      <p>Bring your tabs to life with a simple plugin to toggle between content via tabs. Bootstrap integrates tabbable tabs in four styles: top (default), right, bottom, and left.</p>
517
518
      <p>Changing between them is easy and only requires changing very little markup.</p>
    </div>
519
    <div class="span4">
520
521
      <h3>Tabbable example</h3>
      <p>To make tabs tabbable, wrap the <code>.tabs</code> in another div with class <code>.tabbable</code>.</p>
522
      <div class="tabbable" style="margin-bottom: 9px;">
523
        <ul class="nav tabs">
524
525
526
          <li class="active"><a href="#1" data-toggle="tab">Section 1</a></li>
          <li><a href="#2" data-toggle="tab">Section 2</a></li>
          <li><a href="#3" data-toggle="tab">Section 3</a></li>
527
528
529
        </ul>
        <div class="tab-content">
          <div class="tab-pane active" id="1">
530
            <p>I'm in Section 1.</p>
531
532
          </div>
          <div class="tab-pane" id="2">
533
            <p>Howdy, I'm in Section 2.</p>
534
535
          </div>
          <div class="tab-pane" id="3">
536
            <p>What up girl, this is Section 3.</p>
537
538
          </div>
        </div>
539
      </div> <!-- /tabbable -->
540
541
542
543
544
545
546
    </div>
    <div class="span4">
      <h3>Custom jQuery plugin</h3>
      <p>All tabbable tabs are powered by our lightweight jQuery plugin. Read more about how to bring tabbable tabs to life on the javascript docs page.</p>
      <p><a class="btn" href="./javascript.html/#tabs">Get the javascript &rarr;</a></p>
    </div>
  </div>
547

548
549
  <h3>Straightforward markup</h3>
  <p>Using tabbable tabs requires a wrapping div, a set of tabs, and a set of tabbable panes of content.</p>
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
<pre class="prettyprint linenums">
&lt;div class="tabbable"&gt;
  &lt;ul class="nav tabs"&gt;
    &lt;li class="active"&gt;&lt;a href="#1" data-toggle="tab"&gt;Section 1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#2" data-toggle="tab"&gt;Section 2&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;div class="tab-content"&gt;
    &lt;div class="tab-pane active" id="1"&gt;
      &lt;p&gt;I'm in Section 1.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="tab-pane" id="2"&gt;
      &lt;p&gt;Howdy, I'm in Section 2.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</pre>
566

567
568
569
570
571
572
  <h3>Tabbable in any direction</h3>
  <div class="row">
<!--
    <div class="span4">
      <p>Swap the order of your HTML&mdash;placing <code>.tabs</code> after <code>.tab-content</code>&mdash;for tabs on the bottom.</p>
    </div>
573
-->
574
575
576
577
578
579
580
    <div class="span4">
      <h4>Tabs on the bottom</h4>
      <p>Flip the order of the HTML and add a class to put tabs on the bottom.</p>
      <div class="tabbable tabs-below">
        <div class="tab-content">
          <div class="tab-pane active" id="A">
            <p>I'm in Section A.</p>
581
          </div>
582
583
584
585
586
          <div class="tab-pane" id="B">
            <p>Howdy, I'm in Section B.</p>
          </div>
          <div class="tab-pane" id="C">
            <p>What up girl, this is Section C.</p>
587
588
          </div>
        </div>
589
590
591
592
593
594
        <ul class="nav tabs">
          <li class="active"><a href="#A" data-toggle="tab">Section 1</a></li>
          <li><a href="#B" data-toggle="tab">Section 2</a></li>
          <li><a href="#C" data-toggle="tab">Section 3</a></li>
        </ul>
      </div> <!-- /tabbable -->
595
596
597
598
599
600
601
602
603
604
<pre class="prettyprint linenums" style="margin-top: 11px;">
&lt;div class="tabbable tabs-bottom"&gt;
  &lt;ul class="nav tabs"&gt;
    ...
  &lt;/ul&gt;
  &lt;div class="tab-content"&gt;
    ...
  &lt;/div&gt;
&lt;/div&gt;
</pre>
605
606
607
608
609
610
611
612
613
614
    </div>
    <div class="span4">
      <h4>Tabs on the left</h4>
      <p>Swap the class to put tabs on the left.</p>
      <div class="tabbable tabs-left">
        <ul class="nav tabs">
          <li class="active"><a href="#lA" data-toggle="tab">Section 1</a></li>
          <li><a href="#lB" data-toggle="tab">Section 2</a></li>
          <li><a href="#lC" data-toggle="tab">Section 3</a></li>
        </ul>
615
        <div class="tab-content">
616
617
          <div class="tab-pane active" id="lA">
            <p>I'm in Section A.</p>
618
          </div>
619
620
          <div class="tab-pane" id="lB">
            <p>Howdy, I'm in Section B.</p>
621
          </div>
622
623
          <div class="tab-pane" id="lC">
            <p>What up girl, this is Section C.</p>
624
625
          </div>
        </div>
626
      </div> <!-- /tabbable -->
627
628
629
630
631
632
633
634
635
636
<pre class="prettyprint linenums">
&lt;div class="tabbable tabs-left"&gt;
  &lt;ul class="nav tabs"&gt;
    ...
  &lt;/ul&gt;
  &lt;div class="tab-content"&gt;
    ...
  &lt;/div&gt;
&lt;/div&gt;
</pre>
637
638
639
640
641
642
643
644
645
    </div>
    <div class="span4">
      <h4>Tabs on the right</h4>
      <p>Swap the class to put tabs on the right.</p>
      <div class="tabbable tabs-right">
        <ul class="nav tabs">
          <li class="active"><a href="#rA" data-toggle="tab">Section 1</a></li>
          <li><a href="#rB" data-toggle="tab">Section 2</a></li>
          <li><a href="#rC" data-toggle="tab">Section 3</a></li>
646
        </ul>
647
648
649
650
651
652
653
654
655
656
657
658
        <div class="tab-content">
          <div class="tab-pane active" id="rA">
            <p>I'm in Section A.</p>
          </div>
          <div class="tab-pane" id="rB">
            <p>Howdy, I'm in Section B.</p>
          </div>
          <div class="tab-pane" id="rC">
            <p>What up girl, this is Section C.</p>
          </div>
        </div>
      </div> <!-- /tabbable -->
659
660
661
662
663
664
665
666
667
668
<pre class="prettyprint linenums">
&lt;div class="tabbable tabs-right"&gt;
  &lt;ul class="nav tabs"&gt;
    ...
  &lt;/ul&gt;
  &lt;div class="tab-content"&gt;
    ...
  &lt;/div&gt;
&lt;/div&gt;
</pre>
669
670
    </div>
  </div>
671

672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
</section>



<!-- Navbar
================================================== -->
<section id="navbar">
  <div class="page-header">
    <h1>Navbar</h1>
  </div>
  <h2>Static navbar example</h2>
  <p>An example of a static (not fixed to the top) navbar with project name, navigation, and search form.</p>
  <div class="navbar navbar-static">
    <div class="navbar-inner">
      <div class="container" style="width: auto;">
        <a class="brand" href="#">Project name</a>
        <ul class="nav">
          <li class="active"><a href="#">Home</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li><a href="#">Link</a></li>
          <li class="dropdown">
694
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
695
            <ul class="dropdown-menu">
696
697
              <li><a href="#">Action</a></li>
              <li><a href="#">Another action</a></li>
698
699
              <li><a href="#">Something else here</a></li>
              <li class="divider"></li>
700
              <li><a href="#">Separated link</a></li>
701
702
703
704
705
706
            </ul>
          </li>
        </ul>
        <form class="navbar-search pull-left" action="">
          <input type="text" class="search-query span2" placeholder="Search">
        </form>
707
708
        <ul class="nav pull-right">
          <li><a href="#">Link</a></li>
709
710
          <li class="vertical-divider"></li>
          <li class="dropdown">
711
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
712
            <ul class="dropdown-menu">
713
714
              <li><a href="#">Action</a></li>
              <li><a href="#">Another action</a></li>
715
716
              <li><a href="#">Something else here</a></li>
              <li class="divider"></li>
717
              <li><a href="#">Separated link</a></li>
718
719
720
721
722
723
724
725
726
727
728
729
730
731
            </ul>
          </li>
        </ul>
      </div>
    </div><!-- /navbar-inner -->
  </div><!-- /navbar -->

  <div class="row">
    <div class="span8">
      <h3>Navbar scaffolding</h3>
      <p>The navbar requires only a few divs to structure it well for static or fixed display.</p>
<pre class="prettyprint linenums">
&lt;div class="navbar navbar-static"&gt;
  &lt;div class="navbar-inner"&gt;
732
    &lt;div class="container"&gt;
733
734
735
736
737
      ...
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</pre>
Maik Schreiber's avatar
Maik Schreiber committed
738
      <p>To make the navbar fixed, swap the <code>.navbar-static</code> class for <code>.navbar-fixed</code>. In your CSS, you will also need to account for the overlap it causes by adding <code>padding-top: 40px;</code> to your <code>&lt;body&gt;</code>.</p>
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
<pre class="prettyprint linenums">
&lt;div class="navbar navbar-fixed"&gt;
  ...
&lt;/div&gt;
</pre>
      <h3>Brand name</h3>
      <p>A simple link to show your brand or project name only requires an anchor tag.</p>
<pre class="prettyprint linenums">
&lt;a class="brand" href="#"&gt;
  Project name
&lt;/a&gt;
</pre>
      <h3>Search form</h3>
      <p>Search forms receive custom styles in the navbar with the <code>.navbar-search</code> class. Include <code>.pull-left</code> or <code>.pull-right</code> on the <code>form</code> to align it.</p>
<pre class="prettyprint linenums">
&lt;form class="navbar-search"&gt;
  &lt;input type="text" class="search-query pull-left" placeholder="Search"&gt;
&lt;/form&gt;
</pre>
    </div>
    <div class="span4">
      <h3>Nav links</h3>
      <p>Nav items are simple to add via unordered lists.</p>
762
<pre class="prettyprint linenums">
763
764
765
766
767
768
769
770
&lt;ul class="nav"&gt;
  &lt;li class="active"&gt;
    &lt;a href="#">Home&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
771
772
      <h3>Adding dropdowns</h3>
      <p>Adding dropdowns to the nav is super simple, but does require the use of <a href="./javascript.html/#dropdown">our javascript plugin</a>.</p>
773
774
775
776
777
778
779
<pre class="prettyprint linenums">
&lt;ul class="nav"&gt;
  &lt;li class="dropdown"&gt;
    &lt;a href="#"
          class="dropdown-toggle"
          data-toggle="dropdown">
          Account
780
          &lt;b class="caret"&gt;&lt;/b&gt;
781
782
783
784
785
    &lt;/a&gt;
    &lt;ul class="dropdown-menu"&gt;
      ...
    &lt;/ul&gt;
  &lt;/li&gt;
786
787
&lt;/ul&gt;
</pre>
788
    <p><a class="btn" href="./javascript.html/#dropdown">Get the javascript &rarr;</a></p>
789
    </div>
790
  </div>
791

792
793
794
795
796
797
798
799
800
801
802
</section>



<!-- Breadcrumbs
================================================== -->
<section id="breadcrumbs">
  <div class="page-header">
    <h1>Breadcrumbs <small></small></h1>
  </div>

803
  <div class="row">
804
805
806
807
808
809
    <div class="span6">
      <h3>Why use them</h3>
      <p>Breadcrumb navigation is used as a way to show users where they are within an app or a site, but not for primary navigation. Keep their use sparse and succinct to be most effective.</p>

      <h3>Examples</h3>
      <p>A single example shown as it might be displayed across multiple pages.</p>
810
811
812
813
814
      <ul class="breadcrumb">
        <li class="active">Home</li>
      </ul>
      <ul class="breadcrumb">
        <li><a href="#">Home</a> <span class="divider">/</span></li>
815
        <li class="active">Library</li>
816
817
818
      </ul>
      <ul class="breadcrumb">
        <li><a href="#">Home</a> <span class="divider">/</span></li>
819
820
        <li><a href="#">Library</a> <span class="divider">/</span></li>
        <li class="active">Data</li>
821
      </ul>
822
823
824
825
    </div>
    <div class="span6">
      <h3>Markup</h3>
      <p>HTML is your standard unordered list with links.</p>
826
827
<pre class="prettyprint linenums">
&lt;ul class="breadcrumb"&gt;
828
829
830
831
832
833
834
835
836
  &lt;li&gt;
    &lt;a href="#"&gt;Home&lt;/a&gt; &lt;span class="divider"&gt;/&lt;/span&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href="#"&gt;Library&lt;/a&gt; &lt;span class="divider"&gt;/&lt;/span&gt;
  &lt;/li&gt;
  &lt;li class="active"&gt;
    &lt;a href="#"&gt;Data&lt;/a&gt;
  &lt;/li&gt;
837
838
839
840
841
&lt;/ul&gt;
</pre>
    </div>
  </div>

842
843
844
845
846
847
</section>



<!-- Pagination
================================================== -->
Chris Gunther's avatar
Chris Gunther committed
848
<section id="pagination">
849
  <div class="page-header">
850
    <h1>Pagination <small>Two options for paging through content</small></h1>
851
852
  </div>

853
  <h2>Multi-page pagination</h2>
854
  <div class="row">
855
856
857
858
859
860
861
    <div class="span4">
      <h3>When to use</h3>
      <p>Ultra simplistic and minimally styled pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.</p>
      <h3>Stateful page links</h3>
      <p>Links are customizable and work in a number of circumstances with the right class. <code>.disabled</code> for unclickable links and <code>.active</code> for current page.</p>
      <h3>Flexible alignment</h3>
      <p>Add either of two optional classes to change the alignment of pagination links: <code>.pagination-centered</code> and <code>.pagination-right</code>.</p>
862
    </div>
863
864
865
    <div class="span4">
      <h3>Examples</h3>
      <p>The default pagination component is flexible and works in a number of variations.</p>
866
867
      <div class="pagination">
        <ul>
868
          <li class="disabled"><a href="#">&larr; Prev</a></li>
869
870
871
872
          <li class="active"><a href="#">1</a></li>
          <li><a href="#">2</a></li>
          <li><a href="#">3</a></li>
          <li><a href="#">4</a></li>
873
          <li><a href="#">Next &rarr;</a></li>
874
875
876
877
        </ul>
      </div>
      <div class="pagination">
        <ul>
878
879
880
881
882
883
884
885
886
887
888
889
          <li><a href="#">&larr;</a></li>
          <li><a href="#">10</a></li>
          <li><a href="#">11</a></li>
          <li class="active"><a href="#">12</a></li>
          <li><a href="#">13</a></li>
          <li><a href="#">14</a></li>
          <li><a href="#">&rarr;</a></li>
        </ul>
      </div>
      <div class="pagination">
        <ul>
          <li><a href="#">&larr;</a></li>
890
891
892
893
894
          <li class="active"><a href="#">10</a></li>
          <li><a href="#">11</a></li>
          <li class="disabled"><a href="#"></a></li>
          <li><a href="#">20</a></li>
          <li><a href="#">21</a></li>
895
          <li><a href="#">&rarr;</a></li>
896
897
        </ul>
      </div>
898
      <div class="pagination pagination-centered">
899
        <ul>
900
901
902
903
904
          <li class="active"><a href="#">1</a></li>
          <li><a href="#">2</a></li>
          <li><a href="#">3</a></li>
          <li><a href="#">4</a></li>
          <li><a href="#">5</a></li>
905
906
        </ul>
      </div>
907
908
909
910
    </div>
    <div class="span4">
      <h3>Markup</h3>
      <p>Wrapped in a <code>&lt;div&gt;</code>, pagination is just a <code>&lt;ul&gt;</code>.</p>
911
912
913
<pre class="prettyprint linenums">
&lt;div class="pagination"&gt;
  &lt;ul&gt;
914
915
916
917
    &lt;li&gt;&lt;a href="#"&gt;Prev&lt;/a&gt;&lt;/li>
    &lt;li class="active"&gt;
      &lt;a href="#"&gt;1&lt;/a&gt;
    &lt;/li&gt;
918
919
920
    &lt;li&gt;&lt;a href="#"&gt;2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;3&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;4&lt;/a&gt;&lt;/li&gt;
921
    &lt;li&gt;&lt;a href="#"&gt;Next&lt;/a&gt;&lt;/li>
922
923
924
925
926
927
  &lt;/ul&gt;
&lt;/div&gt;
</pre>
    </div>
  </div><!-- /row -->

928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
  <h2>Pager <small>For quick previous and next links</small></h2>
  <div class="row">
    <div class="span4">
      <h3>About pager</h3>
      <p>The pager component is a set of links for simple pagination implemenations with light markup and even lighter styles. It's great for simple sites like blogs or magazines.</p>
    </div>
    <div class="span4">
      <h3>Default example</h3>
      <p>By default, the pager centers links.</p>
      <ul class="pager">
        <li><a href="#">Previous</a></li>
        <li><a href="#">Next</a></li>
      </ul>
<pre class="prettyprint linenums">
&lt;ul class="pager"&gt;
  &lt;li&gt;
    &lt;a href="#"&gt;Previous&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href="#"&gt;Next&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</pre>
    </div>
    <div class="span4">
      <h3>Aligned links</h3>
      <p>Alternatively, you can align each link to the sides:</p>
      <ul class="pager">
        <li class="previous"><a href="#">&larr; Older</a></li>
        <li class="next"><a href="#">Newer &rarr;</a></li>
      </ul>
<pre class="prettyprint linenums">
&lt;ul class="pager"&gt;
961
  &lt;li class="previous"&gt;
962
963
    &lt;a href="#"&gt;&amp;larr; Older&lt;/a&gt;
  &lt;/li&gt;
964
  &lt;li class="next"&gt;
965
966
967
968
969
970
    &lt;a href="#"&gt;Newer &amp;rarr;&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</pre>
    </div>
  </div><!-- /row -->
971
972
973
974
</section>



Chris Gunther's avatar
Chris Gunther committed
975
<!-- Thumbnails
976
================================================== -->
Chris Gunther's avatar
Chris Gunther committed
977
<section id="thumbnails">
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
  <div class="page-header">
    <h1>Thumbnails <small>Grids of images, videos, text, and more</small></h1>
  </div>

  <div class="row">
    <div class="span6">
      <h2>Default thumbnails</h2>
      <p>By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.</p>
      <ul class="thumbnails">
        <li class="span3">
          <a href="#" class="thumbnail">
            <img src="http://placehold.it/210x150" alt="">
          </a>
        </li>
        <li class="span3">
          <a href="#" class="thumbnail">
            <img src="http://placehold.it/210x150" alt="">
          </a>
        </li>
        <li class="span3">
          <a href="#" class="thumbnail">
            <img src="http://placehold.it/210x150" alt="">
          </a>
For faster browsing, not all history is shown. View entire blame