Transition Durationv1.2.0+
@include('_partials.class-table', [ 'scroll' => true, 'rows' => $page->config['theme']['transitionDuration']->map(function ($value, $name) { $class = $name = ".duration-{$name}"; $code = "transition-duration: {$value};"; return [$class, $code]; }) ])
Usage
Use the duration-{amount}
utilities to control an element's transition-duration.
@component('_partials.code-sample', ['class' => 'bg-white flex justify-around items-center py-12'])
@slot('code')@endslot @endcomponentResponsive
To control an element's transition-duration at a specific breakpoint, add a {screen}:
prefix to any existing transition-duration utility. For example, use md:duration-500
to apply the duration-500
utility at only medium screen sizes and above.
For more information about Tailwind's responsive design features, check out the Responsive Design documentation.
Customizing
Duration values
By default Tailwind provides eight general purpose transition-duration utilities. You change, add, or remove these by customizing the transitionDuration
section of your Tailwind theme config.
@component('_partials.customized-config', ['key' => 'theme.extend.transitionDuration'])
- '0': '0ms',
- '2000': '2000ms', @endcomponent
Learn more about customizing the default theme in the theme customization documentation.
@include('_partials.variants-and-disabling', [ 'utility' => [ 'name' => 'transition-duration', 'property' => 'transitionDuration', ], 'variants' => [ 'responsive', ], ])