Skip to content

GlFormInput: add support for responsive sizes

Currently you can set the size prop and a CSS class will be added to the input to adjust the max-width. With this setup there is no way to make the input full width on mobile and a restricted size on desktop. This is a pretty common thing to do so we should look into ways to make this possible.

Proposal

Allow the size prop to accept an object of breakpoints:

{
  md: 'lg',
  lg: 'xl',
}

In the above the md key would be the breakpoint and lg would be size the input should be above that breakpoint.