## Widget


A configurable widget.


Usage


``` python
Widget(
    name,
    size=100,
)
```


## Parameters


`name: str`  
Display name of the widget.

`size: int = ``100`  
Size in pixels (default 100).


## Methods

| Name | Description |
|----|----|
| [render()](#render) | Render the widget to HTML. |
| [resize()](#resize) | Resize the widget. |

------------------------------------------------------------------------


#### render()


Render the widget to HTML.


Usage


``` python
render()
```


##### Returns


`str`  
An HTML string.


------------------------------------------------------------------------


#### resize()


Resize the widget.


Usage


``` python
resize(new_size)
```


##### Parameters


`new_size: int`  
New size in pixels.


##### Raises


`WidgetError`  
If new_size is negative.
