UI toolkit
The swiper component alows for swiping left or right. The contents for this component can be anything, carousel and/or video, etc. Put this in a Stack component and you can create a Tinder-like swiping deck.
<skim-longpress threshold="250">
<ion-button class="emoj" fill="none" size="small" onclick="doSomething()">
<ion-icon name="thumbs-up-outline" color="medium" slot="start"></ion-icon>
Like
</ion-button>
</skim-longpress>
<script>
document.querySelector('skim-longpress').addEventListener('longpress', () => {
console.log('Longpress triggered');
});
</script>
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
threshold |
threshold |
Number of miliseconds before triggering | number |
500 |
Event | Description | Type |
---|---|---|
longpress |
Emitted when held for specified (threshold) amount of time | CustomEvent<void> |
Built with StencilJS