# Pulsing Border

> Luminous trails of color merging into a glowing gradient contour. Ported from Paper Shaders (Apache-2.0).

<demo-paper-pulsing-border>



</demo-paper-pulsing-border>

## Installation

```bash
npx shadcn-vue@latest add "https://nxui.geoql.in/r/paper-pulsing-border.json"
```

## Usage

```vue
<script setup lang="ts">
  import PaperPulsingBorder from '~/components/ui/paper-pulsing-border/PaperPulsingBorder.vue';
</script>

<template>
  <div class="relative h-100 w-full overflow-hidden rounded-lg">
    <PaperPulsingBorder
      :color-back="'#000000'"
      :colors="['#0dc1fd', '#d915ef', '#ff3f2ecc']"
      :roundness="0.25"
      :thickness="0.1"
      :softness="0.75"
      :bloom="0.25"
      :speed="1"
    />
  </div>
</template>
```

## Props

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        color-back
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        '#000000'
      </code>
    </td>
    
    <td>
      Background color in any CSS color format
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        colors
      </code>
    </td>
    
    <td>
      <code>
        string[]
      </code>
    </td>
    
    <td>
      <code>
        ['#0dc1fd', '#d915ef', '#ff3f2ecc']
      </code>
    </td>
    
    <td>
      Up to 5 spot colors used in the gradient
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        roundness
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.25
      </code>
    </td>
    
    <td>
      Border radius (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        thickness
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.1
      </code>
    </td>
    
    <td>
      Border base width (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        margin
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Sets all four margin values at once; overrides margin-left/right/top/bottom
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        margin-left
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Distance from the left edge to the effect (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        margin-right
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Distance from the right edge to the effect (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        margin-top
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Distance from the top edge to the effect (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        margin-bottom
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Distance from the bottom edge to the effect (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        aspect-ratio
      </code>
    </td>
    
    <td>
      <code>
        'auto' | 'square'
      </code>
    </td>
    
    <td>
      <code>
        'auto'
      </code>
    </td>
    
    <td>
      Aspect ratio mode
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        softness
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.75
      </code>
    </td>
    
    <td>
      Border edge sharpness, 0 = hard edge, 1 = smooth gradient (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        intensity
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.2
      </code>
    </td>
    
    <td>
      Thickness of individual color spots (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bloom
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.25
      </code>
    </td>
    
    <td>
      Power of glow, 0 = normal blending, 1 = additive blending (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        spots
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        4
      </code>
    </td>
    
    <td>
      Number of spots added for each color (1 to 4)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        spot-size
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.5
      </code>
    </td>
    
    <td>
      Angular size of spots (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pulse
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.25
      </code>
    </td>
    
    <td>
      Optional pulsing animation intensity (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        smoke
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.3
      </code>
    </td>
    
    <td>
      Optional noisy shape extending the border (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        smoke-size
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.6
      </code>
    </td>
    
    <td>
      Size of the smoke effect (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        speed
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        1
      </code>
    </td>
    
    <td>
      Animation speed multiplier (0 freezes)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        frame
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Initial/seek frame for deterministic rendering
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        fit
      </code>
    </td>
    
    <td>
      <code>
        'none' | 'contain' | 'cover'
      </code>
    </td>
    
    <td>
      <code>
        'contain'
      </code>
    </td>
    
    <td>
      How the graphic fits the canvas
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        scale
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.6
      </code>
    </td>
    
    <td>
      Overall zoom level (0.01 to 4)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        rotation
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Overall rotation in degrees (0 to 360)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        origin-x
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.5
      </code>
    </td>
    
    <td>
      Horizontal origin for world positioning (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        origin-y
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0.5
      </code>
    </td>
    
    <td>
      Vertical origin for world positioning (0 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        offset-x
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Horizontal offset of the graphics center (-1 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        offset-y
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Vertical offset of the graphics center (-1 to 1)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        world-width
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Virtual world width before canvas fitting
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        world-height
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Virtual world height before canvas fitting
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        class
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Additional CSS classes
    </td>
  </tr>
</tbody>
</table>

## Attribution

Powered by [Paper Shaders](https://github.com/paper-design/shaders)
(© Lost Coast Labs, Inc., Apache-2.0) via the framework-agnostic
`@paper-design/shaders` package driven by a Vue 3 mount. This is an
unofficial community port; it is not maintained by Paper.
