JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="checkbox"></div>
<div class="value">12345</div>
<div class='expander'>
<div class="name">Some text</div>
</div>
</div>
<div class="container">
<div class="checkbox"></div>
<div class="value">123456789</div>
<div class='expander'>
<div class="name">Some long text that won't overlap</div>
</div>
</div>
<div class="container">
<div class="checkbox"></div>
<div class="value">12354354354345</div>
<div class='expander'>
<div class="name">Some very long text that should elipse text</div>
</div>
</div>
CSS
.container {
display: block;
width: 300px;
height: 30px;
background-color: #B7B7B7;
overflow: hidden;
}
.checkbox {
display: inline-block;
margin-top: 5px;
width: 15px;
height: 15px;
background-color: green;
float: left;
}
.expander {
background-color: orange;
overflow: hidden;
display: block;
}
.name {
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
}
.value {
display: inline-block;
background-color: LightCyan;
float: right;
}