Closed jlutteringer closed 7 months ago
For the record, this same issue also applies to Input elements
@jlutteringer the label is required for each input, select and textarea components and if you want to have them without label you need to provide some set of custom styles for each component, check the link below for an example of input component without label https://www.material-tailwind.com/docs/react/input#input-custom-styles
When using a select like so:
There is a break in the top border where the label is supposed to go - but there is no label present. This is because there is a margin applied to the :before and :after pseudo elements which construct the top of the component's border around the label. This margin still gets applied in circumstances where there is no label - resulting in a break in the border.
There is a sort of workaround by using the theme system to remove the margins, but this means that whenever you DO have a label, the border runs right into the label text.
Here's an example of what it looks like: