Skip to content

Feature request: add option to hide thumbnail/sidebar #7

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

Closed
xiaohanyu opened this issue Mar 26, 2025 · 3 comments
Closed

Feature request: add option to hide thumbnail/sidebar #7

xiaohanyu opened this issue Mar 26, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@xiaohanyu
Copy link

xiaohanyu commented Mar 26, 2025

Hello,

As title, this is a follow up issue after #6. So could we add an option to completely disable/hide the thumbnail or the whole sidebar (if sidebar is going to add more functionalities in the future).

Thanks.

@david-reactpdf david-reactpdf added the enhancement New feature or request label Mar 26, 2025
@david-reactpdf
Copy link
Contributor

@xiaohanyu,

Thanks for the suggestion!

We already support hiding the thumbnail panel via the thumbnailTool prop. You can check it out here in the docs: https://docs.react-pdf.dev/components/rp-default-layout/#thumbnailtool

As for hiding the entire sidebar, that’s something on our roadmap. I’ll keep you updated once it’s available.

@xiaohanyu
Copy link
Author

@david-reactpdf

Yes I know react-pdf can hide any icons in toolbar/sidebar, and I guess it can also hide the entire sidebar by using some CSS tricks, however I think this way is not that elegant, so probably it is better to add some kind API/toggle to hide the sidebar so other parts can layout accordingly based on the toggle.

For my use cases, I am working on a resume builder, which mostly produces PDF with only 1 or 2 pages, it doesn't make any sense to give users a sidebar just to show thumbnails or table of contents (in the future). Of course, sidebar with thumbnails/table of contents do make sense for long PDFs like books.

@david-reactpdf
Copy link
Contributor

david-reactpdf commented Apr 26, 2025

Hi @xiaohanyu, just want to update you that we've added sidebarEnable to show/hide the sidebar easily in the new version. Hope this makes it more convenient for your use case.

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

No branches or pull requests

2 participants