logoNamu Design

⌘ K
  • Design
  • Development
  • Components
  • Blog
  • Resources
1.0.0
  • Components Overview
  • General
    • Button
    • FloatButtonNew
    • Icon
    • Typography
  • Layout
    • Divider
    • Grid
    • Layout
    • Space
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPickerNew
    • DatePicker
    • Form
    • Input
    • InputNumber
    • Mentions
    • Radio
    • Rate
    • Select
    • Slider
    • Switch
    • TimePicker
    • Transfer
    • TreeSelect
    • Upload
  • Data Display
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Collapse
    • Descriptions
    • Empty
    • Image
    • List
    • Popover
    • QRCodeNew
    • Segmented
    • Statistic
    • Table
    • Tabs
    • Tag
    • Timeline
    • Tooltip
    • TourNew
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
  • Other
    • Affix
    • AppNew
    • ConfigProvider
When To Use
Examples
Basic
Type
Shape
Description
FloatButton with tooltip
FloatButton Group
Menu mode
Controlled mode
BackTop
badge
API
common API
FloatButton.Group
FloatButton.BackTop
Design Token

FloatButton

  • ButtonIcon

    Resources

    Namu Design Charts
    Namu Design Pro
    Namu Design Pro Components
    Namu Design Mobile
    Namu Design Mini
    Namu Design Landing-Landing Templates
    Scaffolds-Scaffold Market
    Umi-React Application Framework
    dumi-Component doc generator
    qiankun-Micro-Frontends Framework
    ahooks-React Hooks Library
    Ant Motion-Motion Solution
    China Mirror 🇨🇳

    Community

    Awesome Namu Design
    Medium
    Twitter
    yuqueNamu Design in YuQue
    Namu Design in Zhihu
    Experience Cloud Blog
    seeconfSEE Conf-Experience Tech Conference

    Help

    GitHub
    Change Log
    FAQ
    Bug Report
    Issues
    Discussions
    StackOverflow
    SegmentFault

    Ant XTechMore Products

    yuqueYuQue-Document Collaboration Platform
    AntVAntV-Data Visualization
    EggEgg-Enterprise Node.js Framework
    kitchenKitchen-Sketch Toolkit
    xtechAnt Financial Experience Tech
    Theme Editor
    Made with ❤ by
    Ant Group and Namu Design Community

    FloatButton. Available since 5.0.0.

    When To Use

    • For global functionality on the site.
    • Buttons that can be seen wherever you browse.

    Examples

    Basic

    The most basic usage.

    expand codeexpand code
    Shape

    Change the shape of the FloatButton with shape.

    expand codeexpand code
    FloatButton with tooltip

    Setting tooltip prop to show FloatButton with tooltip.

    expand codeexpand code
    Menu mode

    Open menu mode with trigger, which could be hover or click.

    expand codeexpand code
    BackTop

    BackTop makes it easy to go back to the top of the page.

    expand codeexpand code
    Type

    Change the type of the FloatButton with type.

    expand codeexpand code
    Description

    Setting description prop to show FloatButton with description.

    supported only when shape is square. Due to narrow space for text, short sentence is recommended.

    expand codeexpand code
    FloatButton Group

    When multiple buttons are used together, <FloatButton.Group /> is recommended. By setting shape of FloatButton.Group, you can change the shape of group. shape of FloatButton.Group will override shape of FloatButton inside.

    expand codeexpand code
    Controlled mode

    Set the component to controlled mode through open, which need to be used together with trigger.

    expand codeexpand code
    badge

    FloatButton with Badge.

    expand codeexpand code

    API

    Common props ref:Common props

    This component is available since antd@5.0.0.

    common API

    PropertyDescriptionTypeDefaultVersion
    iconSet the icon component of buttonReactNode-
    descriptionText and otherReactNode-
    tooltipThe text shown in the tooltipReactNode | () => ReactNode
    typeSetting button typedefault | primarydefault
    shapeSetting button shapecircle | squarecircle
    onClickSet the handler to handle click event(event) => void-
    hrefThe target of hyperlinkstring-
    targetSpecifies where to display the linked URLstring-
    badgeAttach Badge to FloatButton. status and other props related are not supported.BadgeProps-5.4.0

    FloatButton.Group

    PropertyDescriptionTypeDefaultVersion
    shapeSetting button shape of childrencircle | squarecircle
    triggerWhich action can trigger menu open/closeclick | hover-
    openWhether the menu is visible or not, use it with triggerboolean-
    onOpenChangeCallback executed when active menu is changed, use it with trigger(open: boolean) => void-

    FloatButton.BackTop

    PropertyDescriptionTypeDefaultVersion
    durationTime to return to top(ms)number450
    targetSpecifies the scrollable area dom node() => HTMLElement() => window
    visibilityHeightThe BackTop button will not show until the scroll height reaches this valuenumber400
    onClickA callback function, which can be executed when you click the button() => void-

    Design Token

    Component Token

    Global Token