feat: Add toolbar spacer#1265
Merged
elnelson575 merged 18 commits intofeat/toolbar-epicfrom Dec 12, 2025
Merged
Conversation
commit c9afed1 Author: E Nelson <[email protected]> Date: Fri Dec 5 17:15:42 2025 -0500 Updates to function signature commit a475b8e Author: E Nelson <[email protected]> Date: Fri Dec 5 14:54:30 2025 -0500 Update name commit f6a559f Merge: d08117e 342ea78 Author: E Nelson <[email protected]> Date: Fri Dec 5 12:38:40 2025 -0500 Merge branch 'feat/toolbar-spacer' of https://github.com/rstudio/bslib into feat/toolbar-spacer commit d08117e Author: E Nelson <[email protected]> Date: Fri Dec 5 12:37:41 2025 -0500 Cleanup commit 20efc97 Author: E Nelson <[email protected]> Date: Wed Nov 26 11:05:26 2025 -0500 Start of a spacer commit 06ede8a Author: E Nelson <[email protected]> Date: Fri Dec 5 10:04:01 2025 -0500 Update comment commit edd40c5 Author: E Nelson <[email protected]> Date: Thu Dec 4 23:01:24 2025 -0500 Syntax change to reflect this is helpful regardless of if show_label is False commit 6fc2aff Author: E Nelson <[email protected]> Date: Thu Dec 4 18:02:22 2025 -0500 Update comments commit 75c308a Author: E Nelson <[email protected]> Date: Thu Dec 4 17:57:28 2025 -0500 Fixing private seed commit 7da07ad Merge: 5a17493 a56c081 Author: E Nelson <[email protected]> Date: Thu Dec 4 17:24:49 2025 -0500 Merge branch 'feature/add-buttons' of https://github.com/rstudio/bslib into feature/add-buttons commit 5a17493 Author: E Nelson <[email protected]> Date: Thu Dec 4 17:24:46 2025 -0500 Update scss and minor polish commit a56c081 Author: E Nelson <[email protected]> Date: Thu Dec 4 17:23:18 2025 -0500 Update btn type logic Co-authored-by: Garrick Aden-Buie <[email protected]> commit d0320ee Author: E Nelson <[email protected]> Date: Wed Dec 3 16:39:06 2025 -0500 Updates to labels commit b074585 Author: E Nelson <[email protected]> Date: Wed Dec 3 10:25:53 2025 -0500 Updated label commit 691edba Author: E Nelson <[email protected]> Date: Wed Dec 3 09:33:25 2025 -0500 Remove aria labels from icons when they're in labels commit f902a26 Author: E Nelson <[email protected]> Date: Tue Dec 2 18:55:30 2025 -0500 Updates - pending final validation commit a00ca8c Author: E Nelson <[email protected]> Date: Tue Dec 2 18:37:31 2025 -0500 Update tooltip wording commit f85fb88 Author: E Nelson <[email protected]> Date: Tue Dec 2 18:35:01 2025 -0500 Updated button type determination commit 7db177c Merge: 704bfad e69b102 Author: E Nelson <[email protected]> Date: Tue Dec 2 18:26:29 2025 -0500 Merge branch 'feature/add-buttons' of https://github.com/rstudio/bslib into feature/add-buttons commit 704bfad Author: E Nelson <[email protected]> Date: Tue Dec 2 18:26:27 2025 -0500 Update toolbar.R commit e69b102 Author: E Nelson <[email protected]> Date: Tue Dec 2 17:11:08 2025 -0500 Update R/toolbar.R Co-authored-by: Garrick Aden-Buie <[email protected]> commit ebdade5 Author: E Nelson <[email protected]> Date: Tue Dec 2 14:39:09 2025 -0500 Update based on comments commit 5caa62d Author: E Nelson <[email protected]> Date: Mon Dec 1 17:09:17 2025 -0500 Make the buttons just a little bit smaller commit 270262b Author: E Nelson <[email protected]> Date: Mon Dec 1 17:05:17 2025 -0500 Update padding commit e40b9e7 Author: E Nelson <[email protected]> Date: Mon Dec 1 16:33:28 2025 -0500 Updated function signature for buttons, updated scss for showing/hiding labels commit 8159db8 Author: E Nelson <[email protected]> Date: Mon Dec 1 09:29:58 2025 -0500 Update DESCRIPTION commit 342ea78 Author: E Nelson <[email protected]> Date: Wed Nov 26 11:05:26 2025 -0500 Start of a spacer commit b8d66d5 Author: E Nelson <[email protected]> Date: Mon Nov 24 10:02:59 2025 -0500 Updating with edits based on comments commit 5531572 Author: E Nelson <[email protected]> Date: Fri Nov 21 09:08:39 2025 -0500 Apply suggestions from code review Co-authored-by: Garrick Aden-Buie <[email protected]> commit 85bad5e Merge: 5ed4321 16acb76 Author: E Nelson <[email protected]> Date: Thu Nov 20 13:50:12 2025 -0500 Merge branch 'feature/add-buttons' of https://github.com/rstudio/bslib into feature/add-buttons commit 5ed4321 Author: E Nelson <[email protected]> Date: Thu Nov 20 13:49:50 2025 -0500 Removing accidental legacy addition commit 16acb76 Author: E Nelson <[email protected]> Date: Thu Nov 20 13:46:34 2025 -0500 Fixing diff commit 37b9855 Author: E Nelson <[email protected]> Date: Thu Nov 20 13:44:09 2025 -0500 Clean up scss commit c5d9e38 Author: E Nelson <[email protected]> Date: Thu Nov 20 13:27:44 2025 -0500 Slim down icon button formatting commit e6fac9a Author: E Nelson <[email protected]> Date: Thu Nov 20 13:17:18 2025 -0500 Fixing diff commit 25c6027 Author: E Nelson <[email protected]> Date: Thu Nov 20 13:10:39 2025 -0500 Update card.scss commit cc601fb Author: E Nelson <[email protected]> Date: Thu Nov 20 12:47:35 2025 -0500 Fix tests commit cd2a746 Author: Liz Nelson <[email protected]> Date: Thu Nov 20 12:38:42 2025 -0500 removing comment commit c5f3dd6 Merge: b49322b 06177d6 Author: Liz Nelson <[email protected]> Date: Thu Nov 20 12:37:07 2025 -0500 Merge branch 'feature/add-buttons' of https://github.com/rstudio/bslib into feature/add-buttons commit b49322b Author: Liz Nelson <[email protected]> Date: Thu Nov 20 12:37:03 2025 -0500 Add back deleted file commit 06177d6 Author: E Nelson <[email protected]> Date: Thu Nov 20 12:35:34 2025 -0500 Update header format in bs-theme-preset-builtin.md commit fa866ba Author: E Nelson <[email protected]> Date: Thu Nov 20 12:35:16 2025 -0500 Update headings in bs-theme-preset.md commit 8f3ab2d Author: Liz Nelson <[email protected]> Date: Thu Nov 20 12:24:56 2025 -0500 Updating tests commit a6250a6 Merge: cf585de 769a8fd Author: Liz Nelson <[email protected]> Date: Thu Nov 20 12:00:11 2025 -0500 Updating tests commit cf585de Author: Liz Nelson <[email protected]> Date: Thu Nov 20 09:56:50 2025 -0500 Updated footer, updated gap commit 3ce0b20 Author: Liz Nelson <[email protected]> Date: Wed Nov 19 12:28:09 2025 -0500 Updated card header and font sizing commit 0c0f895 Author: Liz Nelson <[email protected]> Date: Wed Nov 19 12:15:40 2025 -0500 Fixed button sizing, changing to also incorperate label+icon commit 652a061 Merge: 78372c1 0757592 Author: Liz Nelson <[email protected]> Date: Tue Nov 18 09:41:57 2025 -0500 Merging in toolbar/epic commit 78372c1 Author: Liz Nelson <[email protected]> Date: Fri Nov 14 11:04:49 2025 -0500 Reformat spacing commit ef468d1 Author: Liz Nelson <[email protected]> Date: Fri Nov 14 11:02:11 2025 -0500 Updating button spacing commit d69e3e8 Merge: 180319a df309bf Author: Liz Nelson <[email protected]> Date: Fri Nov 14 09:59:36 2025 -0500 Merge branch 'feat/toolbar-container' into feature/add-buttons commit df309bf Author: Liz Nelson <[email protected]> Date: Fri Nov 14 09:44:38 2025 -0500 Updating footer, updating tests commit 88f00d8 Author: Liz Nelson <[email protected]> Date: Fri Nov 14 09:11:18 2025 -0500 Docs changes commit 6a3ccfe Author: Liz Nelson <[email protected]> Date: Fri Nov 14 09:10:31 2025 -0500 Adding footer back commit 899b644 Author: Liz Nelson <[email protected]> Date: Fri Nov 14 09:08:05 2025 -0500 minor formatting changes commit f898670 Author: Liz Nelson <[email protected]> Date: Thu Nov 13 21:59:50 2025 -0500 Updated code commit 0340d21 Merge: 478f5e1 86ca69f Author: Liz Nelson <[email protected]> Date: Thu Nov 13 12:40:29 2025 -0500 Merge remote-tracking branch 'origin/main' into feat/toolbar-container commit 478f5e1 Merge: e6e9d88 7ba82cb Author: Liz Nelson <[email protected]> Date: Thu Nov 13 12:37:16 2025 -0500 Merge remote-tracking branch 'origin/main' into feat/toolbar-container commit 180319a Author: Liz Nelson <[email protected]> Date: Wed Nov 12 09:48:10 2025 -0500 Added disabled option commit 626af55 Author: Liz Nelson <[email protected]> Date: Wed Nov 12 09:09:44 2025 -0500 Adding input buttons commit e6e9d88 Author: E Nelson <[email protected]> Date: Wed Nov 5 17:15:28 2025 -0500 Update inst/components/scss/toolbar.scss Co-authored-by: Garrick Aden-Buie <[email protected]> commit 0afabf4 Author: E Nelson <[email protected]> Date: Wed Nov 5 17:15:21 2025 -0500 Update inst/components/scss/toolbar.scss Co-authored-by: Garrick Aden-Buie <[email protected]> commit a55d03f Author: E Nelson <[email protected]> Date: Wed Nov 5 17:10:34 2025 -0500 Update inst/components/scss/toolbar.scss Co-authored-by: Garrick Aden-Buie <[email protected]> commit 0836374 Author: E Nelson <[email protected]> Date: Wed Nov 5 17:10:27 2025 -0500 Update R/toolbar.R Co-authored-by: Garrick Aden-Buie <[email protected]> commit d2eb240 Merge: b23fc17 c2289a3 Author: Liz Nelson <[email protected]> Date: Wed Nov 5 13:57:37 2025 -0500 Merge branch 'feat/toolbar-container' of https://github.com/rstudio/bslib into feat/toolbar-container commit b23fc17 Author: Liz Nelson <[email protected]> Date: Wed Nov 5 13:52:58 2025 -0500 updates to dots commit c2289a3 Author: E Nelson <[email protected]> Date: Wed Nov 5 13:52:14 2025 -0500 Fix dots in toolbar function Co-authored-by: Garrick Aden-Buie <[email protected]> commit 5fd9254 Author: Liz Nelson <[email protected]> Date: Wed Nov 5 13:31:58 2025 -0500 Update to toolbar testing commit 1abed04 Author: Liz Nelson <[email protected]> Date: Tue Nov 4 22:57:08 2025 -0500 Adding a few comments commit 3f8b630 Author: Liz Nelson <[email protected]> Date: Tue Nov 4 22:40:27 2025 -0500 Adding snaps commit c7d70e6 Author: Liz Nelson <[email protected]> Date: Mon Nov 3 16:49:01 2025 -0500 Removing example: commit 6389307 Author: Liz Nelson <[email protected]> Date: Mon Nov 3 16:29:12 2025 -0500 Updated news commit 8f6d6f1 Author: Liz Nelson <[email protected]> Date: Mon Nov 3 16:09:43 2025 -0500 Added tests commit 04bd68b Author: Liz Nelson <[email protected]> Date: Mon Nov 3 11:31:31 2025 -0500 Minor updates commit ed1a07e Author: Liz Nelson <[email protected]> Date: Mon Nov 3 11:15:13 2025 -0500 Updates commit 374f757 Author: Liz Nelson <[email protected]> Date: Mon Nov 3 11:02:45 2025 -0500 Initial toolbar container
…bslib into feat/add-toolbar-spacer
gadenbuie
reviewed
Dec 8, 2025
Member
gadenbuie
left a comment
There was a problem hiding this comment.
Looking good! A few minor comments about CSS variables and how we can use them, plus one big "maybe we should rename this function" style question to consider.
gadenbuie
reviewed
Dec 11, 2025
gadenbuie
reviewed
Dec 11, 2025
gadenbuie
reviewed
Dec 11, 2025
gadenbuie
reviewed
Dec 11, 2025
gadenbuie
reviewed
Dec 11, 2025
gadenbuie
reviewed
Dec 11, 2025
gadenbuie
approved these changes
Dec 12, 2025
Member
gadenbuie
left a comment
There was a problem hiding this comment.
Looks great, just one more tiny update to use the same pattern for the divider color that we're already using for height and width.
I could see an argument for letting users set the divider color in toolbar_divider() -- e.g. if you have a fixed header color and want a specific divider color to work with that color -- but I'll let you decide if it's worth adding.
Feel free to merge when you're ready!
elnelson575
added a commit
that referenced
this pull request
Dec 18, 2025
commit a37f90a Author: E Nelson <[email protected]> Date: Wed Dec 17 14:24:38 2025 -0500 feat: Add toolbar input select (#1260) Adding an input select optimized for use in toolbars. Co-authored-by: Garrick Aden-Buie <[email protected]> commit 6cf620b Author: E Nelson <[email protected]> Date: Fri Dec 12 17:23:10 2025 -0500 feat: Add toolbar spacer (#1265) Adding a dividing line and space option to allow for more customized toolbar spacing. Co-authored-by: Garrick Aden-Buie <[email protected]> Co-authored-by: elnelson575 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1259
Goal:
Give users control over spacing in toolbars.
Enable both:
Allow users to:
Additional Considerations:
Dark Mode Verification
Decision Log:

How to we want to make a toolbar like this particular (split) case?
This can be accomplished right now via creating two toolbars, one with align = "left" and one with align = "right".
Question: Should we make it possible such that you have ONE toolbar (vs two with different alignments) and put a spacer in the middle to split half of it to the left and half of it to the right?
No. In the future, we could consider creating an
align="stretch"if we wanted to enable this, but for now, let's just go with the two toolbars.Example App:

Code
Remaining To-Do: