This is currently quite difficult and actually best done via plotly_build() since this
plot_ly(mtcars, x = ~mpg, y = ~wt, frame = ~vs) %>%
animation_button(buttons = list(list(label = "Custom")))
overwrites the auto-generated buttons object. At least for users of the frame API, it probably only ever makes sense to have write access to button.label anyway, so I'm thinking we should add an explicit label argument to animation_button():
plot_ly(mtcars, x = ~mpg, y = ~wt, frame = ~vs) %>%
animation_button(label = "Custom", bgcolor = "red", font = list(color = "white"))

This is currently quite difficult and actually best done via
plotly_build()since thisoverwrites the auto-generated
buttonsobject. At least for users of theframeAPI, it probably only ever makes sense to have write access tobutton.labelanyway, so I'm thinking we should add an explicitlabelargument toanimation_button():