.slim File — Slim Template
text/x-slim
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .slim file here or click to choose
Or drop any file to identify its extension
text/x-slimQuick Facts
| Extension | .slim |
| Full Name | Slim Template |
| MIME Type | text/x-slim |
| Category | Web |
| Type | Text-based (human-readable) |
| Typical Size | 1 KB – 15 KB |
| First Appeared | 2010 |
What Is a .slim File?
Slim is a lightweight Ruby template engine that takes minimalism even further than HAML, removing nearly all syntax overhead for generating HTML. Slim uses the most concise syntax of any HTML template language — tag names without %, direct text content, smart text mode, and shortcuts for id (#) and class (.) attributes. A heading in Slim is simply "h1.title Hello" without any prefix character. Slim also supports dynamic content with = for Ruby output, - for Ruby code, and | for explicit text blocks. The template engine compiles to optimized Ruby code and is faster than both ERB and HAML in benchmarks. Slim supports template inheritance through extends/yield, includes, partials, and custom shortcuts for commonly used attributes. The format is popular in the Ruby on Rails community as an alternative to both ERB and HAML, particularly among developers who value minimal syntax and fast rendering. Slim templates produce clean, well-formatted HTML output. The engine supports streaming rendering for improved time-to-first-byte in web applications. Slim implementations exist for Ruby (native), Python, and JavaScript.
How to Open .slim Files
Related File Extensions
More Web File Extensions
Other web formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.