Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/razshare/svelte-liquid-swipe


https://github.com/razshare/svelte-liquid-swipe

animation css liquid svelte sveltejs swipe

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# Usage

Install with

```sh
npm i -D svelte-liquid-swipe
```

Import your `LiquidContainer` component

```html

import { LiquidContainer } from 'svelte-liquid-swipe'

```

The `LiquidContainer` component exposes a root element of `position:absolute`, meaning you'll have to wrap it inside your own `relative`, `fixed`, etc element in order to manage its size and position.

Something like this

```html

import { LiquidContainer } from 'svelte-liquid-swipe'




```

Then add some components to your container

```html

import { LiquidContainer } from 'svelte-liquid-swipe'
import Page1 from 'page1.svelte'
import Page2 from 'page2.svelte'
import Page3 from 'page3.svelte'
import Page4 from 'page4.svelte'

const pages = [Page1, Page2, Page3, Page4]




```

Result

Make sure you set `overflow:hidden` on your wrapper for the best results.

# Notes

Looking for full project example? Checkout the [example branch](https://github.com/tncrazvan/svelte-liquid-swipe/tree/example).