Slider
Native range input styled via ui.Input.
github.com/fastygo/templ/ui
Native range input styled via ui.Input.
Default
import "github.com/fastygo/templ/ui"
templ Example() {
@ui.Input(ui.InputProps{Type: "range", Min: "0", Max: "100", AriaLabel: "Volume"})
}
import "github.com/fastygo/templ/ui"
templ Example() {
@ui.Input(ui.InputProps{Type: "range", Min: "0", Max: "100", AriaLabel: "Volume"})
}
With value
import "github.com/fastygo/templ/ui"
templ Example() {
@ui.Input(ui.InputProps{Type: "range", Min: "0", Max: "100", Value: "50", AriaLabel: "Brightness"})
}
import "github.com/fastygo/templ/ui"
templ Example() {
@ui.Input(ui.InputProps{Type: "range", Min: "0", Max: "100", Value: "50", AriaLabel: "Brightness"})
}
API
Min · string — Minimum value
Max · string — Maximum value
Value · string — Current value