Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical Slider #298

Open
s-celles opened this issue Feb 27, 2024 · 4 comments
Open

Vertical Slider #298

s-celles opened this issue Feb 27, 2024 · 4 comments

Comments

@s-celles
Copy link

s-celles commented Feb 27, 2024

Hello,

Following fonsp/Pluto.jl#2827

For some notebooks it could make sense to have a vertical Slider

Following your comment fonsp/Pluto.jl#2827 (comment) I tried

html"""
<div>
    <input style="writing-mode: vertical-rl" type=range>
</div>
"""

but haven't been able to bind the value to the slider

Kind regards

@s-celles s-celles changed the title PlutoUI / Vertical slider Vertical slider Feb 27, 2024
@s-celles s-celles changed the title Vertical slider Vertical Slider Feb 27, 2024
@fonsp
Copy link
Member

fonsp commented Feb 27, 2024

Maybe this can be implemented with writing-mode. Need to take care that the show_value still works properly.

image

Until then you could use the html element directly:

@bind x html"<input style="writing-mode: vertical-rl" type=range min=5 max=25>"

@s-celles
Copy link
Author

s-celles commented Feb 27, 2024

@bind V1 html"""<input style="writing-mode: vertical-rl" type=range min=0 max=1 step=0.1 default=1>"""

is a good workaround (with triple quote)

Thanks @fonsp

@s-celles
Copy link
Author

s-celles commented Mar 4, 2024

On the other side... doing something like

begin
	ui_V1 = @bind V1 html"""<input style="writing-mode: vertical-rl" type=range min=0 max=1 step=0.1 default=1>"""
	md"""$(V1) $(ui_V1)"""
end

returns missing

image

@aplavin
Copy link

aplavin commented May 6, 2024

See also – fully generic slider styling in PlutoUIExtra.jl (+PR here in PlutoUI.jl #258).
Works for vertical and whatever else you might want:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants