Installation
To use SlateUI in your project, copy the CDN link and paste it in the head of the HTML file of your project. OR Can Import the File in your project by using the following command:
@import "https://slateui.netlify.app/css/components.css";
Alerts are available in 5 types- success alert, error alert, warning alert, primary alert, secondary alert. To use this alert just use class name alert-box and also add class according to alert type- alert-primary, alert-secondary, alert-danger, alert-success, alert-warning. (e.g.class="alert-box alert-primary"). You can copy html part from below code snippet.
Avatar is available in 4 different sizes. You can use image in Avatar. You need to include class avatar and for size add class according to size avatar-lg-size, avatar-md-size, avatar-sm-size, avatar-xs-size (e.g. class="avatar avatar-lg-size") Don't forget to add Responsive Image class names for img element. Example of Text Avatar You can use initial letters of user in Avatar as well. You need to include class avatar-text along with avatar and size class. (e.g. class="avatar avatar-lg-size avatar-text")
We have 2 types of status badges that can be integrated with Avatars. You can show colors to show the online status of user. And to show cart or notification count, you can use number badge. Check code below to copy the html part as is. We have multiple sizes of text-badges for using these you can use text-badge-large, text-badge-medium-large, text-badge-medium, text-badge-small, text-badge-medium-very-small classes.
Example of Buttons Example of Primary Button Styles Whenever you want your user to click on a link or button, use primary style buttons. Example of Secondary Button Styles If you want user not to pay attention to buttons then use Secondary buttons. Example of Button with icon and Floating action Button Button with icon can be used in cards to complete the UI. For class and html, check below code. Floating-action buttons can be customized by adding the font-awesome icon of your choice.
Example of Cards Example of Horizontal Cards Horizontal cards contains the content and actions about a single subject. Cards are surfaces that display content and actions on a single topic.It focuses on the content, while presenting actions inline with the content. Example of Vertical Cards Vertical cards contains the content and actions about a single subject. Cards are surfaces that display content and actions on a single topic.It focuses on the content, while presenting actions in column form with the content.
Example of Responsive Images You can add class responsive-image to make your image fit the width of container. It's height will get adjusted by keeping the aspect ratio same. If you want to change the aspect ratio, you will have to crop the image Example of Responsive Images It's height will get adjusted by keeping the aspect ratio same, use class class="responsive-image" to make image responsive. Example of Round Images round images can be added by adding class class="round-image" to the image.
Example of Inputs Inputs are used to collect data from the user. They are used to collect text, numbers, and other data. There are different type of Input that we can use to collect data such as calander to collect date, text to collect text, number to collect number, etc.
Add class according to bullet style. Copy html code below and add your desired list items.
For heading u can use h1, h2, h3, h4, h5, h6 elements. The same font-styling is present for class names h1, h2, h3, h4, h5, h6 class. You can add one of these classes to style the text.
Navigation can contain links, buttons, icons, and other elements, and when clicked on will navigate to a different page or section of the application.
Example of Model The modal component provides a solid foundation for creating dialogs, popovers, lightboxes, or whatever else.
Ratings are used to indicate the rating of a product or service.
Example of Grids There are different type of grids available in the grid component and are used to create different layouts . some of examples are as follows: 50:50 GridsAlert 50:50 Grids are used to create equal width and height grids. use the following code to create 50:50 grids. class="grid-50-50" 70:30 Grids 70:30 Grids are used to create 70% width and 30% height grids. use the following code to create 50:50:50 grids. class="container-70-30" 30:70 Grids 30:70 Grids are used to create 30% width and 70% height grids. use the following code to create 50:50:50 grids. class="container-30-70"
This component can be used for toast or snackbar component. Toast is mostly used to show feedback message. Snackbar is to used show message that need user action .