Skip to main content
An official website of the United States government

Float

Float an item within a layout flow.

Utility Modules


Float

Places an element on the left or right side of its container, allowing text and inline elements to wrap around it.

Mixins and Functions

UtilityMixinExample
.float-valueu-float(value)@include u-float('left')@include u-float('right')@include u-float('none')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
floatFalseNone0.02 KB0.1 KB

The float utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Float utility page for a complete listing of classes.


Clearfix

Clear any floated elements

Mixins and Functions

UtilityMixinExample
.clearfixclearfix@include clearfix

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
clearfixFalseNone0.02 KB0.09 KB

Example usage

Component Preview
.float-left .float-right
<div className="clearfix border-1px">
<span class="float-left bg-secondary-light padding-2">.float-left</span>
<span class="float-right bg-secondary-light padding-2">.float-right</span>
</div>