Welcome to TailwindFS
This is a sample HTML file demonstrating the
as="html" render mode.
- Sanitized with DOMPurify
- Safe for dangerouslySetInnerHTML
- XSS protection built-in
Server components + HTML rendering = powerful content displays
Like TailwindCSS, but for fs.readFile().
className your way to file content!
<FS className="fs-$readme-lines-1-3" />This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). ## Getting Started
Alias mode — use predefined aliases from config
fs-$alias[-modifiers...]
fs-$aliasAlias from config
-lines-1-10Line selection
-match-ERRORGrep pattern
-prop-nameJSON extraction
-col-emailCSV column
as="table"Render format
Direct path mode — access paths from allowedPaths
fs-$@./path/to/file[-modifiers...]
fs-$@./pathDirect path with @
fs-$@.Current directory
fs-$@@aliasEscape @ in alias
Browse any path within allowedPaths using @ prefix
<FS className="fs-$@.-detail" as="table" />| Name | Size | Modified |
|---|---|---|
| .next/ | - | 1/26/2026 |
| .turbo/ | - | 1/26/2026 |
| app/ | - | 1/26/2026 |
| components/ | - | 1/26/2026 |
| lib/ | - | 1/26/2026 |
| public/ | - | 1/26/2026 |
| .gitignore | 614B | 1/26/2026 |
| eslint.config.mjs | 450B | 1/26/2026 |
| next-env.d.ts | 247B | 1/26/2026 |
| next.config.ts | 169B | 1/26/2026 |
| package.json | 1.2KB | 1/26/2026 |
| postcss.config.mjs | 90B | 1/26/2026 |
| README.md | 1.4KB | 1/26/2026 |
| seed-auth.ts | 3.0KB | 1/26/2026 |
| seed.ts | 7.4KB | 1/26/2026 |
| tailwind-crypto.config.ts | 172B | 1/26/2026 |
| tailwind-fs.config.ts | 553B | 1/26/2026 |
| tailwindauth.db | 4.0KB | 1/26/2026 |
| tailwindauth.db-shm | 32.0KB | 1/26/2026 |
| tailwindauth.db-wal | 80.5KB | 1/26/2026 |
| tsconfig.json | 613B | 1/26/2026 |
Traversal protection, blocked patterns, and symlink checks still apply
Render HTML files safely with DOMPurify sanitization
<FS className="fs-$samplehtml" as="html" />
This is a sample HTML file demonstrating the
as="html" render mode.
Server components + HTML rendering = powerful content displays
XSS protection built-in - scripts, event handlers, and dangerous elements stripped
Edit the alias, modifiers, and format to see live results
<FSClient className="fs-$readme-lines-1-10" as="pre" />Available aliases and their file previews
$readmeREADME.mdThis is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). ## Getting Started
$packagepackage.json{
"name": "@tailwind-stack/landing",
"version": "0.1.0",$nextconfignext.config.tsimport type { NextConfig } from "next";
const nextConfig: NextConfig = {$srcappai/ api/ auth/ crypto/ env/ fetch/ form/ fs/ qr/ sql/ favicon.ico globals.css layout.tsx page.tsx
$componentscomponentsai/ auth/ common/ fetch/ form/ fs/ qr/ sql/
$samplepublic/sample.json{
"name": "TailwindFS Demo",
"version": "1.0.0",$samplecsvpublic/sample.csvid,name,email,role,active 1,Alice,alice@example.com,admin,true 2,Bob,bob@example.com,user,true
$samplehtmlpublic/sample.html<article> <h1>Welcome to TailwindFS</h1> <p>
$logspublic/sample.log2024-01-15 10:00:00 [INFO] Server started on port 3000 2024-01-15 10:00:05 [DEBUG] Connected to database 2024-01-15 10:00:10 [INFO] Loading configuration...
Different ways to read and render file content
// tailwind-fs.config.tsexport default { // Named aliases aliases: { readme: "README.md", logs: "logs/app.log" }, // Direct path access (optional) allowedPaths: ["."], // "." = project root}// In your componentimport { FS } from "@tailwind-stack/fs"// Using alias<FS className="fs-$readme" as="pre" />// Using direct path (requires allowedPaths)<FS className="fs-$@./src" as="table" />// Grep errors from log<FS className="fs-$logs-match-ERROR-i-limit-10" as="ul" />