tailwindcss/docs/source/docs/user-select.blade.md
Michaël De Boey 0bc552c243
Fix wording
2017-12-02 21:11:14 +01:00

1.3 KiB

extends title description features
_layouts.documentation User Select Utilities for controlling whether the user can select text in an element.
responsive customizable hover focus
true false false false

@include('_partials.work-in-progress')

@include('_partials.class-table', [ 'rows' => [ [ '.select-none', 'user-select: none;', "Disable selecting text in an element.", ], [ '.select-text', 'user-select: text;', "Allow selecting text in an element.", ], ] ])

Customizing

Responsive, Hover, and Focus Variants

By default, only responsive variants are generated for user select utilities.

You can control which variants are generated for the user select utilities by modifying the userSelect property in the modules section of your Tailwind config file.

For example, this config will also generate hover and focus variants:

{
    // ...
    modules: { 
        // ...
        userSelect: ['responsive', 'hover', 'focus'],
    }
}

Disabling

If you aren't using the user select utilities in your project, you can disable them entirely by setting the userSelect property to false in the modules section of your config file:

{
    // ...
    modules: {
        // ...
        userSelect: false,
    }
}