Appearance
Basic Usage
Vanilla JS/TS
- Use this DOM structure:
html
<div id="laufsteg-sample-1" className="laufsteg-container">
<div className="laufsteg-trolley">
<div className="laufsteg-cell">YOUR_CONTENT_GOES_HERE</div>
</div>
</div>
- Call
createLaufsteg()
ts
import { createLaufsteg } from 'laufsteg'
...
const options: LaufstegOptions = {...}
const container = document.getElementById("laufsteg-sample-1")
const laufsteg = createLaufsteg(container, options)
...
Framework-Adapters
If you use one of our adapters you don't have to call createLaufsteg()
manually. You only have to use the provided component as a wrapper and pass the options as props.
Vue
tsx
<Laufsteg offset="100" ... >YOUR_CONTENT_GOES_HERE</Laufsteg>
The options described on this page can be passed as props. The callbacks are exposed as emits.
React
tsx
<Laufsteg offset={100} ... >YOUR_CONTENT_GOES_HERE</Laufsteg>
The options described on this page can be passed as props. The callbacks are available as classic callback functions (e.g. onDragStart
)