Skip to content

Fluid

What It Does

The Fluid node calculates responsive values that smoothly scale between minimum and maximum sizes based on the viewport width. It's perfect for creating fluid typography, spacing, and other responsive design elements.

Inputs

NameDescriptionTypeRequired
Min SizeMinimum size in pixelsNumberNo
Max SizeMaximum size in pixelsNumberNo
Min ViewportMinimum viewport width in pixelsNumberNo
Max ViewportMaximum viewport width in pixelsNumberNo
ViewportCurrent viewport width in pixelsNumberNo
PrecisionNumber of decimal places in the outputNumberNo

Outputs

NameDescriptionType
ValueThe calculated fluid valueNumber

How to Use It

  1. Drag the Fluid node into your graph.
  2. Set your size range (defaults: Min Size 16px, Max Size 24px).
  3. Set your viewport range (defaults: Min Viewport 320px, Max Viewport 1920px).
  4. Connect a viewport width or use the default (768px).
  5. The output will give you a proportionally scaled value between your min and max sizes.

Tips

  • The value is automatically clamped to stay within your min and max size range.
  • You can reverse the scaling effect by setting min size larger than max size.

See Also

  • Lerp: For linear interpolation between two values.
  • Range Mapping: For mapping values from one range to another.

Use Cases

  • Responsive Typography: Create text that grows smoothly from mobile to desktop.
  • Fluid Spacing: Scale spacing values based on screen size for consistent layouts.
  • Adaptive Components: Design elements that resize proportionally to the viewport.