Min-Width

Utilities for setting the minimum width of an element

@include('_partials.class-table', [ 'scroll' => false, 'rows' => [ [ '.min-w-0', 'min-width: 0;', "Set the element's minimum width to 0.", ], [ '.min-w-full', 'min-width: 100%;', "Set the element's minimum width to 100%.", ], ] ])

Usage

Set the minimum width of an element using the min-w-0 or min-w-full utilities.

@component('_partials.code-sample')

min-w-full
@slot('code')
min-w-full
@endslot @endcomponent

Responsive

To control the min-width of an element at a specific breakpoint, add a {screen}: prefix to any existing min-width utility.

For more information about Tailwind's responsive design features, check out the Responsive Design documentation.

@component('_partials.responsive-code-sample') @slot('none')

Target
@endslot @slot('sm')
Target
@endslot @slot('md')
Target
@endslot @slot('lg')
Target
@endslot @slot('xl')
Target
@endslot @slot('code')
Target
@endslot @endcomponent

Customizing

Min-width scale

Customize Tailwind's default min-width scale in the theme.minWidth section of your tailwind.config.js file.

@component('_partials.customized-config', ['key' => 'theme.minWidth'])

  • '0': '0',
  • '1/4': '25%',
  • '1/2': '50%',
  • '3/4': '75%',
  • 'full': '100%', @endcomponent

Learn more about customizing the default theme in the theme customization documentation.

@include('_partials.variants-and-disabling', [ 'utility' => [ 'name' => 'min-width', 'property' => 'minWidth', ], 'variants' => [ 'responsive', ], ])

Tailwind UI is now in early access!