# ToggleButtonViewModel

#### new Cesium.ToggleButtonViewModel(command, options)
widgets/Source/ToggleButtonViewModel.js 14

A view model which exposes the properties of a toggle button.

Name | Type | Description
--- | --- | ---
`command` | Command | The command which will be executed when the button is toggled.
`options` | object | optional Object with the following properties:
Name | Type | Default | Description
--- | --- | --- | ---
`toggled` | boolean | `false` | optional A boolean indicating whether the button should be initially toggled.
`tooltip` | string | `''` | optional A string containing the button's tooltip.

### Members

#### command : Command
widgets/Source/ToggleButtonViewModel.js 48

Gets the command which will be executed when the button is toggled.

#### toggled : boolean
widgets/Source/ToggleButtonViewModel.js 30

Gets or sets whether the button is currently toggled. This property is observable.

Default Value: `false`

#### tooltip : string
widgets/Source/ToggleButtonViewModel.js 37

Gets or sets the button's tooltip. This property is observable.

Default Value: `''`

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.