code: function isVisible (el, recursive = true) {
    const node = el && findDOMNode(el)
    // skip document or window nodes
    if (node === window || node === document || node === document.body) {
      return true
    }
    const parent = node.parentNode
    // skip text node, check parent
    if (node.nodeType === 3) {
      return isVisible(parent)
    }
  
    const style = getComputedStyle(node)
    // physically and visually hidden
    if (style.display === 'none') {
      return false
    }
    // visually hidden
    if (style.visibility === 'hidden' || style.opacity === '0') {
      return false
    }
    // hidden by clipping
    if (style.overflow === 'hidden' && style.position === 'absolute' && style.clip !== 'auto') {
      let rect = style.clip.substring(5).slice(0, -1).split(', ')
      let zeros = true
      rect.forEach((a) => {
        if (a !== '0px') {
          zeros = false
        }
      })
      if (zeros) {
        return false
      }
    }
  
    if (recursive && parent) {
      // recursively check parent visibility
      return isVisible(parent)
    } else {
      return true
    }
  }
docs: ---
  category: utilities/DOM
  ---
  
  Determine if an element is visible.
  
  @param {ReactComponent|DomNode} el - component or DOM node
  @param {boolean} recursive - by default all parent elements are checked
  recursively to accurately determine visibility. setting this to `false`
  will determine visibility based only on the styles of the given node.
  @returns {boolean} if the element is visible