# hide components until defined

[browser](https://lochiwei.gitbook.io/web/browser) ⟩ [web components](https://lochiwei.gitbook.io/web/component) ⟩ hide components

{% tabs %}
{% tab title="💈範例" %}

```css
/*  make <search-box> invisible before defined */ 
search-box:not(:defined) {

    opacity: 0;
    
    /* try to duplicate its eventual layout and size so that */
    /* nearby content does not move when it becomes defined. */
    display: inline-block; 
    width: 300px; 
    height: 50px;
}
```

{% endtab %}

{% tab title="📗 參考" %}

* [ ] :green\_book: JavaScript: The Definitive Guide (15.6 Web Components)
  {% endtab %}

{% tab title="👥 相關" %}

* [css](https://lochiwei.gitbook.io/web/css "mention")
* [client-side-javascript-timeline](https://lochiwei.gitbook.io/web/browser/event/client-side-javascript-timeline "mention") - components are not defined until fully loaded.
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lochiwei.gitbook.io/web/component/use/hide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
