---
name: "up.element.isVisible"
area: "API"
kind: "JavaScript function"
parent: "up.element module"
url: "https://unpoly.com/api/up.element.isVisible"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.element module](https://unpoly.com/api/up.element.md)</nav>

# up.element.isVisible(element)

Returns whether the given element is currently visible.

An element is considered visible if it consumes space in the document. Elements with `{ visibility: hidden }` or `{ opacity: 0 }` are considered visible since they still consume space in the layout.

Elements not attached to the DOM are considered hidden.

---

## Parameters {#parameters}

### element {#element}

(required)

The element to check.

Type: [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)

---

## Return value {#return-value}

Whether the given element is visible.

Type: boolean

