tailwindcss/docs/source/docs/flexbox-display.blade.md
2017-12-03 10:36:11 -05:00

3.6 KiB

extends title description features
_layouts.documentation Flex Display Utilities for creating flex containers.
responsive customizable hover focus
true false false false

@include('_partials.class-table', [ 'rows' => [ [ '.flex', 'display: flex;', "Create a block-level flex container.", ], [ '.inline-flex', 'display: inline-flex;', "Create an inline flex container.", ], ] ])

Flex

Use .flex to create a block-level flex container:

@component('_partials.code-sample')

1
2
3
@endcomponent

Inline flex

Use .inline-flex to create an inline flex container:

@component('_partials.code-sample')

1
2
3
@endcomponent

Responsive

To control the display property of an element at a specific breakpoint, add a {screen}: prefix to any existing display utility class. For example, use md:inline-flex to apply the inline-flex utility at only medium screen sizes and above.

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

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

1
2
3
@endslot @slot('sm')
1
2
3
@endslot @slot('md')
1
2
3
@endslot @slot('lg')
1
2
3
@endslot @slot('xl')
1
2
3
@endslot @slot('code')
@endslot @endcomponent

Customizing

@include('_partials.variants-and-disabling', [ 'utility' => [ 'name' => 'flex display', 'property' => 'flexbox', ], 'variants' => [ 'responsive', ], 'extraMessage' => 'Note that modifying the flexbox property will affect which variants are generated for all Flexbox utilities, not just the display utilities.' ])