Components
Component utility classes are reusable, responsive and flexible for various use cases.
Input
Class value | Property style |
---|---|
input-sm |
height: 32px padding: 0 8px |
input-md |
height: 40px padding: 0 8px |
input-lg |
height: 48px padding: 0 8px |
<input class="input-sm">
Tabs
Tabs are great for organizing content and consist of two parts: tab-menu
and its corresponding content, tab-contents
. To match the tab link to its content, simply use the same value for the data-tab as shown below. Override the default color of the tab menu links by setting a new property value in the :root
of your custom CSS file.
Class value | Applies to | Customizable style |
---|---|---|
tab-menu |
menu container | - |
tab-menu |
menu link active | color: var(--tab-link, $blue-300) border-bottom: var(--tab-link-border-bottom, 2px solid $blue-300) |
tab-contents |
container for content | - |
tab-content #1
Donec ullamcorper nulla non metus auctor fringilla. Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur rdata-tabiculus mus. Etiam porta sem malesuada magna mollis euismod.
tab-content #2
Donec ullamcorper nulla non metus auctor fringilla. Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas sed diam eget risus.
tab-content #3
Donec ullamcorper nulla non metus auctor fringilla. Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellusac cursus commodo.
<!-- Tab menu container --> <div class="tab-menu"> <a data-tab="one">tab-menu #1</a> ... </div> <!-- Tab contents container --> <div class="tab-contents"> <div data-tab="one">tab-content #1</div> ... </div>
// Your Custom CSS File :root { --tab-menu: (your custom menu color); --tab-menu-border-bottom: (your custom menu border color); }
Accordion
The accordion component provides a way to organize content by topic and consists of two parts: the button takes on the class accordion
and plus sign plus
and the content which takes on the class accordion-content
. The accordion is responsive and stacked vertically by default.
Class value | Applies to | Customizable style |
---|---|---|
accordion |
button | background-color: var(--accordion-bg, $gray-100) |
accordion |
button active | background-color: var(--accordion-bg-active, $gray-200) |
plus |
button | - |
accordion-content |
content | - |
<button class="accordion">accordion 1<div class="plus"></div></button> <div class="accordion-content">accordion content 1</div>
// Your Custom CSS File :root { --accordion-bg: (your custom accordion color); --accordion-bg-active: (your custom accordion active color); }
Carousel
The carousel component is designed to display multiple images for ecommerce application. The carousel is responsive by default and offers three ways to navigate the images. Swipe and arrow controllers move the slide one at a time while the bottom navigation allows you to get to a specific slide location.
The height of the carousel is based on the height of the first image and vertically center aligned. This means subsequent images with greater height will be automatically cropped on the top and bottom.
As a best practice, make sure all images have consistent size ratios. Though the slide-prev
,
slide-next
as well as slide-nav
utility classes provide multiple means of navigating the
slides, for best user experience, implement just one navigation option. Override the default styles by setting new
property values in the :root
of your custom CSS file.
Class value | Applies to | Customizable style |
---|---|---|
carousel |
container for carousel | - |
slide-container |
container for slides | - |
slide |
image | - |
slide-prev |
left arrow controller | border: var(--arrow-border, 1px solid $gray-300) border-width: var(--arrow-border-width, 0 2px 2px 0) width: width: var(--arrow-width, 16px) height: height: var(--arrow-height, 16px) |
next |
right arrow controller | border: var(--arrow-border, 1px solid $gray-300) border-width: var(--arrow-border-width, 0 2px 2px 0) width: width: var(--arrow-width, 16px) height: height: var(--arrow-height, 16px) |
slide-prev / slide-next |
controller hover | border: var(--arrow-border-hover, 1px solid $gray-400) |
slide-nav-container |
container for navigation | - |
slide-nav |
navigation | width: var(--slide-nav-width, 16px) height: var(--slide-nav-height, 16px) border-radius: var(--slide-nav-border-radius, 50%) background: var(--slide-nav-bg, $gray-200) |
slide-nav |
navigation active | background: var(--slide-nav-bg--active, $gray-500) |
<!-- Carousel container --> <div class="carousel"> <!-- Controllers --> // You can omit the controllers <div class="slide-prev ml-3"></div> <div class="slide-next mr-3"></div> <!-- Slides container --> <div class="slide-container"> <!-- Slides --> <img class="slide" src="#" alt="Image for Carousel"> ... </div> <!-- Navigation container --> // You can omit the navigation <div class="slide-nav-container"> <!-- Navigation items --> <div class="slide-nav"></div> ... </div> </div>
// Your Custom CSS File :root { --arrow-border: (Your custom border); --arrow-border-width: (Your custom border width); ... }
Horizontal Scroll
The horizontal scroll component is useful for displaying collection of items for ecommerce application and works with touch, click and drag. Use the scrollX
utility class to enable the horizontal scroll.
Class value | Applies to |
---|---|
scrollX |
container for horizontal scroll |
<!-- Horizontal scroll container --> <div class="scrollX"> <!-- Set min width and layout items horizontally --> <div class="d-flex gap-flex-col-1 width-min-xl"> <div class="d-grid d-justify-center d-content-center col-2 bg-blue-100 rounded">item 1</div> ... </div> </div>