@tp/tp-timeout-strip (1.0.0)
Published 2025-02-18 22:44:41 +01:00 by pk
Installation
@tp:registry=
npm install @tp/tp-timeout-strip@1.0.0
"@tp/tp-timeout-strip": "1.0.0"
About this package
tp-timeout-strip
Shows a small color strip that decreases in size over time to indicate a delay is currently elapsing. Can be used to indicate when a temporary popup will be automatically be closed.
Installation
npm install @tp/tp-timeout-strip
Usage
<tp-timeout-strip></tp-timeout-strip>
const strip = document.querySelector('tp-timeout-strip');
// Show the strip and start the timeout animation (3000ms = 3 seconds)
strip.show(3000);
// Listen for when the timeout completes
strip.addEventListener('timeout', () => {
console.log('Timeout elapsed!');
});
Styling
The component can be customized using CSS custom properties:
tp-timeout-strip {
/* Change the strip color (default: #000) */
--tp-timeout-strip-color: #ff4444;
/* Change the strip height (default: 3px) */
--tp-timeout-strip-width: 4px;
}
Dependencies
Dependencies
ID | Version |
---|---|
lit | ^3.0.0 |
Details
2025-02-18 22:44:41 +01:00
Assets (1)
Versions (1)
View all
npm
0
trading_peter
Apache-2.0
latest
5.2 KiB
tp-timeout-strip-1.0.0.tgz
5.2 KiB
1.0.0
2025-02-18