logoAnt Design

⌘ K
  • 디자인
  • 개발
  • 컴포넌트
  • 블로그
  • 자료
5.21.3
  • Components Overview
  • General
    • Button
    • FloatButton
      5.0.0
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
      5.10.0
    • Grid
    • Layout
    • Space
    • Splitter
      5.21.0
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPicker
      5.5.0
    • 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
    • QRCode
      5.1.0
    • Segmented
    • Statistic
    • Table
    • Tabs
    • Tag
    • Timeline
    • Tooltip
    • Tour
      5.0.0
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
      5.1.0
  • Other
    • Affix
    • App
      5.1.0
    • ConfigProvider
    • Util
      5.13.0

FloatButton

A button that floats at the top of the page.
가져오기import{ FloatButton }from"antd";
소스components/float-button
문서
이 페이지 수정변경 로그
버전5.0.0 이후 지원됨

Resources

Ant Design Charts
Ant Design Pro
Ant Design Pro Components
Ant Design Mobile
Ant Design Mini
Ant 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 Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference
Work with Us

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

When To Use

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

Examples

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-
htmlTypeSet the original html type of button, see: MDNsubmit | reset | buttonbutton5.21.0
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-
closeIconCustomize close button iconReact.ReactNode<CloseOutlined />
placementCustomize menu animation placementtop | left | right | bottomtop5.21.0
onOpenChangeCallback executed when active menu is changed, use it with trigger(open: boolean) => void-
onClickSet the handler to handle click event (only work in Menu mode)(event) => void-5.3.0

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

글로벌 토큰어떻게 사용하나요?

Basic
codepen icon
External Link Icon
expand codeexpand code
Shape
codepen icon
External Link Icon
expand codeexpand code
FloatButton with tooltip
codepen icon
External Link Icon
expand codeexpand code
Menu mode
codepen icon
External Link Icon
expand codeexpand code
placement
codepen icon
External Link Icon
expand codeexpand code
5.21.0
badge
codepen icon
External Link Icon
expand codeexpand code
Type
codepen icon
External Link Icon
expand codeexpand code
Description
codepen icon
External Link Icon
expand codeexpand code
FloatButton Group
codepen icon
External Link Icon
expand codeexpand code
Controlled mode
codepen icon
External Link Icon
expand codeexpand code
BackTop
codepen icon
External Link Icon
expand codeexpand code
debug dot
codepen icon
External Link Icon
expand codeexpand code
_InternalPanelDoNotUseOrYouWillBeFired
codepen icon
External Link Icon
expand codeexpand code