Striped Pattern
A simple SVG-based diagonal striped pattern component. Creates clean, repeating diagonal lines that can be oriented left or right.Installation
Usage
Props
The direction of the diagonal stripes. “left” creates stripes from top-left to bottom-right, “right” creates stripes from top-right to bottom-left.
The width of the pattern tile in pixels. Controls the spacing between stripes.
The height of the pattern tile in pixels. Controls the spacing between stripes.
Additional CSS classes to apply to the SVG element. Use to control color with
text-* utilities.Examples
Left Direction Stripes
Right Direction Stripes
Wider Spacing
Narrow Spacing
Custom Color
Dense Pattern
Notes
- Purely SVG-based with no animations
- Very lightweight and performant
- Stroke width is fixed at 0.5 for clean lines
- Use Tailwind’s
text-*utilities to control stripe color - Width and height props control both size and spacing
- Pattern automatically fills the container element
- Can be combined with opacity utilities for subtle effects