npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

unocss-preset-floo

v0.1.0

Published

A UnoCSS preset for fluid responsive design — interpolate any CSS value between breakpoints

Readme

unocss-preset-floo

A UnoCSS preset for fluid responsive design. Define responsive values with simple expressions that generate CSS calc() functions for smooth, viewport-aware scaling — no complex media query math required.

Try the playground

Install

npm install -D unocss-preset-floo

Setup

// uno.config.ts
import { defineConfig, presetUno } from 'unocss'
import { presetFloo } from 'unocss-preset-floo'

export default defineConfig({
  presets: [presetUno(), presetFloo()],
})

Rationale

Traditional responsive design relies on stepped breakpoints that snap between fixed layouts at arbitrary viewport widths. Floo takes a different approach: values scale smoothly with the viewport, so elements adapt fluidly rather than jumping between states.

Floo introduces the concept of sweetspots — the frame widths in your Figma file where each breakpoint's design looks pixel-perfect. When you write md:text-[~48px], you're saying "this text should be 48px at the md sweetspot width, and scale proportionally from there." This maps directly to how designers work: designs are made for a sweetspot viewport width, usually a common screen size.

Sweetspots and breakpoints are not the same. Breakpoints define where a layout breaks and warrants a reflow. Sweetspots denote the viewport width the designer had in mind when working on the design.

Floo provides three intuitive expression patterns that cover most fluid design needs:

  • Scale expressions (~48px) make values grow or shrink linearly with viewport width.
  • Ranged expressions (~16px-24px) that interpolate between two values across a breakpoint range.
  • Dampened expressions ([email protected]) scale at a reduced rate for a throttled responsive behavior.
  • All three generate the appropriate calc() functions automatically, so you never have to write verbose viewport math by hand.

Because Floo works as a UnoCSS preset, it integrates seamlessly with your existing utility classes. Any utility that accepts arbitrary values—whether w-, h-, p-, m-, gap-, text-, or others—can use fluid expressions. This means you get fluid responsive behavior without learning a new API or changing how you write styles.

Usage

Prefix any arbitrary value with ~ to create a fluid expression:

<!-- Scale: value scales linearly with viewport -->
<h1 class="md:text-[~48px]">Fluid heading</h1>

<!-- Range: interpolate between two values across a breakpoint range -->
<p class="md:text-[~16px-24px]">Grows from 16px to 24px</p>

<!-- Dampened: scales at a reduced rate -->
<div class="md:p-[[email protected]]">Half-rate padding</div>

Works with any utility that accepts arbitrary values — w-, h-, p-, m-, gap-, text-, etc.

Expressions

Scale — ~{value}{unit}

Scales linearly with viewport width relative to the sweetspot frame width.

md:text-[~48px]
→ calc(48px * 100vw / 768px)

Range — ~{start}{unit}-{end}{unit}

Interpolates between two values across the current breakpoint's range.

md:text-[~16px-24px]
→ calc(16px + 8px * (100vw - 768px) / 512px)

Dampened — ~{value}{unit}@{factor}

Scales at a reduced rate controlled by the dampening factor.

md:text-[[email protected]]
→ calc(48px * (1 + (100vw - 768px) / 768px * 0.5))

Configuration

Sweetspots

Each breakpoint has a sweetspot — the Figma frame width where that breakpoint's design looks pixel-perfect. Expressions scale relative to these sweetspots.

Defaults:

| Breakpoint | Sweetspot | | ------------- | --------- | | _ (default) | 375px | | sm | 390px | | md | 768px | | lg | 1280px | | xl | 1440px |

Override or extend with the sweetspots option:

presetFloo({
  sweetspots: {
    _: '360px',
    md: '800px',
    '2xl': '1920px',
  },
})

Sweetspot keys must match your theme's breakpoint keys (except _, which is the default/mobile breakpoint).

Development

pnpm install        # Install dependencies
pnpm build          # Build the library
pnpm test           # Run tests
pnpm test:watch     # Run tests in watch mode
pnpm playground     # Launch interactive playground
pnpm typecheck      # Type-check

License

MIT