Ever wondered how to show users a file right in their browser before they download it? Well, a developer just created a clever web component called «fileon» that does exactly that for almost any file type!

If you've ever built an app that accepts uploads, you know the headache of displaying files. Sending user data to Google or Microsoft viewers can be a privacy concern. Other tools like «pdf.js» only handle PDFs. Trying to combine multiple libraries for Word, Excel, code highlighting, and more quickly leads to huge file sizes, different loading screens, and error messages.

«fileon» simplifies all of this. It's one single web component that can preview PDFs, Office documents, spreadsheets, images, video, audio, code, Markdown, archives, and even fonts. And the best part? It all happens right there in the browser, keeping your users' files private.

Integrating it is super easy. A simple `import { openPreview } from 'fileon';` and then `openPreview('https://example.com/report.pdf');` is all it takes for a common case. It can even handle files from an input field, multiple files in a gallery (with arrow key navigation!), or display content inline on your page. This means you don't have to build complex preview interfaces yourself; you can rely on one component to do all the heavy lifting.

For those using frameworks like React, Vue, Svelte, or Angular, «fileon» works as a standard custom element. You just assign the file as a property. It also supports files that require authentication by letting you pass necessary headers in the request, making it incredibly flexible for various environments.

Images, PDFs, video, and audio render perfectly. CSV, TSV, and modern .xlsx spreadsheets open as interactive grids without extra dependencies, as do code (highlighted). This truly simplifies the complex task of file previews and offers a much better user experience without significant development hassle.