Label at the side for different components

I am new to Vaadin and I was wondering how can we set the label for a component to its side(left).
Also I’ve tried the formlayout and adding as formitems but that get’s a bit messy with long labels.

Any other ways to do this?

Hi Bhavith.

If you want to set the label of components to its side (left) but you’re going to use long labels, that could be a problem. In fact having the possibility of setting the position so the fields are below the labels is the wait to go if you have long labels. But one thing that you could do to deal with long labels is to use something like this for the labels:

    display: inline-block;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: var(--vaadin-form-item-label-width);

This would display three dots (…) if the label is too big.

How does it sound?

I need the whole label so this is not an option.
I wrapped a span and field in a Div. That works good enough for my use so I’ll stick to that.

Just wanted to know when Label was deprecated was any alternate added or not?

Did you read the javadoc or warning in the log or deprecation?