Bootstrap – Album demo ”; Previous Next What is album? Album is a simple one-page template that focuses on creating album-related components or layouts. These components might include photo galleries, sliders, or other elements commonly used in displaying albums or collections of images. The provided link shows an example of how to create an album: Example Description Download link Album This example shows an album website template with a card that has an image, navbar, title, description, button, and footer. Download Print Page Previous Next Advertisements ”;
Category: bootstrap
Bootstrap – List groups Demo
Bootstrap – List groups demo ”; Previous Next What is a list group? List group is a versatile component that allows you to display a list of items in a well-organized and visually appealing manner. List group is often used to present a collection of related content, such as a set of articles, comments, or user profiles. The Bootstrap provides a set of classes that can be used to add and customize the list groups: class description .list-group Applied to the <ul> element to create a list group container .list-group-item Applied to the <li> elements to style them as list group items .list-group-item-action This class makes list group items appear interactive and responsive to user interactions .active This class sets an item active in the list .disabled This class makes an item disabled in the list .list-group-item-{color} Customizes the background color of list group items .list-group-item-{color}-text Customizes the color of the text of list group items .list-group-item-{color}-active Highlights the selected item with the specified background color .list-group-flush Removes the border and border-radius of list group items Some of the examples of list groups is as follows: Example Description Download link List group basic This example shows the structure of a basic list group. Download List group active/disabled item This example shows the structure of a list group showing the active and disabled item. Download List group as link & button This example shows the structure of a list group with links and buttons. Download Numbered list group This example shows the structure of a numbered list group. Download List group with badges This example shows the structure of a list group with badges. Download Horizontal list group This example shows the structure of a horizontal list group. Download List group with radio buttons & checkboxes This example shows the structure of a list group with radio buttons and checkboxes. Download Print Page Previous Next Advertisements ”;
Bootstrap – Modals Demo
Bootstrap – Modal demo ”; Previous Next What is a modal? A modal in bootstrap is a dialog box/popup window that is displayed on top of the current page. It is used to display important information or ask the user for confirmation before taking a specific action. Modal is a core UI component of bootstrap and can be easily customized using built-in CSS classes and JavaScript methods. class description .modal This is used to define the basic structure of the modal .modal-header This is used to define the header section of the modal .modal-body This is used to define the body section of the modal .modal-footer This is used to define the footer section of the modal .fade This is used to add a fade effect to the modal .modal-dialog This is used to customize the size and position of the modal .modal-content This is used to customize the background color and border of the modal .modal-title This is used to customize the title of the modal .close This is used to add a close button to the modal Some of the examples of the modals are as follows: Example Description Download link Basic static modal This example shows a static modal. Download Scrollable modal This example shows a scrollable modal. Download Modal with static backdrop This example shows a modal with static backdrop. Download Modal with tooltip This example shows a modal with a tooltip. Download Modal with popover This example shows a modal with a popover. Download Modal with grid This example shows a modal with grid. Download Animated modal This example shows a modal with animation. Download Print Page Previous Next Advertisements ”;
Bootstrap – Stretched link
Bootstrap – Stretched link ”; Previous Next This chapter discusses about the class .stretched-link provided by Bootstrap. The .stretched-link class in Bootstrap is used to create a link that stretches to fill the entire parent container. This class can be used on any element that can contain a link, such as a <div> or <a> element, to make the entire element clickable and act as a link. Any element with position:relative and contains a link with the .stretched-link class is clickable. The .stretched-link class cannot be mixed with most table elements. This class can be safely added to cards as they have position:relative by default in Bootstrap. Using stretched links with multiple links and tap targets is not advisable. Card with stretched link This is useful for cases where you want to make an entire section of content clickable, such as a card or a list item. Let”s see an example on the usage of the .stretched-link class in a card: Example You can edit and try running this code using the Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Card</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <h4>Stretched link in a card</h4> <div class=”card” style=”width: 20rem;”> <img src=”/bootstrap/images/tutimg.png” class=”card-img-top” alt=”…”> <div class=”card-body”> <h5 class=”card-title”>Stretched link in a card</h5> <p class=”card-text”>Here is an example that shows the entire card as a link. This is because of the .stretched-link class of Bootstrap.</p> <a href=”#” class=”btn btn-primary stretched-link”>View</a> </div> </div> </body> </html> You need to add the .position-relative class to prevent the link from stretching outside the parent element, when custom components do not have position: relative by default. Let”s see an example on the usage of the .position-relative class: Example You can edit and try running this code using the Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Helper – Stretched link</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <h4>Custom component with stretched link</h4> <div class=”d-flex position-relative”> <img src=”/bootstrap/images/tutimg.png” class=”flex-shrink-0 me-3″ alt=”…”> <div> <h5 class=”mt-0″>Custom component with stretched link using .position-relative</h5> <p>Here is an example showing the use of .position-relative class in a component that shows a stretched link usage.</p> <a href=”#” class=”stretched-link”>View</a> </div> </div> </body> </html> Let”s see one more example of the usage of the .position-relative class: Example You can edit and try running this code using the Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Helper – Stretched link</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <h4>Columns with stretched link</h4> <div class=”row g-0 bg-body-secondary position-relative”> <div class=”col-md-4 mb-md-0 p-md-4″> <img src=”/bootstrap/images/tutimg.png” class=”w-100″ alt=”…”> </div> <div class=”col-md-4 p-4 ps-md-0″> <h5 class=”mt-0″>Columns with stretched link</h5> <p>Another example of strecthed link with .position-relative on this other custom component. You can use it here to give the component a bit of body and size.</p> <a href=”#” class=”stretched-link”>View</a> </div> </div> </body> </html> Print Page Previous Next Advertisements ”;
Bootstrap-Sign In Demo
Bootstrap – Sign in Demo ”; Previous Next Overview The basic sign-in form layout provides a simple and user-friendly interface for users to log in to the website or application. This form includes inputs such as email and password. The <form> tag is used to create a sign-in page. The provided link shows an example of how to create a sign in form using Bootstrap features: Example Description Download link Sign in page This example indicates about sign in page in Bootstrap Download Print Page Previous Next Advertisements ”;
Bootstrap – Navigation Demo
Bootstrap – Navigation Demo ”; Previous Next What is a navbar? The Bootstrap navbar is a responsive navigation header at the top of a webpage. It can expand or collapse based on the screen size, providing a user-friendly navigation experience for websites. Bootstrap provides built-in CSS classes to create a standard navigation bar. The .navbar class is used to create a navigation bar component. The .navbar-brand class represents the brand or logo of the website or application. The .navbar-collapse class makes the navigation menu collapse into a dropdown or toggle button. The .navbar-nav class is used to create a horizontal navigation menu with multiple navigation links or items. The .nav-item class should be applied to each list item (<li>) within the navigation bar. The .nav-link class is used to styled anchor tags (<a>) within a navigation component. Some of the examples of the navbars are as follows. Example Description Download link Basic navbar This example shows the basic structure of navbar in Bootstrap. Download Navbars offcanvas This example shows the use of offcanvas navbars within a responsive web design. Download Navbar static This example shows the implementation of a static navbar fixed in its position on a webpage. Download Navbar fixed This example shows the navigation bar fixed to the top of the viewport (fixed-top). Download Navbar bottom This example shows navigation bar has a fixed position at the bottom of the page. Download Offcanvas navbar This example shows a navbar that can be expanded into sliding offcanvas menu. Download Print Page Previous Next Advertisements ”;
Bootstrap-Checkout RTL Demo
Bootstrap – Checkout RTL Demo ”; Previous Next Overview RTL stands for “Right-to-Left,” and it refers to a writing direction. Some of the languages include Arabic, Hebrew, Persian, and Urdu. In RTL writing systems, text and content are read from right to left, opposite to the usual left-to-right direction used in languages like English. Refer the page RTL, to know more about it. Bootstrap provides checkout form with RTL, that displays form elements and its validation features. It is summarized in the following table − Example Description Download link Checkout RTL This example indicates about checkout with RTL in Bootstrap Download Print Page Previous Next Advertisements ”;
Bootstrap – Dropdowns Demo
Bootstrap – Dropdown Demo ”; Previous Next What is a dropdown? The dropdown menu is a UI component that allows users to select an option from a list of choices. Dropdowns are commonly used for navigation, forms, and other interactive elements on a website. Bootstrap provides built-in CSS classes, that can be used to create a dropdown menu: .dropdown-menu – This class is usually defined in CSS to style the appearance and behavior of the dropdown menu. .dropdown-item – This class might be used to control the appearance of each item within the dropdown list. Some of the examples of the dropdown menu are as follows. Example Description Download link Basic dropdown This example demonstrates a basic dropdown menu with various menu items. Download Dropdown with searchbar This example demonstrates a dropdown menu including a search bar and various clickable items Download Dropdown with icons This example demonstrates a dropdown menu with associated icons and a title. Download Dropdown calendar This example demonstrates a basic calendar UI with the ability to navigate between months. Download Dropdown with links This example demonstrates a dropdown menu with icons and links. Download Print Page Previous Next Advertisements ”;
Bootstrap – Text
Bootstrap – Text ”; Previous Next This chapter will discuss about common Bootstrap text utilities. You can customize text alignment, weight, line height, wrapping, font size, and other formatting options using Bootstrap utility classes. Text alignment Text alignment classes provide convenient ways to align text to different components. These classes include responsive options that align the text to the start, end, or center positions, using the same viewport width breakpoints as the grid system. Note: Kindly resize the browser to see the alignment of text relative to the specific viewport. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Text</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <p class=”text-start text-info”>Text aligned at starting position across all viewports sizes.</p> <p class=”text-center text-danger”>Text aligned at center position across all viewports sizes.</p> <p class=”text-end text-warning”>Text aligned at end position across all viewports sizes.</p> <p class=”text-sm-start text-primary”>Text aligned at start on viewports sized SM (small) or wider.</p> <p class=”text-md-start text-primary”>Text aligned at start on viewports sized MD (medium) or wider.</p> <p class=”text-lg-start text-primary”>Text aligned at start on viewports sized LG (large) or wider.</p> <p class=”text-xl-start text-primary”>Text aligned at start on viewports sized XL (extra-large) or wider.</p> </body> </html> Bootstrap does not provide utility classes for justified text, which means that while justified text may appear more visually appealing, it can make word spacing more random and consequently more difficult to read. Text wrapping and overflow To achieve text wrapping, apply the .text-wrap class to the text. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Text</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”badge bg-warning text-wrap” style=”width: 8rem;”> This sentence should be wrapped. </div> </body> </html> You can stop text from wrapping by using the .text-nowrap class. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Text</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <div class=”text-nowrap bg-body-secondary border” style=”width: 8rem;”> This sentence should overflow the parent. </div> </body> </html> Word break To avoid breaking your components layout with long strings of text, use .text-break to apply word-wrap: break-word and word-break: break-word. To enhance browser compatibility, use word-wrap instead of overflow-wrap. Additionally, include the deprecated word-break: break-word to prevent problems with flex containers. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Text</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <p class=”text-break text-primary”>TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT</p> </body> </html> Word breaking is not possible in Arabic, this is the most commonly used RTL language. The .text-break feature has been eliminated from our RTL compiled CSS Text transform Text capitalization classes can be used to convert text case in components. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Text</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <p class=”text-lowercase text-danger”>This is a lower case text.</p> <p class=”text-uppercase text-info”> This is a upper case text.</p> <p class=”text-capitalize text-warning”>This is a capitalized text.</p> </body> </html> Note how does the .text-capitalize class modifies the initial letter of every word, without changing the case of other letters. Font size You can easily modify the font-size of text. Unlike heading classes (such as .h1–.h6) that include font-weight and line-height, these utilities focus only on font-size. The size of these utilities matches HTML”s heading elements, with a decrease in size as the number increases. Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Text</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <p class=”fs-1 text-info”>This is a text of .fs-1 font size.</p> <p class=”fs-2 text-info”>This is a text of .fs-2 font size.</p> <p class=”fs-3 text-info”>This is a text of .fs-3 font size.</p> <p class=”fs-4 text-info”>This is a text of .fs-4 font size.</p> <p class=”fs-5 text-info”>This is a text of .fs-5 font size.</p> <p class=”fs-6 text-info”>This is a text of .fs-6 font size.</p> </body> </html> Modify the $font-sizes Sass map to customize the available font sizes. Font weight and italics Use the below utilities to change font-weight or font-style of text: font-weight utilities are abbreviated as .fw-* font-style utilities are abbreviated as .fst-* Example You can edit and try running this code using Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Text</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <p class=”fw-bold text-primary”>This is a bold text.</p> <p class=”fw-bolder text-primary”>This is a bolder weight text (relative to the parent element).</p> <p class=”fw-semibold text-primary”>This is a semibold weight text.</p> <p class=”fw-medium text-secodary”>This is a medium weight text.</p> <p class=”fw-normal text-secodary”>This is a normal weight text.</p> <p class=”fw-light text-secodary”>This is a light weight text.</p> <p class=”fw-lighter text-danger”>This is a lighter weight text (relative to the parent element).</p> <p class=”fst-italic text-danger”>This is a italic text.</p> <p class=”fst-normal text-danger”>This is a text with normal font style.</p>
Bootstrap – Text Truncation
Bootstrap – Text truncation ”; Previous Next This chapter discusses about the utility provided by Bootstrap that helps in truncating long strings of text. Text truncation is a feature that allows you to truncate long strings of text that overflow their container, and display an ellipsis (…) at the end of the truncated text to indicate that more text is available. This can be useful for situations where you have limited space to display text, such as in a table or card. To truncate text in Bootstrap 5, you can use the .text-truncate class. It requires display: inline-block or display: block. This class can be added to any element that contains text, such as a <div> or a <p> element. Here”s an example of how to use the .text-truncate class: Example You can edit and try running this code using the Edit & Run option. <!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap – Helper – Text truncation</title> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <link href=”https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css” rel=”stylesheet”> <script src=”https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js”></script> </head> <body> <h4>Text truncation example</h4> <!– Block level –> <div class=”row”> <div class=”col-3 text-truncate”> The string of text seems to be very long, thus truncating it. </div> </div> <!– Inline level –> <span class=”d-inline-block text-truncate” style=”max-width: 150px;”> The string of text seems to be very long, thus truncating it. </span> </body> </html> Print Page Previous Next Advertisements ”;