Reset Search Input

Removed the x from search inputs.

Class
Properties
reset-search-input
&::-webkit-search-decoration,
&::-webkit-search-cancel-button,
&::-webkit-search-results-button,
&::-webkit-search-results-decoration {
-webkit-appearance: none;
}

Usage

Single import

// tailwind.config.js
 
import { resetSearchInput } from "tailwindcss-addons"
 
export default {
    plugins: [resetSearchInput()],
}

Multi import

// tailwind.config.js
 
import { allAddons } from "tailwindcss-addons"
 
export default {
    plugins: [
        ...allAddons({
            resetSearchInput: false, // Enabled by default.
        }),
    ],
}

Options

function resetSearchInput(options?: { base?: boolean })

base

If set to true the reset-search-input class gets included in the base styles as:

input[type="search"] {
    @apply reset-search-input;
}
Return to top