Changing width of components #254
-
Is it possible to change the width of components? In particular, can the "text input" component be wider than the default (or even automatically scaled to the full width of its container)? |
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Jan 17, 2023
Replies: 1 comment
-
Sure. You can either use ui.input('Name') # for reference
ui.input('Street').style('width: 200px')
ui.input('City').classes('w-20') This works for most UI elements, also for sliders: ui.slider(min=0, max=100, step=1, value=50).style('width: 200px')
ui.slider(min=0, max=100, step=1, value=50).classes('w-20') Using the full width of the parent element is possible with CSS or Tailwind: ui.input('Street').style('width: 100%')
ui.input('City').classes('w-full') |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rodja
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure. You can either use
.style
to define CSS for an element or set.classes
to use Tailwind:This works for most UI elements, also for sliders:
Using the full width of the parent element is possible with CSS or Tailwind: