React 中更小的“输入”-Bootstrap

Smaller `Input` in React-Bootstrap

如何让 Input 变小?

这是默认语法:

<Input type='text' value='' placeholder='Enter Entity'/>

这将导致:

不幸的是,与按钮不同,bsSize='xsmall' 在这种情况下不起作用。知道如何让它们变小吗? (像按钮 here

将此添加到您的 Css:

input{
    width: 150px;
    height: 50px;
}

使用 类 input-lg 用于较大的输入,或者在您的情况下使用 input-sm 用于较小的输入。这是基本的 Bootstrap 行为。

另请参阅 this Bootstrap page 了解更多信息,其中它与输入组一起使用