Chevron

셰브론

Repeating bands of two colors meet in a zigzag chevron shape.

Also known as: Chevron지그재그 줄무늬

Moves in browsers that support WebGPU

This device could not render the demo — showing a still

React
// Renders only in browsers with WebGPU.
import { Shader, Chevron } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <Chevron
        speed={0.5} />
    </Shader>
  )
}
Vue
<!-- Renders only in browsers with WebGPU. -->
<script setup lang="ts">
import { Shader, Chevron } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <Chevron
      :speed="0.5"/>
  </Shader>
</template>
Svelte
<!-- Renders only in browsers with WebGPU. -->
<script>
  import { Shader, Chevron } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <Chevron
    speed={0.5} />
</Shader>
Solid
// Renders only in browsers with WebGPU.
import { Shader, Chevron } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <Chevron
        speed={0.5} />
    </Shader>
  )
}
JavaScript
// Renders only in browsers with WebGPU.
// expects <canvas id="canvas" style="width:100%;height:320px"></canvas> on the page
import { createShader } from 'shaders/js'

const shader = await createShader(document.getElementById("canvas"), {
  components: [
    {
      type: 'Chevron',
      props: {
        speed: 0.5,
      },
    }
  ]
}, { disableTelemetry: true })

Props · Chevron

Changes apply to the demo above and to the code tabs. Descriptions come from the library registry (MIT).

NameValueDefaultRange / optionsDescription
colorAColor A#000000—First color
colorBColor B#ffffff—Second color
countCount51 – 30 (step 1)Number of chevron pairs visible
angleAngle0-180 – 180 (step 1)Rotation angle of the chevrons
balanceBalance0.50 – 1 (step 0.01)Ratio of the two colors
softnessSoftness00 – 1 (step 0.01)Edge softness
speedSpeed0-2 – 2 (step 0.1)Animation speed
offsetOffset00 – 1 (step 0.01)Phase offset for pattern positioning
colorSpaceColor Spacelinearlinear · oklch · oklab · hsl · hsv · lchColor space for interpolation

Every component also takes blendMode · opacity · visible · maskSource/maskType · boundingBox · id

Like a uniform chevron or zigzag fabric, V-shaped bands repeat across the canvas. Their repeated turns guide the eye in a clear direction.

Increase `count` to show more chevron pairs, and turn their overall direction with `angle`. `balance` changes the share of each color, while `speed` controls movement. More `softness` smooths the boundary between the colors.

`speed` defaults to 0, so the pattern starts still. It fills the canvas without an input layer, but its sharp turns attract attention; lower the contrast behind text. Changing `angle` also changes the direction the pattern suggests.

When to use

Use it for directional banners, repeating textile-inspired decoration, or section dividers. Avoid it when the direction implied by the chevrons would conflict with the content's reading flow.

Open as page ↗