# Changing Dock Handle Colour

**URL:** <https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [May 3, 2023, 9:41am UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188 "2023-05-03T09:41:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [May 3, 2023, 9:41am UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/1 "2023-05-03T09:41:09Z")

</div>

I am interested in using a dock handle to show if a user is logged in.

I believe you need to use the style sheet resource to achieve this:  
[Dynamically Change/Animate Docked View Handle Icon](https://forum.inductiveautomation.com/t/dynamically-change-animate-docked-view-handle-icon/68068/2)

My knowledge of CSS and how to actually achieve this ran out. Getting the information into a session property is easy, but I have no idea how to animate that dock colour using the style sheet.

Please point me in the right direction.

Assume the newest version of Ignition.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 3, 2023, 3:27pm UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/2 "2023-05-03T15:27:26Z")

</div>

I'll have to think about this for awhile, but I don't think you'll be able to manage this. The problem you'll run into is going to be changing the color based on a session state, but our built-in Session pieces (Docked Views, Popups, Notifications) don't allow for specifying their styling/appearance based on conditions because there's nothing in the Designer aside from behavioral configurations.

I think your _best_ option is going to be to use a changeScript on `session.props.auth.username` and when the value is not None or an empty string use `system.perspective.alterDock()` to modify the Docked View.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [May 3, 2023, 7:00pm UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/3 "2023-05-03T19:00:00Z")

</div>

I would much prefer to use `system.perspective.alterDock`, but the handle color doesn't seem to be exposed.

The dock auto hides, for space purposes, and I want to use the handle as a hint to open the dock

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 4, 2023, 1:41pm UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/4 "2023-05-04T13:41:17Z")

</div>

Ah, yah, we don't even expose the color during Docked View configuration. I'll try to remember to open a feature request for this when I am next in the office. For now, I don't see an avenue to achieve this.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [August 7, 2024, 11:19am UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/5 "2024-08-07T11:19:18Z")

</div>

I forgot about this, so opened an idea in case @cmallonee forgot too.

> **[Dynamic Dock Handle Colour | Ignition Features and Ideas | Inductive Automation](https://inductiveautomation.canny.io/ignition-features-and-ideas/p/dynamic-dock-handle-colour)**
>
> Allow the dock handle colour to be customisable, either by the system.perspective.alterDock function or somehow with a binding.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 7, 2024, 1:15pm UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/6 "2024-08-07T13:15:49Z")

</div>

this can be done with markdown injecting a style i guess

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [August 7, 2024, 1:17pm UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/7 "2024-08-07T13:17:46Z")

</div>

I suppose it is possible, but I do not want to implement anything that it isn't fully supported/endorsed by Inductive

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 7, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/8 "2024-08-07T13:33:55Z")

</div>

Good idea 😛

If you use the stylesheet.  
It could be done with only css if you have this thing  
(Idk if it works if you turned this off, i know its possible to turn it off but i forgot where so cant test)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/40b7ee4247daeef3540fea5ac8b428dd632aab6b.png)

```python
body:has( .username[title=""]) .view-toggle.toggle-left {
    background-color:red;
}

body:has( .username[title]:not([title=""])) .view-toggle.toggle-left {
    background-color:green;
}

```

(I just choose toggle-left only)

With ":has" you could also just do it by assigning a class somewhere through a binding and use that class in the has instead.

---

<div class="post-metadata">

**Author:** ![jmoniz](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jmoniz](https://forum.inductiveautomation.com/u/jmoniz)\
**Post date:** [July 21, 2025, 3:18pm UTC](https://forum.inductiveautomation.com/t/changing-dock-handle-colour/73188/9 "2025-07-21T15:18:05Z")

</div>

I had the color of a drag border of a docked view bugging me as well. Came here looking for a fix. Stylesheet works as expected.

```python
.dock-border.drag-border {
    background-color: var(--neutral-10) ;
}

```
