There are some different options. You could just change the size of a regular sprite:
sprite.setSize(float width, float height);
The problem is that it will be stretched, so that doesn't really help if your sprite is anything but a solid colour.
For some cases like health-bars consisting of hearts I used a tiled drawable.
A tiled drawable repeats itself rather than stretching.
You could also use a ninepatch, which is a drawable that has the extendable parts defined. Basically think of an image that consists of 9 areas where you define where the image can stretch.
This is often used for stuff like UI and other things that need to be able to change size depending on content.
NinePatch patch = new NinePatch(new Texture(Gdx.files.internal("t.png")), 12, 12, 12, 12);
There are different ways to define the areas, this uses pixel size of the texture, but some versions use black pixels on the edges of the image.