fern icon indicating copy to clipboard operation
fern copied to clipboard

Hyperlink pdf files in assets folder

Open ClemMakesApps opened this issue 8 months ago • 0 comments

Which Fern component?

Fern Docs

How important is this?

P2 - Medium (Would be helpful)

What's the feature?

Description

Currently, when adding href links to PDF files stored in the /assets/ or /fern/assets folder, Fern applies special handling that prevents them from functioning as standard hyperlinks.

Requested Behavior

Allow creating regular hyperlinks to PDF files in the assets folder that:

  1. Open in a new browser tab instead of embedding
  2. Display as standard hyperlinks rather than with the <download> component
  3. Do not show the external-link-icon that Fern currently renders

Current Workarounds

Currently using the <download> component, which is suboptimal as users cannot open the PDF in a new tab.

Use Case

Displaying a list of reports/documents that users should be able to open as normal hyperlinks without embedding or downloading.

Any alternatives?

Using the <download> Component

Currently, the closest alternative to achieve standard hyperlinking for PDFs in the /assets/ or /fern/assets folder is:

  • Using the <download> component provided by Fern
  • This renders as a download button rather than a standard hyperlink
  • Shows with an external link icon (external-link-icon)

Are you interested in contributing this feature?

No

ClemMakesApps avatar Apr 23 '25 03:04 ClemMakesApps