DownloadLinkIcon Stackadd a file specific Font Awesome icon to download links
This stack is more or less a sibling of the ExternalLinkIcon3 Stack, but instead of adding an icon to the end of a link to another page, it adds an icon before or after a (text) link to a downloadable file. The stack will automatically add the most appropriate Font Awesome icon based on the file extension, but you can also override its choice.
It works seamlessly together with the LinkPlus Stack, so you can now also make download links easier to use for visitors with vision and dexterity impairments in mind – and at the same time make those links look cool too.
Another nifty feature of the DownloadLinkIcon Stack is that you can optionally force a download of the file instead of the file opening in the browser. See the limitations below for browser support.
DemoVisit the demo page for examples on how this stack can improve the accessibility of your download links.
The stack recognizes extensions in lowercase and uppercase, and a mix of both: file.pdf , file.PDF and file.Pdf all work, but not in every browser. See the limitations below for the details.
Adding a class to the link to force an icon will overrule the option custom icon for all download links.
Use the option show cheat sheet to display an overview in Edit Mode of all the classes available (fig. 2).
Need help using it on a non-stacks page? Here’s a tutorial.
The option use with custom selector of the LinkPlus Stack cannot be used in this case!
So: file.pdf in every browser; file.PDF and file.Pdf does not work in aforementioned browsers.
fig. 1: add a class to a download link to force a specific icon
fig. 2: showing the DownloadLinkIcon Stack cheat sheet in Edit mode