---
tags: [gradio-custom-component, SimpleTextbox]
title: gradio_iframecomponent
short_description: iframe
colorFrom: blue
colorTo: yellow
sdk: gradio
pinned: false
app_file: space.py
---
# `gradio_iframecomponent`
iframe
## Installation
```bash
pip install gradio_iframecomponent
```
## Usage
```python
import gradio as gr
from gradio_iframecomponent import IFrame
def create_demo():
with gr.Blocks() as demo:
gr.Markdown("# IFrame Component Demo")
iframe = IFrame(
label="Web Page Viewer",
value="https://www.gradio.app",
interactive=True,
height=500
)
url_input = gr.Textbox(
label="Enter URL",
placeholder="https://example.com"
)
load_btn = gr.Button("Load URL")
load_btn.click(
fn=lambda url: url,
inputs=url_input,
outputs=iframe
)
return demo
if __name__ == "__main__":
demo = create_demo()
demo.launch()
```
## `IFrame`
### Initialization
| name | type | default | description |
|---|---|---|---|
value |
```python str ``` | "" |
None |
src |
```python str | None ``` | None |
None |
width |
```python str | int ``` | "100%" |
None |
height |
```python str | int ``` | 400 |
None |
sandbox |
```python str | None ``` | None |
None |
interactive |
```python bool ``` | True |
None |
visible |
```python bool ``` | True |
None |
elem_id |
```python str | None ``` | None |
None |
elem_classes |
```python list[str] | str | None ``` | None |
None |
render |
```python bool ``` | True |
None |
label |
```python str | None ``` | None |
None |
show_label |
```python bool ``` | True |
None |