xl vision
  • Component
  • React Hooks
  • Playground
  • Overview
  • Color
  • Getting Start
    • Installation
  • General
    • Icon
    • Button
  • Layout
    • Grid
  • Form
    • Input
    • InputNumber
    • Textarea
  • Navigation
    • Dropdown
    • Affix
    • BackTop
    • Anchor
  • Data Display
    • Tooltip
    • Popover
    • Avatar
  • Faceback
    • Popconfirm
    • Dialog
    • Message
    • Notication
  • Animation
    • Transition
    • TransitionGroup
    • CollapseTransition
    • Ripple
  • Styles
    • Theme
    • CssBaseline
  • Basic Component
    • BaseButton
    • Portal
    • Popper
    • Modal
    • ResizeObserver

Portal

Sub-components can be flexibly and conveniently mounted to components in other locations.

Examples

container1

container2

Basic

The button belongs to container1 in the tree structure of react, and belongs to container2 in the structure of dom, You can try to click the button and the event will be captured by container1.

Properties

PropertyDescriptionTypeDefaultRequire
containerSpecify the parent node to mount, support strings, node instances or functions that return thesestring | Element | (() => string | Element)-false
childrenChild nodeReactNode-true
Examples
Basic
Properties
Copyright © 2020-2021 Rhys Xia