If the user entered "number of bits" results in new HDL being written out, resynthesized, fit, and a new engine, then you can allow a variable value(I have seen this implemented). In general you want to enter a value that encompasses all possible values the user could enter. Note that you're writing hardware, so there is no true "variability" like software. (Not that there aren't things to account for variablity, but it's hard).
Also be aware that if you don't define a width, the default is large. For example, I saw someone using tons of integers where they didn't define a range. Synthesis would build huge structures, then realize most of this wasn't necessary and synthesize it out. The synthesis took many times longer than the actual place and route, and took up Gigs of memory. By putting limits, things were much more managable.