Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Customize scrollbar

Discussion in 'UI Toolkit' started by anderssonlinnea, Apr 22, 2022.

  1. anderssonlinnea

    anderssonlinnea

    Joined:
    Mar 3, 2022
    Posts:
    1
    Hi! I would like to customize the scrollbar in my UI doc, see the pictures below. Ive tried using a USS code but i do not get i to work. Keep in mind that i'm new to unity :)
     

    Attached Files:

  2. unity_emAfGUQMbV2-rw

    unity_emAfGUQMbV2-rw

    Unity Technologies

    Joined:
    Aug 26, 2020
    Posts:
    3
    You can override the unity base selectors in your own uss file. Here is one example:

    .unity-scroller--vertical {
    background-color: rgba(37, 36, 45, 0.5);
    border-left-color: rgba(0, 0, 0, 0);
    width: auto;
    border-right-color: rgba(0, 0, 0, 0);
    border-top-color: rgba(0, 0, 0, 0);
    border-bottom-color: rgba(0, 0, 0, 0);
    }