Teardrop

물방울

A droplet silhouette with a rounded bulb tapering to a point.

Also known as: TeardropDrop shape

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, Teardrop } from 'shaders/react'

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

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

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

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <Teardrop />
    </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: 'Teardrop',
    }
  ]
}, { disableTelemetry: true })

Props · Teardrop

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

NameValueDefaultRange / optionsDescription
originOriginSet in codecenter—Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.
colorColor#ffffff—Fill color of the teardrop
centerCenter
x0.5y0.5
{"x":0.5,"y":0.5}x, y: 0 – 1Center position of the teardrop
radiusWidth0.220.02 – 0.6 (step 0.01)Radius of the rounded bulb
heightLength0.40.1 – 0.7 (step 0.01)Length from the bulb to the point
rotationRotation00 – 360 (step 1)Rotation in degrees
softnessSoftness00 – 0.1 (step 0.001)Edge softness for antialiasing
strokeThicknessStroke Thickness00 – 0.2 (step 0.005)Stroke thickness. Zero means no stroke.
strokeColorStroke Color#000000—Color of the stroke outline
strokePositionStroke Positioncenteroutside · center · insidePosition of the stroke relative to the shape edge
colorSpaceColor Blendinglinearlinear · oklch · oklab · hsl · hsv · lchColor space for blending fill and stroke colors

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

A teardrop joins a rounded bulb to a pointed end. Its directional silhouette is familiar as a map pin or a mark for liquid, rain, or a tear.

`radius` sets the rounded bulb radius from 0.02 to 0.6. `height` is the length from the bulb to its point, from 0.1 to 0.7, and `rotation` changes the point's direction from 0 to 360 degrees. `softness` softens the edge from 0 to 0.1.

`height` measures from the bulb to the point, not the full shape height. When using it as a map pin, account for where the point indicates; when layering it with `Circle` or `Heart`, keep the point visible.

When to use

Use it for map pins, rain or tear marks, and directional badges. Its rounded body and point can guide attention together. Avoid it when you need bilateral symmetry or a shape without a point.

Open as page ↗