Part 5 β€” Styling your app [Customizing the UI]

In this part, you will learn how you can customize HTML in your application. We will use our Application Designer to preview the HTML files.

Table of contents

Step 1 β€” Element widgets, again

Remember the Part 2 from Chapter 2 β€” Element widgets? We can use elements from Element when creating applications with UI. It is enough to add the desired element to the HTML file.

warning Don't forget to initialize state so the buttons work properly

Example:

<div>
	<div>
		<el-button type="success">Success</el-button>
        	<el-button type="warning">Warning</el-button>
        	<el-button type="danger">Danger</el-button>
        	<el-button type="info">Info</el-button>
	</div>
	<hr/>
	<div>
		state.checkedList value: {{state.checkedList}}
	</div>
	<hr/>
	<div>

		<el-checkbox-group v-model="state.checkedList">
		    <el-checkbox label="Option A"></el-checkbox>
		    <el-checkbox label="Option B"></el-checkbox>
		    <el-checkbox label="Option C"></el-checkbox>
		</el-checkbox-group>
	</div>
</div>

Result:


Step 2 β€” HTML Styles

Also you can create your own styles and apply them to elements. Inline styles are also available.

Example:

Result:

Step 3 β€” Elements properties (Disabling, Hiding, Loading, Iterating)

Some elements of the HTML file have properties. They can be changed.

warning You can use state to pass values to these properties!

Result:


Last updated

Was this helpful?