---
title: "Utilities"
description: "Built-in fluid utilities and the CSS properties they set."
canonical_url: "https://vinicunca.dev/unocss-preset/fluid/utilities"
---
# Utilities

> Built-in fluid utilities and the CSS properties they set.

Use `fluid-<utility>-<min>/<max>`. Numbers use the configured base unit (`px` by default). You can also write `fluid-<utility> fluid-<utility>-min-32 fluid-<utility>-max-64`.

Custom properties follow `--{prefix}{utility}` and `--{prefix}{utility}-{var}` (for example `--fluid-pt-min`).

## Typography and spacing

| Utility | Example | CSS properties |
| --- | --- | --- |
| `text` | `fluid-text-32/64` | `font-size` |
| `leading` | `fluid-leading-20/32` | `line-height` |
| `tracking` | `fluid-tracking-0/4` | `letter-spacing` |
| `indent` | `fluid-indent-8/24` | `text-indent` |
| `m` | `fluid-m-32/64` | `margin` |
| `mt` / `mr` / `mb` / `ml` | `fluid-mt-32/64` | `margin-*` |
| `mx` / `my` | `fluid-mx-32/64` | `margin-left` + `margin-right` / `margin-top` + `margin-bottom` |
| `p` | `fluid-p-32/64` | `padding` |
| `pt` / `pr` / `pb` / `pl` | `fluid-pt-32/64` | `padding-*` |
| `px` / `py` | `fluid-px-32/64` | `padding-left` + `padding-right` / `padding-top` + `padding-bottom` |

## Size

| Utility | Example | CSS properties |
| --- | --- | --- |
| `w` / `h` | `fluid-w-100/200` | `width` / `height` |
| `size` | `fluid-size-48/96` | `width` + `height` |
| `min-w` / `min-h` | `fluid-min-w-32/64` | `min-width` / `min-height` |
| `max-w` / `max-h` | `fluid-max-w-32/64` | `max-width` / `max-height` |
| `min-size` / `max-size` | `fluid-min-size-32/64` | `min-width` + `min-height` / `max-width` + `max-height` |
| `basis` | `fluid-basis-80/160` | `flex-basis` |

## Position

| Utility | Example | CSS properties |
| --- | --- | --- |
| `top` / `right` / `bottom` / `left` | `fluid-top-8/24` | matching inset property |
| `t` / `r` / `b` / `l` | `fluid-t-8/24` | aliases of `top` / `right` / `bottom` / `left` |
| `inset` | `fluid-inset-8/24` | `top` `right` `bottom` `left` |
| `inset-x` / `inset-y` | `fluid-inset-x-8/24` | `left` + `right` / `top` + `bottom` |

## Gap

| Utility | Example | CSS properties |
| --- | --- | --- |
| `gap` / `flex-gap` | `fluid-gap-16/32` | `gap` |
| `gap-x` / `flex-gap-x` | `fluid-gap-x-16/32` | `column-gap` |
| `gap-y` / `flex-gap-y` | `fluid-gap-y-16/32` | `row-gap` |
| `column-gap` | `fluid-column-gap-16/32` | `column-gap` |

## Borders, rings, outlines

| Utility | Example | CSS properties |
| --- | --- | --- |
| `rounded` | `fluid-rounded-4/12` | `border-radius` |
| `border` | `fluid-border-1/4` | `border-width` |
| `border-x` / `border-y` | `fluid-border-x-1/4` | left+right / top+bottom widths |
| `border-t` / `r` / `b` / `l` | `fluid-border-t-1/4` | matching side |
| `outline` | `fluid-outline-1/4` | `outline-width` |
| `outline-offset` | `fluid-outline-offset-2/8` | `outline-offset` |
| `ring` | `fluid-ring-2/8` | `--un-ring-width` |
| `ring-offset` | `fluid-ring-offset-2/8` | `--un-ring-offset-width` |

## Shadow, blur, translate

| Utility | Example | CSS properties |
| --- | --- | --- |
| `shadow` | `fluid-shadow-4/16` | `box-shadow` |
| `blur` | `fluid-blur-4/16` | `--un-blur` |
| `backdrop-blur` | `fluid-backdrop-blur-4/16` | `--un-backdrop-blur` |
| `translate` | `fluid-translate-4/16` | `--un-translate-x` and `--un-translate-y` |
| `translate-x` / `y` / `z` | `fluid-translate-x-4/16` | matching `--un-translate-*` |

Apply Wind4 `transform` when you use the translate utilities.

## Scroll

| Utility | Example | CSS properties |
| --- | --- | --- |
| `scroll-p` / `scroll-m` | `fluid-scroll-p-8/24` | `scroll-padding` / `scroll-margin` |
| `scroll-px` / `py` / `pt` / `pr` / `pb` / `pl` | `fluid-scroll-px-8/24` | matching `scroll-padding-*` |
| `scroll-mx` / `my` / `mt` / `mr` / `mb` / `ml` | `fluid-scroll-mx-8/24` | matching `scroll-margin-*` |

`scroll-pr` and `scroll-mr` are included (padding-right / margin-right).


## Sitemap

See the full [sitemap](https://vinicunca.dev/sitemap.md) for all pages.
