0.0
The project is in a healthy, maintained state
Drop-in Rack middleware that injects a toggle button to render the current page as a hand-drawn-looking lo-fi wireframe. Useful for design reviews, screenshots, and concept critique.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 6.0
 Project Readme

lowfidelity

High-Fidelity to Low-Fidelity

Sometimes in life you need your Rails apps to go from Hi-Fi to Lo-Fi — and this gem does exactly that.

Drop it in, hit the floating lo-fi button, and your polished UI turns into a hand-drawn-looking black-and-white wireframe. Great for design reviews, screenshots, "what if it was a sketch" critique, and convincing stakeholders that the layout matters more than the gradient.

Install

# Gemfile
group :development do
  gem "lowfidelity"
end
bundle install

That's it. A Railtie auto-mounts the middleware in development. Restart your server and you'll see a small lo-fi button in the bottom-right corner of every HTML page.

Use

Click the button. Click it again. State persists across reloads via localStorage. Turbo Drive / Frames / Streams are left alone.

Configure (optional)

# config/initializers/lowfidelity.rb
Lowfidelity.configure do |c|
  c.path_filter = ->(path) { path.start_with?("/facilitator") }  # default: all paths
  c.font        = "Caveat"          # any Google Font name; try "Patrick Hand"
  c.default_on  = false             # auto-enable on first visit
  c.button      = true              # show the floating toggle
  # c.enabled   = true              # force-enable outside development
end

How it works

A tiny Rack middleware sniffs text/html responses and injects a <style> block, a <script>, and a Google Font link before </body>. Lo-fi mode is a single CSS class (html.lowfi-mode) that:

  • desaturates the page (filter: grayscale(1))
  • forces dashed black borders, square corners, no shadows
  • swaps every font for handwriting (Caveat by default)
  • fades images and SVGs

Skipped automatically: Turbo Frame requests, Turbo Stream responses, gzipped bodies, non-HTML content.

Caveats

  • Strict CSP without 'unsafe-inline' will block the inline payload. Fine for development; nonce support is on the roadmap.
  • This gem is dev-mode by default for a reason. Don't ship lo-fi to production unless you really mean it.

License

MIT