├── .gitignore ├── images ├── bootstrap.png ├── bootstrap-forms.png ├── bootstrap-input.png ├── bootstrap-modal.png ├── bootstrap-range.png ├── bootstrap-switch.png ├── bootstrap-tabs.png ├── bootstrap-buttons.png ├── bootstrap-dropdown.png ├── bootstrap-forms-2.png ├── bootstrap-material.png ├── bootstrap-textarea.png ├── bootstrap-fileinput.png └── bootstrap-inputgroup.png ├── badges ├── styles.css └── index.htm ├── cards ├── styles.css └── index.htm ├── utilities-colors ├── styles.css └── index.htm ├── alert ├── styles.css └── index.htm ├── modal ├── styles.css ├── index.js └── index.htm ├── forms ├── styles.css └── index.js ├── dropdown ├── styles.css └── index.htm ├── inputs ├── styles.css └── index.htm ├── button ├── styles.css └── index.htm ├── utilities-display ├── styles.css └── index.htm ├── utilities-flex ├── styles.css └── index.htm ├── utilities-shadows ├── styles.css └── index.htm ├── utilities-tables ├── styles.css └── index.htm ├── utilities-valign ├── styles.css └── index.htm ├── utilities-typography ├── styles.css └── index.htm ├── utilities-spacing-and-text ├── styles.css └── index.htm ├── utilities-border ├── styles.css └── index.htm ├── utilities-close ├── styles.css └── index.htm ├── bower.json ├── tabs ├── index.js ├── styles.css └── index.htm ├── package.json ├── example ├── index.js └── styles.css ├── inputgroup ├── styles.css └── index.htm ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /package-lock.json -------------------------------------------------------------------------------- /images/bootstrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap.png -------------------------------------------------------------------------------- /images/bootstrap-forms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-forms.png -------------------------------------------------------------------------------- /images/bootstrap-input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-input.png -------------------------------------------------------------------------------- /images/bootstrap-modal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-modal.png -------------------------------------------------------------------------------- /images/bootstrap-range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-range.png -------------------------------------------------------------------------------- /images/bootstrap-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-switch.png -------------------------------------------------------------------------------- /images/bootstrap-tabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-tabs.png -------------------------------------------------------------------------------- /images/bootstrap-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-buttons.png -------------------------------------------------------------------------------- /images/bootstrap-dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-dropdown.png -------------------------------------------------------------------------------- /images/bootstrap-forms-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-forms-2.png -------------------------------------------------------------------------------- /images/bootstrap-material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-material.png -------------------------------------------------------------------------------- /images/bootstrap-textarea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-textarea.png -------------------------------------------------------------------------------- /images/bootstrap-fileinput.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-fileinput.png -------------------------------------------------------------------------------- /images/bootstrap-inputgroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HTMLElements/smart-bootstrap/HEAD/images/bootstrap-inputgroup.png -------------------------------------------------------------------------------- /badges/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | margin: 1rem; 8 | padding: 1rem; 9 | } 10 | 11 | span, a { 12 | margin-left: 0.5rem; 13 | } -------------------------------------------------------------------------------- /cards/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | margin: 1rem; 8 | padding: 1rem; 9 | } 10 | 11 | span, a { 12 | margin-left: 0.5rem; 13 | } -------------------------------------------------------------------------------- /utilities-colors/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | 10 | span, a { 11 | margin-left: 0.5rem; 12 | } 13 | 14 | p { 15 | display: block; 16 | } -------------------------------------------------------------------------------- /alert/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | margin: 10px; 8 | } 9 | 10 | bootstrap-button, bootstrap-check, bootstrap-toggle-button, bootstrap-radio { 11 | margin-left: 10px; 12 | } 13 | -------------------------------------------------------------------------------- /modal/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | margin: 10px; 8 | } 9 | 10 | bootstrap-button, bootstrap-check, bootstrap-toggle-button, bootstrap-radio { 11 | margin-left: 10px; 12 | } 13 | -------------------------------------------------------------------------------- /forms/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 1rem; 3 | } 4 | 5 | .group { 6 | position: relative; 7 | padding: 1rem; 8 | border: solid #f8f9fa; 9 | margin-top: 1rem; 10 | } 11 | 12 | .group > input, 13 | .group > select { 14 | margin-top: 1rem; 15 | } -------------------------------------------------------------------------------- /dropdown/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group{ 6 | display: flex; 7 | margin: 10px; 8 | } 9 | 10 | bootstrap-button, bootstrap-check, bootstrap-toggle-button, bootstrap-radio, bootstrap-drop-down, bootstrap-split-button { 11 | margin-left: 10px; 12 | } 13 | -------------------------------------------------------------------------------- /inputs/styles.css: -------------------------------------------------------------------------------- 1 | /* --- Bootstrap Element styles --- */ 2 | body { 3 | padding: 1rem; 4 | } 5 | 6 | .group { 7 | position: relative; 8 | padding: 1rem; 9 | border: solid #f8f9fa; 10 | margin-top: 1rem; 11 | } 12 | 13 | 14 | bootstrap-input, 15 | bootstrap-textarea { 16 | width: 300px; 17 | } -------------------------------------------------------------------------------- /button/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | margin: 10px; 8 | padding: 1rem; 9 | } 10 | 11 | bootstrap-button, bootstrap-check, bootstrap-toggle-button, bootstrap-radio { 12 | margin-left: 10px; 13 | } 14 | 15 | .button-group-vertical bootstrap-button { 16 | margin-left: 0px; 17 | } -------------------------------------------------------------------------------- /utilities-display/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | h2 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | .highlight { 14 | background-color: rgba(86,61,124,.15); 15 | border: 1px solid rgba(86,61,124,.15); 16 | } 17 | 18 | span, a { 19 | margin-left: 0.5rem; 20 | } 21 | 22 | p { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /utilities-flex/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | h2 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | .highlight { 14 | background-color: rgba(86,61,124,.15); 15 | border: 1px solid rgba(86,61,124,.15); 16 | } 17 | 18 | span, a { 19 | margin-left: 0.5rem; 20 | } 21 | 22 | p { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /utilities-shadows/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | h2 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | .highlight { 14 | background-color: rgba(86,61,124,.15); 15 | border: 1px solid rgba(86,61,124,.15); 16 | } 17 | 18 | span, a { 19 | margin-left: 0.5rem; 20 | } 21 | 22 | p { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /utilities-tables/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | h2 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | .highlight { 14 | background-color: rgba(86,61,124,.15); 15 | border: 1px solid rgba(86,61,124,.15); 16 | } 17 | 18 | span, a { 19 | margin-left: 0.5rem; 20 | } 21 | 22 | p { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /utilities-valign/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | h2 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | .highlight { 14 | background-color: rgba(86,61,124,.15); 15 | border: 1px solid rgba(86,61,124,.15); 16 | } 17 | 18 | span, a { 19 | margin-left: 0.5rem; 20 | } 21 | 22 | p { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /utilities-typography/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | h2 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | .highlight { 14 | background-color: rgba(86,61,124,.15); 15 | border: 1px solid rgba(86,61,124,.15); 16 | } 17 | 18 | span, a { 19 | margin-left: 0.5rem; 20 | } 21 | 22 | p { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /utilities-spacing-and-text/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | margin: 1rem; 7 | padding: 1rem; 8 | } 9 | h2 { 10 | padding-top: 1rem; 11 | padding-bottom: 1rem; 12 | } 13 | .highlight { 14 | background-color: rgba(86,61,124,.15); 15 | border: 1px solid rgba(86,61,124,.15); 16 | } 17 | 18 | span, a { 19 | margin-left: 0.5rem; 20 | } 21 | 22 | p { 23 | display: block; 24 | } 25 | -------------------------------------------------------------------------------- /utilities-border/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | margin: 1rem; 8 | padding: 1rem; 9 | } 10 | 11 | span, a { 12 | margin-left: 0.5rem; 13 | } 14 | 15 | [class^="border"] { 16 | display: inline-block; 17 | width: 5rem; 18 | height: 5rem; 19 | margin: .25rem; 20 | background-color: #f5f5f5; 21 | } 22 | 23 | .bd-example-border-utils-0 { 24 | [class^="border"] { 25 | border: 1px solid $border-color; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /utilities-close/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 10px; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | margin: 1rem; 8 | padding: 1rem; 9 | } 10 | 11 | span, a { 12 | margin-left: 0.5rem; 13 | } 14 | 15 | [class^="border"] { 16 | display: inline-block; 17 | width: 5rem; 18 | height: 5rem; 19 | margin: .25rem; 20 | background-color: #f5f5f5; 21 | } 22 | 23 | .bd-example-border-utils-0 { 24 | [class^="border"] { 25 | border: 1px solid $border-color; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "smart-bootstrap", 3 | "authors": [ 4 | "jQWidgets Ltd" 5 | ], 6 | "description": "Material Design Boostrap Web Components by Smart HTML Elements | FREE", 7 | "license": "Apache-2.0", 8 | "keywords": [ 9 | "bootstrap web components", 10 | "boostrap custom elements", 11 | "html bootstrap", 12 | "javascript bootstrap", 13 | "bootstrap custom element", 14 | "bootstrap user interface", 15 | "bootstrap modal", 16 | "material bootstrap", 17 | "bootstrap tabs", 18 | "bootstrap" 19 | ], 20 | "main": "", 21 | "ignore": [ 22 | "**/.*", 23 | "**/node_modules", 24 | "**/bower_components", 25 | "**/tests" 26 | ], 27 | "dependencies": { 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /forms/index.js: -------------------------------------------------------------------------------- 1 | function customDropDownPositioning(dropDown) { 2 | if (this.label === 'Left-aligned but right aligned when large screen') { 3 | dropDown.classList.add('dropdown-menu-lg-right'); 4 | } 5 | else if (this.label === 'Right-aligned but left aligned when large screen') { 6 | dropDown.classList.add('dropdown-menu-right'); 7 | dropDown.classList.add('dropdown-menu-lg-left'); 8 | } 9 | } 10 | 11 | window.onload = function () { 12 | document.addEventListener('click', function () { 13 | const target = event.target, 14 | isButton = event.target.closest('button'); 15 | 16 | if (isButton && isButton.getAttribute('data-toggle') === 'modal') { 17 | const modal = document.querySelector(isButton.getAttribute('data-target')), 18 | data = isButton.getAttribute('data-whatever'); 19 | 20 | if (data) { 21 | const modalInput = modal.querySelector('.modal-body input'); 22 | 23 | if (modalInput) { 24 | modalInput.value = data; 25 | } 26 | } 27 | 28 | if (modal) { 29 | modal.toggle(); 30 | } 31 | } 32 | }); 33 | 34 | const modal = document.querySelector('#exampleModal'); 35 | 36 | 37 | } -------------------------------------------------------------------------------- /tabs/index.js: -------------------------------------------------------------------------------- 1 | function customDropDownPositioning(dropDown) { 2 | if (this.label === 'Left-aligned but right aligned when large screen') { 3 | dropDown.classList.add('dropdown-menu-lg-right'); 4 | } 5 | else if (this.label === 'Right-aligned but left aligned when large screen') { 6 | dropDown.classList.add('dropdown-menu-right'); 7 | dropDown.classList.add('dropdown-menu-lg-left'); 8 | } 9 | } 10 | 11 | window.onload = function () { 12 | document.addEventListener('click', function () { 13 | const target = event.target, 14 | isButton = event.target.closest('button'); 15 | 16 | if (isButton && isButton.getAttribute('data-toggle') === 'modal') { 17 | const modal = document.querySelector(isButton.getAttribute('data-target')), 18 | data = isButton.getAttribute('data-whatever'); 19 | 20 | if (data) { 21 | const modalInput = modal.querySelector('.modal-body input'); 22 | 23 | if (modalInput) { 24 | modalInput.value = data; 25 | } 26 | } 27 | 28 | if (modal) { 29 | modal.toggle(); 30 | } 31 | } 32 | }); 33 | 34 | const modal = document.querySelector('#exampleModal'); 35 | 36 | 37 | } -------------------------------------------------------------------------------- /utilities-close/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |CSS for Close Icon
22 |CSS for Shadows
22 |CSS for Vertical Align
22 || baseline | 36 |top | 37 |middle | 38 |bottom | 39 |text-top | 40 |text-bottom | 41 |
CSS for Display and Visibility
22 | Display utility classes that apply to all breakpoints, from xs to xl, have no breakpoint abbreviation in them. This is because those classes are applied from min-width: 0; and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation. 23 | 24 | As such, the classes are named using the format: 25 |noneinlineinline-blockblocktabletable-celltable-rowflexinline-flexCSS for Badges
22 | 23 |CSS for Border. Use border utilities to add or remove an element’s borders. Choose from all borders or one at a time. 22 |
23 |CSS for Cards
22 |Some quick example text to build on the card title and make up the bulk of the card's content.
28 | Card link 29 | Another link 30 |With supporting text below as a natural lead-in to additional content.
42 | Go there 43 |With supporting text below as a natural lead-in to additional content.
52 | Go somewhere 53 |With supporting text below as a natural lead-in to additional content.
61 | Go somewhere 62 |With supporting text below as a natural lead-in to additional content.
70 | Go somewhere 71 |CSS for Colors
22 |.text-primary
25 |.text-secondary
26 |.text-success
27 |.text-danger
28 |.text-warning
29 |.text-info
30 |.text-light
31 |.text-dark
32 |.text-body
33 |.text-muted
34 |.text-white
35 |.text-black-50
36 |.text-white-50
37 |Contextual text classes also work well on anchors with the provided hover and focus states. Note that the .text-white and .text-muted class has no additional link styling beyond underline.
39 |Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilities do not set color, so in some cases you’ll want to use .text-* utilities.
53 |CSS for alert messages
22 | 23 |Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
76 |Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
78 |CSS for Typography
22 | Display utility classes that apply to all breakpoints, from xs to xl, have no breakpoint abbreviation in them. This is because those classes are applied from min-width: 0; and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation. 23 || Heading | 27 |Example | 28 |
|---|---|
|
33 |
|
36 | h1. Bootstrap heading | 37 |
|
40 |
|
43 | h2. Bootstrap heading | 44 |
|
47 |
|
50 | h3. Bootstrap heading | 51 |
|
54 |
|
57 | h4. Bootstrap heading | 58 |
|
61 |
|
64 | h5. Bootstrap heading | 65 |
|
68 |
|
71 | h6. Bootstrap heading | 72 |
h1. Bootstrap heading
76 |h2. Bootstrap heading
77 |h3. Bootstrap heading
78 |h4. Bootstrap heading
79 |h5. Bootstrap heading
80 |h6. Bootstrap heading
81 |Make a paragraph stand out by adding .lead.
88 |89 | Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus. 90 |
91 |You can use the mark tag to highlight text.
93 |This line of text is meant to be treated as deleted text.
This line of text is meant to be treated as no longer accurate.
This line of text is meant to be treated as an addition to the document.
96 |This line of text will render as underlined
97 |This line of text is meant to be treated as fine print.
98 |This line rendered as bold text.
99 |This line rendered as italicized text.
100 | 101 | 102 | -------------------------------------------------------------------------------- /utilities-spacing-and-text/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |CSS for Spacing
22 | Bootstrap includes a wide range of shorthand responsive margin and padding utility classes to modify an element’s appearance. 23 |Spacing utilities that apply to all breakpoints, from xs to xl, have no breakpoint abbreviation in them. This is because those classes are applied from min-width: 0 and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.
The classes are named using the format {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.
Where property is one of:
30 | 31 |m - for classes that set marginp - for classes that set paddingWhere sides is one of:
37 | 38 |t - for classes that set margin-top or padding-topb - for classes that set margin-bottom or padding-bottoml - for classes that set margin-left or padding-leftr - for classes that set margin-right or padding-rightx - for classes that set both *-left and *-righty - for classes that set both *-top and *-bottommargin or padding on all 4 sides of the elementWhere size is one of:
49 | 50 |0 - for classes that eliminate the margin or padding by setting it to 01 - (by default) for classes that set the margin or padding to .252 - (by default) for classes that set the margin or padding to .53 - (by default) for classes that set the margin or padding to 14 - (by default) for classes that set the margin or padding to 1.55 - (by default) for classes that set the margin or padding to 3auto - for classes that set the margin to auto.text-left - Left aligned text on all viewport sizes.
61 |.text-center - Center aligned text on all viewport sizes.
62 |.text-right - Right aligned text on all viewport sizes.
63 | 64 |.text-sm-left - Left aligned text on viewports sized SM (small) or wider.
65 |.text-md-left - Left aligned text on viewports sized MD (medium) or wider.
66 |.text-lg-left - Left aligned text on viewports sized LG (large) or wider.
67 |.text-xl-left - Left aligned text on viewports sized XL (extra-large) or wider.
68 |.text-monospace - This is in monospace
72 | 73 | 74 | -------------------------------------------------------------------------------- /utilities-tables/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |CSS for Tables
22 |Due to the widespread use of tables across third-party widgets like calendars and date pickers, we’ve designed our tables to be opt-in. Just add the base class .table to any
| # | 28 |First | 29 |Last | 30 |Handle | 31 |
|---|---|---|---|
| 1 | 36 |Mark | 37 |Otto | 38 |@mdo | 39 |
| 2 | 42 |Jacob | 43 |Thornton | 44 |@fat | 45 |
| 3 | 48 |Larry | 49 |the Bird | 50 |
| # | 59 |First | 60 |Last | 61 |Handle | 62 |
|---|---|---|---|
| 1 | 67 |Mark | 68 |Otto | 69 |@mdo | 70 |
| 2 | 73 |Jacob | 74 |Thornton | 75 |@fat | 76 |
| 3 | 79 |Larry | 80 |the Bird | 81 |
| # | 91 |First | 92 |Last | 93 |Handle | 94 |
|---|---|---|---|
| 1 | 99 |Mark | 100 |Otto | 101 |@mdo | 102 |
| 2 | 105 |Jacob | 106 |Thornton | 107 |@fat | 108 |
| 3 | 111 |Larry | 112 |the Bird | 113 |
| # | 122 |First | 123 |Last | 124 |Handle | 125 |
|---|---|---|---|
| 1 | 130 |Mark | 131 |Otto | 132 |@mdo | 133 |
| 2 | 136 |Jacob | 137 |Thornton | 138 |@fat | 139 |
| 3 | 142 |Larry | 143 |the Bird | 144 |
| # | 154 |First | 155 |Last | 156 |Handle | 157 |
|---|---|---|---|
| 1 | 162 |Mark | 163 |Otto | 164 |@mdo | 165 |
| 2 | 168 |Jacob | 169 |Thornton | 170 |@fat | 171 |
| 3 | 174 |Larry | 175 |the Bird | 176 |
| # | 184 |First | 185 |Last | 186 |Handle | 187 |
|---|---|---|---|
| 1 | 192 |Mark | 193 |Otto | 194 |@mdo | 195 |
| 2 | 198 |Jacob | 199 |Thornton | 200 |@fat | 201 |
| 3 | 204 |Larry | 205 |the Bird | 206 |
| # | 218 |First | 219 |Last | 220 |Handle | 221 |
|---|---|---|---|
| 1 | 226 |Mark | 227 |Otto | 228 |@mdo | 229 |
| 2 | 232 |Jacob | 233 |Thornton | 234 |@fat | 235 |
| 3 | 238 |Larry the Bird | 239 |||
Use Material Bootstrap inputs to replace the standard text inputs. The component is available in Bootstrap and Material styles and supports different rendering modes.
22 | 23 |25 | The Input elements below are created with the "bootstrap-input" tag. The "style-mode" property of each input is set to "primary", "success", "info", "warning" or "danger". 26 |
27 |46 | The Textarea elements below are created with the "bootstrap-textarea" tag. The "style-mode" property of each input is set to "primary", "success", "info", "warning" or "danger". 47 |
48 |68 | The Input elements below are created with the "bootstrap-input" tag. By default, they are outlined. The "style-mode" property of each input is set to "primary", "success", "info", "warning" or "danger". 69 |
70 |89 | The Textarea elements below are created with the "bootstrap-textarea" tag. The "style-mode" property of each input is set to "primary", "success", "info", "warning" or "danger". 90 |
91 |111 | The Input elements below are created with the "bootstrap-input" tag. The "style-mode" property of each input is set to "primary", "success", "info", "warning" or "danger". 112 |
113 |132 | The Textarea elements below have "outlined" attribute. 133 |
134 |154 | The Input elements below have "filled" attribute. 155 |
156 |175 | The Textarea elements below are created with the "bootstrap-textarea" tag. The "style-mode" property of each input is set to "primary", "success", "info", "warning" or "danger". 176 |
177 |Modal body text goes here.
151 |Use Material Bootstrap custom button styles for actions in forms, dialogs, and more with support for multiple 22 | sizes, states, and more.
23 | 24 |Material Bootstrap includes several predefined button styles, each serving its own semantic purpose, with a 27 | few extras thrown in for more control.
28 |41 | StyleMode property allows the user to change the style of the elements. 42 |
43 | 44 |46 | In need of a button, but not the hefty background colors they bring? Just add the class 47 | outlined to remove all background images and colors on any button. 48 |
49 |63 | Setting the outlined property the elements turn into outlined buttons with no filling untill 64 | hovered. 65 |
66 | 67 |69 | Fancy larger or smaller buttons? Just set the sizeMode property to 'sm' or 'lg' for 70 | additional sizes. 71 |
72 |83 | Buttons can be reset back to normal if SizeMode is set to an empty string. 84 |
85 | 86 |93 | To disable/enable an element just set the disabled property. 94 |
95 | 96 |98 | Checkboxes are buttons that can be toggled. The checked state of these buttons can be updated via 99 | click or by setting the checked property to true. 100 | Checkboxes like the other toggle buttons can be pre-checked. 101 |
102 |108 | Appling/Removing the checked attribute will toggle the state of the button. 109 |
110 | 111 |119 | Add the checked attribute to toggle a button’s active state. If you’re pre-toggling a button, 120 | you must manually add the checked attribute to the button. 121 |
122 | 123 |132 | Radio buttons are group elements that allow only one of them to be checked. Similar to the other 133 | toggle elements to set a button into checked state the property checked has to be applied to 134 | the element. 135 | All elements that have the same group property are considered to be in the same group. 136 | group can be set on initialization. 137 |
138 | 139 |CSS for Flex
22 |Set the direction of flex items in a flex container with direction utilities. In most cases you can omit the horizontal class here as the browser default is row. However, you may encounter situations where you needed to explicitly set this value (like responsive layouts). 29 |
30 |Change the visual order of specific flex items with a handful of order utilities. We only provide options for making an item first or last, as well as a reset to use the DOM order. As order takes any integer value (e.g., 5), add custom CSS for any additional values needed. 149 |
150 |Easily extend form controls by adding text, buttons, or button groups on either side of textual 22 | inputs, custom selects, and custom file inputs.
23 | 24 | 25 |27 | Place one add-on or button on either side of an input. You may also place one on both sides of an 28 | input. Remember to place <label>s outside the input group. 29 |
30 | 31 |60 | Input groups wrap by default via flex-wrap: wrap in order to accommodate custom form field 61 | validation within an input group. You may disable this with the noWrap property. 62 |
63 | 64 |74 | Add the sizeMode property in order to change the size of the input group. 75 |
76 | 77 |92 | Place any checkbox or radio option within an input group’s addon instead of text. 93 |
94 | 95 |111 | While multiple <input>s are supported visually, validation styles are only available for input 112 | groups with a single <input>. 113 |
114 | 115 |126 | Multiple add-ons are supported and can be mixed with checkbox and radio input elements. 127 |
128 | 129 |147 | Input groups with Material Bootstrap Button as addons. 148 |
149 | 150 |175 | Input groups with Material Bootstrap Dropdowns that contains Material Bootstrap buttons as addons. 176 |
177 | 178 |204 | Input groups with Material Bootstrap Split Buttons that contains Material Bootstrap buttons as addons. 205 |
206 | 207 |232 | Input groups with a select insted of input. 233 |
234 | 235 |277 | Input groups with a file upload. 278 |
279 | 280 |22 | Dropdowns are toggleable, contextual overlays for displaying lists of links and more. 23 | They’re toggled by clicking, not by hovering; this is an intentional design decision. 24 | Dropdowns are built using the Smart Framework's DropDownPositioning API, which provides 25 | dynamic positioning and viewport detection. 26 | No additional references are required since the API is part of the base class 27 | smart.element.js. 28 |
29 | 30 |31 | Smart.Core’s dropdowns are designed to be generic and applicable to a variety of situations and 32 | markup structures. 33 | For instance, it is possible to create dropdowns that contain additional inputs and form controls, 34 | such as search fields or login forms. 35 | However, Material Bootstrap does add built-in support for most standard keyboard menu interactions, such as 36 | the ability to move through individual .dropdown-item elements using the cursor keys and close the 37 | menu with the ESC key. 38 |
39 | 40 |41 | In order for a DropDown item to visually appear as an item it is neccessary to add the class 42 | .dropdown-item. 43 |
44 |54 | label property is used to set the label of the drop down button. 55 |
56 |105 | style-mode attribute determines the style of the DropDown. 106 |
107 |110 | Similarly, create split button dropdowns with virtually the same markup as single button dropdowns 111 |
112 |Button dropdowns work with buttons of all sizes, including default and split dropdown buttons.
172 |206 | Similar to the other buttons the size-mode attribute determines the size of the component. 207 |
208 |Trigger dropdown menus above elements by adding changing the drop-down-position attribute to 213 | 'top' to the parent element.
214 |Trigger dropdown menus at the right of the elements by adding changing the drop-down-position 238 | property to 239 | 'right' to the parent element.
240 |Trigger dropdown menus at the left of the elements by adding changing the drop-down-position 264 | property to 265 | 'left' to the parent element.
266 |Optionally you can use <button> elements in your dropdowns instead of just <a>'s.
290 | 291 |If you want to use custom positioning instead of the dynamic, create a callback and pass it to the 302 | customDropDownPositionCallback property.
303 |To align right the dropdown menu with the given breakpoint or larger, add 305 | .dropdown-menu{-sm|-md|-lg|-xl}-right to the drop down.
306 |To align left the dropdown menu with the given breakpoint or larger, add .dropdown-menu-right and 317 | .dropdown-menu{-sm|-md|-lg|-xl}-left to the drop down.
318 |Use Smart's Material Bootstrap JavaScript modal to add dialogs to your site for lightboxes, user 22 | notifications, or completely custom content.
23 | 24 |Before getting started with Smart.Core’s modal component, be sure to read the following as our menu 26 | options have recently changed.
27 |57 | Below is a static modal example (meaning its position and display have been overridden). Included 58 | are the modal header, modal body (required for padding), and modal footer (optional). We ask that 59 | you include modal headers with dismiss actions whenever possible, or provide another explicit 60 | dismiss action. 61 |
62 | 63 |Modal body text goes here.
73 |85 | Toggle a working modal demo by clicking the button below. It will slide down and fade in from the 86 | top of the page. 87 |
88 | 89 |Modal body text goes here.
98 |114 | When modals become too long for the user’s viewport or device, they scroll independent of the page 115 | itself. By default all modals are with auto height. 116 |
117 | 118 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 127 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
128 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 129 | vel augue laoreet rutrum faucibus dolor auctor.
130 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 131 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 132 |
133 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 134 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
135 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 136 | vel augue laoreet rutrum faucibus dolor auctor.
137 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 138 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 139 |
140 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 141 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
142 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 143 | vel augue laoreet rutrum faucibus dolor auctor.
144 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 145 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 146 |
147 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 148 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
149 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 150 | vel augue laoreet rutrum faucibus dolor auctor.
151 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 152 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 153 |
154 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 155 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
156 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 157 | vel augue laoreet rutrum faucibus dolor auctor.
158 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 159 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 160 |
161 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 162 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
163 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 164 | vel augue laoreet rutrum faucibus dolor auctor.
165 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 166 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 167 |
168 |182 | You can also create a scrollable modal that allows scroll the modal body by setting the 183 | scrollable property: 184 |
185 | 186 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 195 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
196 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 197 | vel augue laoreet rutrum faucibus dolor auctor.
198 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 199 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 200 |
201 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 202 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
203 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 204 | vel augue laoreet rutrum faucibus dolor auctor.
205 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 206 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 207 |
208 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 209 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
210 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 211 | vel augue laoreet rutrum faucibus dolor auctor.
212 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 213 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 214 |
215 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 216 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
217 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 218 | vel augue laoreet rutrum faucibus dolor auctor.
219 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 220 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 221 |
222 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 223 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
224 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 225 | vel augue laoreet rutrum faucibus dolor auctor.
226 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 227 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 228 |
229 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 230 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
231 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 232 | vel augue laoreet rutrum faucibus dolor auctor.
233 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 234 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 235 |
236 |253 | Add the centered property to vertically center the modal. 254 |
255 | 256 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 265 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
266 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 281 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
282 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 283 | vel augue laoreet rutrum faucibus dolor auctor.
284 |Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque 285 | nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 286 |
287 |Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, 288 | egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
289 |Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus 290 | vel augue laoreet rutrum faucibus dolor auctor.
291 |310 | Have a bunch of buttons that all trigger the same modal with slightly different contents? 311 | Below is a live demo followed by example HTML and JavaScript. For more information, read the modal 312 | events docs for details on relatedTarget. 313 |
314 |315 | Have a bunch of buttons that all trigger the same modal with slightly different contents? 316 | Below is a live demo followed by example HTML and JavaScript. For more information, read the modal 317 | events docs for details on relatedTarget. 318 |
319 | 320 |355 | Changing the content of the input inside the modal is simple as that: 356 |
357 | 358 |
360 | window.onload = function () {
361 | document.addEventListener('click', function () {
362 | const target = event.target,
363 | isButton = event.target.closest('bootstrap-button');
364 |
365 | if (isButton && isButton.getAttribute('data-toggle') === 'modal') {
366 | const modal = document.querySelector(isButton.getAttribute('data-target')),
367 | data = isButton.getAttribute('data-whatever');
368 |
369 | if (data) {
370 | const modalInput = modal.querySelector('.modal-body input');
371 |
372 | if (modalInput) {
373 | modalInput.value = data;
374 | }
375 | }
376 |
377 | if (modal) {
378 | modal.toggle();
379 | }
380 | }
381 | });
382 | 386 | Animation is purely made via CSS. The default animation depends on the CSS class fade. 387 | Removing that class will disable it. 388 |
389 | 390 |
392 | <bootstrap-modal> Empty Modal with no Animation </bootstrap-modal>
393 |
394 | Modals have three optional sizes, available via modifier classes to be placed on a Modal 399 | These sizes kick in at certain breakpoints to avoid horizontal scrollbars on narrower viewports.
400 | 401 || Size | 405 |Class | 406 |Modal max-width | 407 |
|---|---|---|
| Small | 412 |.modal-sm |
413 | 300px |
414 |
| Default | 417 |None | 418 |500px |
419 |
| Large | 422 |.modal-lg |
423 | 800px |
424 |
| Extra large | 427 |.modal-xl |
428 | 1140px |
429 |
Modals have three optional sizes, available via modifier classes to be placed on a Modal 442 | These sizes kick in at certain breakpoints to avoid horizontal scrollbars on narrower viewports.
443 | 444 | 445 |459 | The modal plugin toggles your hidden content on demand. It also 460 | adds .modal-open to the <body> to override default scrolling behavior and generates a 461 | .modal-backdrop to provide a click area for dismissing shown modals when clicking outside the modal. 462 |
463 | 464 |The following properties are available:
466 | 467 || Name | 471 |Type | 472 |Default | 473 |Description | 474 |
|---|---|---|---|
| backdrop | 479 |string | 480 |true | 481 |Includes a modal-backdrop element. Alternatively, specify static for a
482 | backdrop which doesn't close the modal on click or 'none' if you don't want to have a
483 | .modal-backdrop element. |
484 |
| focus | 487 |boolean | 488 |true | 489 |Puts the modal in focus if true. | 490 |
| keyboard | 493 |boolean | 494 |true | 495 |Closes the modal when escape key is pressed | 496 |
| opened | 499 |boolean | 500 |false | 501 |Shows the modal when initialized. | 502 |
| centered | 505 |boolean | 506 |false | 507 |Determines if the Modal is center or not. | 508 |
| scrollable | 511 |boolean | 512 |false | 513 |Determines if the Modal's body is scrollable or not. | 514 |
| sizeMode | 517 |string | 518 |'' | 519 |Determines the size of the modal. Possible values are: 'xl', 'lg', 'sm', ''. Empty 520 | string is the default size ( medium ). | 521 |
Proeprties can be set as attributes on the Tag of the HTML element or during the window.onload stage 526 | via Javascript.
527 | 528 |Manually toggles the modal. If the modal is opened this method will close it and vice versa.
532 |document.querySelector('bootstra-modal').toggle()
534 | Manually opens the modal.
538 |document.querySelector('bootstra-modal').show()
540 | Manually opens the modal.
544 |document.querySelector('bootstra-modal').hide()
546 | Manually readjust the modal’s position if the height of a modal changes while it is open (i.e. in 550 | case a scrollbar appears).
551 |document.querySelector('bootstra-modal').handleUpdate()
553 | Removes the element from the DOM.
557 |document.querySelector('bootstra-modal').dispose()
559 | Smart's "bootstrap-modal" class exposes a few events for hooking into modal functionality. All modal 564 | events 565 | are fired at the modal itself (i.e. at the <bootstrap-modal>)
566 | 567 || Event Type | 571 |Description | 572 |
|---|---|
| show | 577 |This event fires immediately when the show instance method is called. |
578 |
| shown | 581 |This event is fired when the modal has been made visible to the user (will wait for CSS 582 | transitions to complete). | 583 |
| hide | 586 |This event is fired immediately when the hide instance method has been
587 | called. |
588 |
| hidden | 591 |This event is fired when the modal has finished being hidden from the user (will wait 592 | for CSS transitions to complete). | 593 |
There are three types of Tab controls : nav, tab and pills. The tabType property determines 23 | the type. By default it's set to 'tabs'.
24 | 25 |28 | Navigation available in Smart.Core share general markup and styles, from the base .nav class to the 29 | active and disabled states. Swap modifier classes to switch between each style. 30 |
31 | 32 |33 | Navigation available in Smart.Core share general markup and styles, from the base .nav class to the 34 | active and disabled states. Swap modifier classes to switch between each style. 35 |
36 | 37 | 45 | 46 | 47 |50 | Change the horizontal alignment of your nav with flexbox utilities. By default, navs are 51 | left-aligned, but you can easily change them to center or right aligned via the align 52 | property. 53 |
54 | 55 |Centered with align="center"
56 | 57 | 65 | 66 | 67 |Right-aligned with align="end"
68 | 69 | 77 | 78 | 79 |Vertical-aligned with align="vertical"
80 | 81 | 89 | 90 | 91 |Vertical-aligned works with listType="nav" as well:
92 | 93 | 101 | 102 | 103 |Here's the default appearance of the Smart's core Tabs control. Setting the tabType 106 | property to 'tabs' will also change the the element to it's default state.
107 | 108 | 116 | 117 | 118 | 119 |Pills is the third appearance of the Tab control. Changing the tabType property to 'pills' in 122 | order to change the appearance of the element.
123 | 124 | 132 | 133 | 134 |137 | Force your Tab contents to extend the full available width one of two modifier classes. To 138 | proportionately fill all available space with your .nav-items, set the fill property. Notice 139 | that all 140 | horizontal space is occupied, but not every nav item has the same width. 141 |
142 | 143 |155 | For equal-width elements, set the justified property. All horizontal space will be occupied 156 | by nav links, 157 | but unlike the fill above, every nav item will be the same width. 158 |
159 | 160 |173 | If you’re using navs to provide a navigation bar, be sure to add a role="navigation" to the element. 174 | 175 | Note that navigation bars, even if visually styled as tabs with the tabType="tabs" property, 176 | should not be given role="tablist", role="tab" or role="tabpanel" attributes. These are 177 | only appropriate for dynamic tabbed interfaces, as described in the WAI ARIA Authoring 178 | Practices. See JavaScript behavior for dynamic tabbed interfaces in this section for an 179 | example. 180 |
181 | 182 |185 | Tabs with dropdowns 186 |
187 | 188 |205 | Pills with dropdowns 206 |
207 | 208 |227 | Dynamic tabbed interfaces, as described in the WAI ARIA Authoring Practices, require role="tablist", 228 | role="tab", role="tabpanel", and additional aria- attributes in order to convey their structure, 229 | functionality and current state to users of assistive technologies (such as screen readers). 230 | 231 | Note that dynamic tabbed interfaces should not contain dropdown menus, as this causes both usability 232 | and accessibility issues. From a usability perspective, the fact that the currently displayed tab’s 233 | trigger element is not immediately visible (as it’s inside the closed dropdown menu) can cause 234 | confusion. From an accessibility point of view, there is currently no sensible way to map this sort 235 | of construct to a standard WAI ARIA pattern, meaning that it cannot be easily made understandable to 236 | users of assistive technologies. 237 |
238 | 239 |Dynamic Tabs also works with pills:
282 | 283 |