Mastering UI Components: Toast, Progress, Action Sheet, Modal, and Navigator

This guide explains how to use common UI components—including toast messages, progress bars, action sheets, modal dialogs, and navigator links—by detailing their code structures, key attributes, and usage examples for front‑end development.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
Mastering UI Components: Toast, Progress, Action Sheet, Modal, and Navigator

Message Toast

Code Structure

<toast bindchange="...">
    Message content
</toast>

Attributes

duration – display time in milliseconds, default 1500

bindchange – event triggered when duration expires

Progress Bar

Code Structure

<progress percent="20" />

Attributes

percent – percentage 0~100

show-info – display percentage

stroke-width – bar width in px

color – bar color

active – true/false, show animation

Action Sheet

Code Structure

<action-sheet>
  <action-sheet-item>xxx</action-sheet-item>
  ...
  <action-sheet-cancel>Cancel</action-sheet-cancel>
</action-sheet>

Contains multiple items and a cancel button.

Attributes

bindchange – triggered when background or cancel button is clicked

Modal Dialog

Code Structure

<modal title="Title" confirm-text="confirm" ...>
  Dialog content.
</modal>

Attributes

title – title

no-cancel – hide cancel button

confirm-text – confirm button text

cancel-text – cancel button text

bindconfirm – event on confirm click

bindcancel – event on cancel or overlay click

Navigator

Code Structure

<navigator url="navigate?title=navigate">
Navigate to new page
</navigator>

Attributes

url – navigation link

redirect – true/false, close current page

hover-class – style on click

Source Code Download

Send message ‘ 04 ’ to automatically receive the download link.

Click “Read Original” to view the article list

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

frontend developmentnavigatortoastprogress barmodalaction sheet
Java High-Performance Architecture
Written by

Java High-Performance Architecture

Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.