Are there up/down arrow buttons in Shiny?

453 views
Skip to first unread message

L McMillan

unread,
Mar 8, 2016, 5:54:57 PM3/8/16
to Shiny - Web Framework for R
Hi,

I want to create an app that lets users increase or decrease the amount of something, so I want to add triangle-shaped up and down buttons next to the label for the item.

Are there already up/down triangle-shaped buttons available within Shiny or any of the Shiny GitHub projects?

Or do I just have to use two buttons labelled as + and - ? I'd rather have up and down triangles because the app is intended as a game for young children and I think the triangles are a more intuitive interface.

Thanks very much,

Louise

Joe Cheng

unread,
Mar 8, 2016, 8:59:16 PM3/8/16
to L McMillan, Shiny - Web Framework for R
Here's one way:

actionLink("up", NULL, icon("arrow-up")),
tags$br(),
actionLink("down", NULL, icon("arrow-down"))

(actionLink is the same as action button, but without the visual button outline.)

There are tons of different options you can use besides "arrow-up" and "arrow-down", see the "Directional Icons" section on this page: https://fortawesome.github.io/Font-Awesome/icons/

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/90e6eb6e-24ae-4308-8131-cdef332c1267%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages