# Tailwind Dashed Border SVG A plugin for addressing issue with customizable and animatable dashed border via tailwind interface (mostly). It uses real svg under the hood what provide the maximum flexibility. # Setup for the tailwind v4 use this in your css file: ```css @import "tailwindcss"; @plugin "tailwind-dashed-border"; ``` then prepare a component for svg in case you don't want repeat yourself everywhere. I will show it as it would look in React, but similar approach should work in any framework. ```tsx export function BorderSVG() { return ( ); } ``` and now you are ready to make your borders ```tsx
``` # Usage Example ```tsx
Content
``` ![output](./assets/example.webp) # Plugin Properties ## Setup - `dashed-border` - `dashed-border-svg` - `dashed-border-rect` ## Configuration - `dashed-border-color-[color]` - `dashed-border-width-[spacing]` - `dashed-border-length-[spacing]` - `dashed-border-gap-[spacing]` - `dashed-border-offset-[spacing]` - `dashed-border-align-["inside"/"edge"/"outside"]` - `dashed-border-align-[spacing]` (0 - inside, 1 - outside, etc.) ## Vanilla extended - `duration-[time]` - `[timing function]` (`easing-linear`, `ease-in-out`, etc.) - `transition-all` - animation may not work without it.