Stroke

    Utilities for styling the stroke of SVG elements.

    Show all classes

    Use the utilities to change the stroke color of an SVG.


    Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:stroke-cyan-700 to only apply the stroke-cyan-700 utility on hover.

    For a complete list of all available state modifiers, check out the documentation.

    You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:stroke-cyan-700 to apply the utility at only medium screen sizes and above.

    To learn more, check out the documentation on , Dark Mode and .


    tailwind.config.js

    Alternatively, you can customize just your stroke colors by editing or theme.extend.stroke in your tailwind.config.js file.

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

    If you need to use a one-off stroke value that doesn’t make sense to include in your theme, use square brackets to generate a property on the fly using any arbitrary value.