움직이는 빛 테두리

Light Edge

도형의 가장자리를 따라 색 있는 빛이 맥박치며 움직입니다.

다른 이름: LightEdgeAnimated light edgeEdge glow

WebGPU 를 지원하는 브라우저에서 움직입니다

이 기기에서는 데모를 그리지 못해 정지 화면을 보여 줍니다

React
// WebGPU 를 지원하는 브라우저에서만 그립니다.
import { Shader, LightEdge } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <LightEdge />
    </Shader>
  )
}
Vue
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<script setup lang="ts">
import { Shader, LightEdge } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <LightEdge/>
  </Shader>
</template>
Svelte
<!-- WebGPU 를 지원하는 브라우저에서만 그립니다. -->
<script>
  import { Shader, LightEdge } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <LightEdge />
</Shader>
Solid
// WebGPU 를 지원하는 브라우저에서만 그립니다.
import { Shader, LightEdge } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <LightEdge />
    </Shader>
  )
}
JavaScript
// WebGPU 를 지원하는 브라우저에서만 그립니다.
// <canvas id="canvas" style="width:100%;height:320px"></canvas> 가 페이지에 있어야 한다
import { createShader } from 'shaders/js'

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

속성(props) · LightEdge

값을 바꾸면 위 데모와 코드 탭에 바로 반영됩니다. 설명은 라이브러리 레지스트리의 영어 원문(MIT)입니다.

이름값기본값범위·선택지설명(원문)
originOrigin코드에서 지정center—Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1Center position of the shape
scaleScale10.1 – 3 (step 0.01)Scale of the shape (1 = default size)
rotationRotation00 – 360 (step 1)Rotation of the shape in degrees
colorAColor A#7b2ff7—First border light color (used when no gradient stops are set)
colorBColor B#00e0ff—Second border light color (used when no gradient stops are set)
stopsColors코드에서 지정[{"color":"#7b2ff7","position":0},{"color":"#00e0ff","pos…—Multi-stop gradient colors (overrides Color A / Color B when set)
colorSpaceColor Spacelinearlinear · oklch · oklab · hsl · hsv · lchColor space overlapping lights blend in
thicknessThickness0.250.01 – 1 (step 0.01)Width of the border band
softnessSoftness0.50 – 1 (step 0.01)Edge softness — 0 = crisp band, 1 = wide smooth gradient
intensityIntensity0.60 – 1 (step 0.01)Brightness of the individual light spots
bloomBloom0.30 – 1 (step 0.01)How additively overlapping lights pile up — high values overdrive to white
spotsSpots31 – 5 (step 1)Number of light spots orbiting per color
spotSizeSpot Size0.50 – 1 (step 0.01)Angular size of each light spot
pulsePulse00 – 1 (step 0.01)Heartbeat pulsing — synchronizes the lights to a double-beat rhythm
smokeSmoke0.30 – 1 (step 0.01)Noisy luminous smoke drifting along the border
smokeSizeSmoke Size0.50 – 1 (step 0.01)Scale of the smoke billows
speedSpeed10 – 4 (step 0.1)Animation speed. 0 pauses.
seedSeed00 – 100 (step 1)Random seed — re-rolls spot speeds, directions and phases
shapeShape코드에서 지정{"type":"sphere3D","radius":0.35}—Serialized shape configuration (JSON)
shapeSdfUrlshapeSdfUrl코드에서 지정—URL to a pre-generated SDF .bin file
shapeTypeshapeType코드에서 지정—Active SDF shape type

모든 컴포넌트 공통: blendMode · opacity · visible · maskSource/maskType · boundingBox · id

어두운 간판의 테두리를 따라 빛이 도는 듯, 색 띠와 밝은 점이 윤곽 위를 움직입니다.

`thickness`를 올리면 테두리 띠가 넓어지고, `softness`는 경계를 또렷한 선에서 부드러운 그라디언트로 바꿉니다. `intensity`는 개별 빛점의 밝기를, `bloom`은 겹친 빛이 하얗게 번지는 정도를 조절합니다. `pulse`를 올리면 맥박처럼 빛이 강약을 반복합니다.

자체 도형 가장자리를 밝혀 단색 배경 위에서 쓰기 좋습니다. 움직이는 테두리를 작은 텍스트나 모든 버튼에 둘러 놓으면 시선이 분산될 수 있으니 한두 곳만 강조하세요.

언제 쓰나

로딩 표시, 강조 배지, 어두운 화면의 한두 개 CTA 테두리에 어울립니다. 모든 컨트롤이나 긴 텍스트를 둘러 반복 사용하지 마세요.

페이지로 열기 ↗