---
title: "<LiquidGlass>"
description: "Props, events and exposed methods."
canonical_url: "https://liquid-glass.bodbod.ir/docs/api/liquid-glass"
---
# <LiquidGlass>

> Props, events and exposed methods.

Everything is optional. Defaults can be changed globally through the plugin or the Nuxt module's `defaults`.

## Props

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

<tbody>
  <tr>
    <td>
      <code>
        as
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        'div'
      </code>
    </td>
    
    <td>
      The root tag
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        radius
      </code>
    </td>
    
    <td>
      <code>
        number | 'auto'
      </code>
    </td>
    
    <td>
      <code>
        'auto'
      </code>
    </td>
    
    <td>
      <code>
        'auto'
      </code>
      
       reads the computed <code>
        border-radius
      </code>
      
      , so Tailwind's <code>
        rounded-*
      </code>
      
       classes work
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        blur
      </code>
    </td>
    
    <td>
      px
    </td>
    
    <td>
      <code>
        12
      </code>
    </td>
    
    <td>
      Blur of the backdrop
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        refraction
      </code>
    </td>
    
    <td>
      0 to 1
    </td>
    
    <td>
      <code>
        0.3
      </code>
    </td>
    
    <td>
      How far the rim bends the backdrop
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        zoom
      </code>
    </td>
    
    <td>
      1 or more
    </td>
    
    <td>
      <code>
        1.1
      </code>
    </td>
    
    <td>
      Magnification
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        aberration
      </code>
    </td>
    
    <td>
      0 to 1
    </td>
    
    <td>
      <code>
        0.2
      </code>
    </td>
    
    <td>
      Colour split at the rim. <code>
        0
      </code>
      
       removes two texture reads per pixel
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        frost
      </code>
    </td>
    
    <td>
      0 to 1
    </td>
    
    <td>
      <code>
        0.08
      </code>
    </td>
    
    <td>
      Fine static grain
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        light
      </code>
    </td>
    
    <td>
      0 to 1
    </td>
    
    <td>
      <code>
        0.3
      </code>
    </td>
    
    <td>
      Strength of the highlight on the rim
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        lightAngle
      </code>
    </td>
    
    <td>
      deg
    </td>
    
    <td>
      <code>
        -55
      </code>
    </td>
    
    <td>
      Where the light comes from
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        edgeGlow
      </code>
      
      , <code>
        edgeWidth
      </code>
    </td>
    
    <td>
      0 to 1
    </td>
    
    <td>
      <code>
        0.4
      </code>
      
      , <code>
        0.25
      </code>
    </td>
    
    <td>
      Glow just inside the edge, and how wide it is
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        tint
      </code>
    </td>
    
    <td>
      CSS colour
    </td>
    
    <td>
      <code>
        'transparent'
      </code>
    </td>
    
    <td>
      Mixed over the glass according to its alpha
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        opacity
      </code>
    </td>
    
    <td>
      0 to 1
    </td>
    
    <td>
      <code>
        1
      </code>
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        source
      </code>
    </td>
    
    <td>
      element
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The <code>
        <img>
      </code>
      
      , <code>
        <video>
      </code>
      
       or <code>
        <canvas>
      </code>
      
       to refract
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        interactive
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Highlight follows the pointer. Off under reduced motion
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        quality
      </code>
    </td>
    
    <td>
      <code>
        'auto' | 'high' | 'medium' | 'low' | 'off'
      </code>
    </td>
    
    <td>
      <code>
        'auto'
      </code>
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reducedMotion
      </code>
    </td>
    
    <td>
      <code>
        'auto' | 'static' | 'fallback' | 'ignore'
      </code>
    </td>
    
    <td>
      <code>
        'auto'
      </code>
    </td>
    
    <td>
      See <a href="https://liquid-glass.bodbod.ir/docs/guide/accessibility">
        Accessibility
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        disabled
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Always use the CSS fallback
    </td>
  </tr>
</tbody>
</table>

## Events

- `ready`: the shader is running.
- `fallback(reason)`: the lens is using CSS, and `reason` says why.
- `contextlost`, `contextrestored`: the browser dropped or gave back the WebGL context.

## Exposed

`refresh()`, `relayout()`, `isWebGL`, `quality`.

The lens is re-measured after every Vue re-render and on scroll and resize. If something moves it that Vue doesn't know about, like a CSS animation or direct style writes, call `relayout()`. It costs one `getBoundingClientRect` on the next frame.


## Sitemap

See the full [sitemap](https://liquid-glass.bodbod.ir/sitemap.md) for all pages.
