Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Backgrounds

  • DotPattern
  • GridPattern
  • StripedPattern
  • Spotlight
  • FadeMask
  • RetroGrid
  • Ripple
  • Meteors
  • Aurora
  • Particles
  • FlickeringGrid
  • WavyBackground
  • Silk
  • Iridescence
  • Threads
  • Orb
  • LiquidChrome
  • Balatro
  • Ballpit
  • Beams
  • ColorBends
  • DarkVeil
  • Dither
  • DotField
  • EvilEye
  • FaultyTerminal
  • Ferrofluid
  • FloatingLines
  • Galaxy
  • GradientBlinds
  • Grainient
  • GridDistortion
  • GridMotion
  • GridScan
  • Hyperspeed
  • LetterGlitch
  • Lightfall
  • Lightning
  • LightPillar
  • LightRays
  • LineWaves
  • LiquidEther
  • PixelBlast
  • PixelSnow
  • Plasma
  • PlasmaWave
  • Prism
  • PrismaticBurst
  • Radar
  • RippleGrid
  • ShapeGrid
  • SideRays
  • SoftAurora

Overlay Effects

  • BorderBeam
  • ShineBorder
  • GlareHover
  • Lens
  • AnimatedBeam
  • OrbitingCircles
  • ProgressiveBlur
  • CardSpotlight
  • Reveal
  • Antigravity
  • BlobCursor
  • ClickSpark
  • Crosshair
  • ElectricBorder
  • GhostCursor
  • GradualBlur
  • ImageTrail
  • LaserFlow
  • MagicRings
  • Magnet
  • MagnetLines
  • MetaBalls
  • MetallicPaint
  • OrbitImages
  • PixelTrail
  • PixelTransition
  • Ribbons
  • ShapeBlur
  • SplashCursor
  • StarBorder
  • StickerPeel
  • TargetCursor
  • Cubes
  • Tilt
  • BorderGlow
  • GlassIcons
  • GlassSurface
  • Lanyard
  • ModelViewer
  • FluidGlass

StripedPattern

striped-pattern

Creates diagonal stripes as a lightweight CSS decorative surface.

Usage

Basic usage

relative Place a layer of StripedPattern in the container to get a diagonal stripe background, the default is 45°, 10px unit, text-border.

tsx
<div className="relative h-48 w-full overflow-hidden rounded-xl border border-border bg-surface">
  <StripedPattern />
</div>

Angle and density

angle controls the stripe inclination angle, size controls the stripe + spacer unit width - vertical sparse stripes, that is, angle=90, size increases.

tsx
<div className="relative h-48 w-full overflow-hidden rounded-xl border border-border bg-surface">
  <StripedPattern angle={90} size={20} />
</div>

Change color (eat theme)

The stripe color is currentColor, use the text-* tool class to change the color, and the light and dark themes are automatically adapted.

tsx
<div className="relative h-48 w-full overflow-hidden rounded-xl border border-border bg-surface">
  <StripedPattern className="text-primary" />
</div>

Mask fade

Overlay mask-image to make the stripes fade toward the edges and make the background of the block softer.

tsx
<div className="relative h-48 w-full overflow-hidden rounded-xl border border-border bg-surface">
  <StripedPattern className="[mask-image:radial-gradient(closest-side,black,transparent)]" />
</div>

When to Use

Apply diagonal stripe shading to the area (warning strips/construction sense/texture separation). Use this component for stripes; DotPattern for dots, GridPattern for line grids, and Spotlight for radial glow.

Import

ts
import { StripedPattern } from "@hulianui/ui"

Props

NameTypeDefaultDescription
anglenumber45Stripe angle (degrees)
sizenumber10Width in pixels of one stripe-and-gap unit
Inherited from ComponentPropsWithoutRef<"div">. The color is currentColor and controlled by the text-* tool class.

Usage Guidelines

  • Internal absolute inset-0 is parented and must be placed inside a relative (and usually overflow-hidden) positioning container.
  • The color depends on currentColor, and text-* is used to change the color.

Related

DotPattern · GridPattern · Spotlight · RetroGrid · Ripple · Meteors

Playground

<div className="relative">
  <StripedPattern angle={45} size={10} />
</div>
PreviousGridPatternDecorationNextSpotlight

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Usage Guidelines
    • Related
  • Playground