Growing menu with scrollbar

vertical scrolling menu
bootstrap 4 scrollable dropdown-menu
scrollable menu css
long drop down menu solutions
dropdown menu scroll css
responsive horizontal scroll menu
scrolling navbar bootstrap
make dropdown menu go upwards if it is at the bottom of the browser window

I hate to ask such a generic question but I'm really stuck and super hoping someone can help me along the way. Here is the situation:

I'm making the GUI for a mobile app, portrait mode. I'm using canvas scalers to scale my canvasses with a reference width of 1080. This means I effectively don't know the height of my screen space.

What I want to create is a menu with a variable amount of items. The menu must be anchored to the bottom (with an offset margin) and grow upwards. So far I've been able to manage this using VerticalLayoutGroup and anchoring the rect transform to the bottom.

But my last requirement is that if the content would grow too big, a scrollbar would appear. The definition of the content being too big is: if it would extend the (unknown) screen height ( minus the offset margin of course). I hope the following image illustrates this much clearer:

I have a unity project here:

Did you give a try to scrollView? here it is:

You can use your vertical layout inside it and you will probably want to deactivate horizontal scroll and delete the horizontal slider.

Via script you can check its rectTransform height and compare it to your container's size, when reached maxHeight you can start managing your item's sizes

Create a sticky/fixed navbar */ #navbar { overflow: hidden; background-color: #​f1f1f1; padding: 90px 10px; /* Large padding which will shrink on scroll (using JS)​  It has scrollbars now, sure (and nice CSS customized scrollbars, thanks to Webkit), but the little bubble arrow is gone. That’s because the vertical overflow is set to scroll, and that arrow is actually the combination of the list’s ::before and ::after pseudoelements, set to show up outside the list itself.

I assume you use the ScrollRect component as it is the right component to use in your case.

You can check the screen height with the Screen.height property.

Once you know the screen height you can compare it with your rect height and toggle the scrollbar with the ScrollRect.vertical property. You may have to change the ScrollRect.verticalScrollbarVisibility to permanent in order to make it work for you.

For those of us with scroll wheels of some kind on our mice (mouses?), scrollbar means mousing off the menu (and probably having it close). Icon Bar Menu Icon Accordion Tabs Vertical Tabs Tab Headers Full Page Tabs Hover Tabs Top Navigation Responsive Topnav Navbar with Icons Search Menu Search Bar Fixed Sidebar Side Navigation Responsive Sidebar Fullscreen Navigation Off-Canvas Menu Hover Sidenav Buttons Sidebar with Icons Horizontal Scroll Menu Vertical Menu Bottom Navigation Responsive Bottom Nav Bottom Border Nav Links Right Aligned Menu Links Centered Menu Link Equal Width Menu Links Fixed Menu Slide Down Bar on Scroll Hide

The answer Dave posted was close, but the problem is that the scrollview doesn't expand. I fixed it eventually by stretching the scrollview and resizing the parent manually as items are added. I set the anchors to the maximum size and adjust the sizeDelta.

public class MenuScript : MonoBehaviour

    public int MenuItemCount;
    public GameObject MenuItemPrefab;
    public Transform MenuItemParent;

    private RectTransform _rectTransform;

    void Start()
        _rectTransform = GetComponent<RectTransform>();

        for (var i = 0; i <= MenuItemCount; i++)
            GameObject instance = Instantiate(MenuItemPrefab, MenuItemParent, false);
            instance.GetComponent<Text>().text = = "Item " + i;

            float size = instance.transform.GetComponent<RectTransform>().sizeDelta.y;
            TryExpandBy(size + 10);


           private void TryExpandBy(float size)
            var deltaY = _rectTransform.sizeDelta.y + size;
            if (deltaY > 0) deltaY = 0;
            _rectTransform.sizeDelta = new Vector2(_rectTransform.sizeDelta.x, deltaY);


Growing menu with scrollbar. I hate to ask such a generic question but I'm really stuck and super hoping someone can help me along the way. I tried this method (their fiddle) to enable scrollable menu with Bootstrap, but with that approach, the scrollable menu expands its container -- fiddle -- the non-scrollable menu, correctly, does

ul class = "dropdown-menu scroll-menu" > <!-- Keep adding more list items and watch how your menu will grow w/o a vertical scollbar until it  The first few lines, 1 -5 explicitly sets the width and height of the root elements to 100%. Line 8 gives the body a background-color, line 9 takes away margin around the body, while lines 10 to

is the ability to have long dropdown menus that scroll their content. The scroll​-menu will grow dynamically until it reaches the max-height  Grow techniques: Green House Seeds recommends using the SCROG (screen of green) method with White Widow. Fill an indoor grow space with plenty of starts and begin developing a healthy canopy.

I discovered a limitation in the dropdown menu when I was tooling around in That's because the vertical overflow is set to scroll, and that arrow is The scroll-​menu will grow dynamically until it reaches the max-height (at  On the right, turn off the “Automatically Hide Scroll Bars In Windows” toggle to make sure your scrollbars don’t disappear anymore. Now that you’ve disabled the scrollbar from hiding when inactive, it will always be visible for any Windows Store app, as well as some built-in apps like Edge, Settings, and even the Start menu.