Ladda 介绍
Ladda 是一组集成了加载 提示 的按钮,以弥合行动和反馈之 间的 时间间隔,提供更好的 功能 使用体验。主要用于在 用户 点击提交之后,向 用户 提供即时的反馈,让他们知道浏览器正在处 用户 提交的任务。?
安装
npm install ladda
使用
首先导入Ladda模块:
import * as Ladda from 'ladda';
// Create a new instance of ladda for the specified button
var l = Ladda.create( document.querySelector( '.my-button' ) );
// Start loading
l.start();
// Will dis play a progress bar for 50% of the button width
l.setProgress( 0.5 );
// Stop loading
l.stop();
// Toggle between loading/not loading states
l.toggle();
// Check the current state
l.isLoading();
// Delete the button's ladda instance
l.remove();
?
网站地址 : http://lab.hakim.se/ladda/
GitHub: https://github.com/hakimel/Ladda
网站描述: 按钮提交后多种加载动画 效果
Ladda官方网站
官方网站: http://lab.hakim.se/ladda/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。