# icon_state var (atom)

Source: https://ref.dm-lang.org/atom/var/icon_state

### Default value
> null

Icons may appear differently depending on the icon state. For example, turf door icons could have "open" and "closed" states. If a state is specified that does not exist in the icon file, the default null state will be displayed if it exists.

```dm
turf/door
   icon_state = "closed"
   density = 1
   verb
      open()
         set src in view(1)
         icon_state = "open"
         density = 0
      close()
         set src in view(1)
         icon_state = "closed"
         density = 1
```

### See also
- [flick proc](https://ref.dm-lang.org/proc/flick.md)
- [icon var (atom)](https://ref.dm-lang.org/atom/var/icon.md)
- [icon_states proc](https://ref.dm-lang.org/proc/icon_states.md)
