Select to view content in your preferred language

Manage input width

850
3
Jump to solution
03-31-2022 03:52 PM
LefterisKoumis
Regular Contributor II

Doesn't the calcite-input has a way to control its width?

https://developers.arcgis.com/calcite-design-system/components/input/

0 Kudos
1 Solution

Accepted Solutions
BenElan
Esri Contributor

calcite-label has a "layout" property for that:

https://developers.arcgis.com/calcite-design-system/components/label/#component-api-properties-layou...

 

<calcite-label layout="inline">Enter Tolerance:
  <calcite-input suffix-text="feet"></calcite-input>
</calcite-label>

 

 

 

View solution in original post

0 Kudos
3 Replies
BenElan
Esri Contributor

Hi @LefterisKoumis,

You can use CSS to set the width. Either directly on the input:

<calcite-input style="width:500px"></calcite-input>

 or on a parent div

<div style="width:500px">
    <calcite-input></calcite-input>
</div>
0 Kudos
LefterisKoumis
Regular Contributor II

Thank you. The reason I wanted the reduce the size is to have its label and input on the same line. It seems Calcite doesn't support something like:

LefterisKoumis_0-1648770986861.png

 

0 Kudos
BenElan
Esri Contributor

calcite-label has a "layout" property for that:

https://developers.arcgis.com/calcite-design-system/components/label/#component-api-properties-layou...

 

<calcite-label layout="inline">Enter Tolerance:
  <calcite-input suffix-text="feet"></calcite-input>
</calcite-label>

 

 

 

0 Kudos