Front End Technology Articles - Page 14 of 745

How to change the size and color of the checkbox in Material UI?

Tarun Singh
Updated on 30-Oct-2023 11:11:13

4K+ Views

A checkbox is a key component when there is a need to choose multiple options from a list of options. To have control over the size of the checkboxes and to match the web design, ensure that proper sizes and colors have been added. In this article, we are going to learn how to change the size and color of the checkbox in Material UI. Creating a React project and adding the Material UI to it are prerequisites before continuing with the article. Let us begin and see how to modify the checkbox's size and color in its entirety. Steps ... Read More

How to autocomplete in ComboBox input in Material UI?

Tarun Singh
Updated on 30-Oct-2023 11:08:55

592 Views

Autocomplete functionality within ComboBox inputs has become a widely favored feature due to its ability to enhance the user experience by offering suggested options while typing. Material−UI, a renowned React UI framework, presents an elegant and straightforward solution for implementing autocompletion in ComboBox inputs. In this article, we'll explore the step−by−step process of setting up and utilizing the Autocomplete component in Material−UI, all while maintaining a desirable level of perplexity and burstiness. What is ComboBox Autocomplete? Autocomplete in a combo box entails enhancing a normal text input with a panel of suggested options. This feature proves useful in two main ... Read More

How to add labels in the checkbox in Material UI?

Tarun Singh
Updated on 30-Oct-2023 11:06:58

854 Views

A key component of user interfaces, checkboxes make it simple for users to select options or express preferences. Sometimes, the users get to see multiple options to select from, and if there are no proper labels, they may get confused. To solve this issue, checkboxes can be easily and elegantly added to the applications using Material UI, a well−liked React component library. Although checkboxes in the Material UI lack labels by default, this can occasionally cause confusion among users. In this article, we are going to learn how to create loading buttons in Material UI. Before going further in the ... Read More

How to add buttons with icons and labels in Material UI?

Tarun Singh
Updated on 30-Oct-2023 10:49:55

3K+ Views

If you are developing a React web application, it is likely that the icons will be used. Icons represent the concept, idea, file, program, application, business, and so on. To define the identity of a feature, you can use icons. An appropriate icon can stand in for a program or application when you do not want to write out its name, so that it is easy to identify. Icons are available in Material UI for use in our applications when building. Icons can also be added with buttons in the Material UI. Now, we’ll be learning how to add buttons ... Read More

How to find whether all element contains same class or not?

Aman Gupta
Updated on 13-Oct-2023 16:04:58

566 Views

Overview A class in any element defines the type of the data contained in an element. A same class name can be taken by another tag or element also. There is no such property for the class attribute that the class name should be unique. To find whether all the elements contain the same classes or not, can be achieved with the help of HTML, CSS and JavaScript. The HTML provides the layout of the page and the layout for the elements for the same classes and the JavaScript will provide the functionality to check whether all the elements contain ... Read More

How to find width of a div using vanilla JavaScript?

Aman Gupta
Updated on 13-Oct-2023 15:49:27

2K+ Views

Overview A vanilla JavaScript is a framework of JavaScript, it provides mainly two different methods to find the width of a div using the "offsetWidth" and "clientWidth". Both methods have the ability to find the width of any element on a web page. In this vanilla JavaScript refers to the methods of the JavaScript that are predefined for the developers. It provides cross-platform compatibility. Syntax The Syntax to find the width of the div is given below. These two methods are used to calculate the width of the div. elementHTML.offsetWidth elementHTML.clientWidth elementHTML − It is the div ... Read More

How to find position of HTML elements in JavaScript?

Aman Gupta
Updated on 13-Oct-2023 15:44:53

2K+ Views

Overview JavaScript provides various methods for the manipulation and to get the information about the HTML elements. From the several methods JavaScript has its own predefined methods which returns the specific coordinates or position of the HTML element. These two methods are offsetLeft and offsetTop, these two methods return the exact position of the HTML elements. JavaScript also provides another function as getBoundingClientRect() this method also provides the same result as the offset method. The getBoundingRect() has four properties as top, left, right and bottom and the offset has only two properties that are left and top. Syntax The ... Read More

How to find height of text in HTML canvas using JavaScript ?

Aman Gupta
Updated on 13-Oct-2023 15:42:53

3K+ Views

Overview A canvas is a HTML element that provides us to display any type of custom text or graphics on the web page. A canvas makes a graphics editable through which we can make our own custom text or design. A canvas element can be added to the HTML using tag or using JavaScript we can add it through the 'document' object 'createElement' method. As we have to find the height of the text that is written in the HTML canvas, we can use the ''textMetrics" objects measureText() property to calculate height of the text. Syntax The Syntax used ... Read More

How to find class of a clicked element using jQuery?

Aman Gupta
Updated on 13-Oct-2023 15:40:44

3K+ Views

Overview We can easily find the class of the clicked element, the Jquery provides various methods which return the class name of the element when the element is clicked. The Jquery methods "attr()" and using "this.className" properties helps to find the class of an element. So to learn more about these methods we will be seeing the Examples which will cover both the methods. A class name is an attribute which defines the group or type of the data inside the tag. There can be different tags or elements which can contain the same class names but there in case ... Read More

How to find area of a triangle using JavaScript?

Aman Gupta
Updated on 13-Oct-2023 18:31:02

4K+ Views

Overview The area of the triangle refers to the full area which means the perimeter of the triangle and the inside area. So to calculate the area of a triangle we will be calculating the perimeter of its and then the area but all these was the manual understanding of finding it. So by using JavaScript we will be automating this whole process which means a user only enters the sides of the triangle and to the interface and the area of the triangle will be calculated automatically. Expression (Heroine's Formula) The given below shows the heroine's formula expression − ... Read More

Advertisements