DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

OverviewCompositionCerberus ContextTesting

Layout

Aspect RatioBleedBoxCenterContainerContainer QueryDividerFlexFloatGridGroupLink OverlayScrollableStackWrap

Components

AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTA ModalDate PickerDialogFieldFieldsetFile UploaderIconButtonInputLoading StatesMarqueeMenuNotificationsNumber InputPaginationPin InputPopoverProgress IndicatorsPrompt ModalRadioRatingSelectSliderSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

Utilities

Client OnlyDownload TriggerEnvironmentFeature FlagsFocus TrapForFormat ByteFormat NumberFormat Relative TimeFormat Relative TimeFrameHighlightJSON Tree ViewLocalePortalPresenceShowSwapsplitPropsTheme

Float

Used to anchor an element to the edge of a container.

  • Panda
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Import

import { Float } from 'styled-system/jsx'

Usage

Used to anchor an element to the edge of a container.

Loading example...

Placement

Use the placement prop to position the element along the edges of the container.

Loading example...

Offset X

Use the offsetX prop to offset the element along the x-axis.

Loading example...

Offset Y

Use the offsetY prop to offset the element along the y-axis.

Loading example...

Offset

Use the offset prop to offset the element along both axes.

Loading example...

Avatar

Here's an example of composing a Float component with an Avatar component.

Loading example...

Props

The Float component accepts the following utility props in addition to style and factory props:

PropTypeDescription
placementSystemStyleObject['float']The placement of the float element relative to its parent.
offsetXSystemStyleObject['marginInline']The offset along the x-axis.
offsetYSystemStyleObject['marginBlock']The offset along the y-axis.
offsetSystemStyleObject['margin']The offset along both axes.

On this page

  • Import
  • Usage
    • Placement
    • Offset X
    • Offset Y
    • Offset
    • Avatar
  • Props
Edit this page on Github
3
3
bottom-end
3
bottom-start
3
top-end
3
top-start
3
bottom-center
3
top-center
3
middle-center
3
middle-end
3
middle-start
3
3
3
User Avatar
Listening to...