Skip to main content

HScroller

You can use the HScroller to make a horizontally scrolling gallery.

Syntax

let elements = [
{
type: "hscroller"
}
];

Rendered Element

The instance of HScroller class will be created.

   new HScroller()
.seto({
height: "300px",
speed: 1.0 // the bigger the slower
})
.add([
new Text("First").set({
size: "S1",
pad: [{
"a": 40
}]
}),
new Text("Second").set({
size: "S1",
pad: [{
"a": 40
}]
}),
new Text("Third").set({
size: "S1",
pad: [{
"a": 40
}]
})
])
.render("#mount");