---
title: "Composables"
description: "useLiquidGlass and useLiquidGlassPreferences."
canonical_url: "https://liquid-glass.bodbod.ir/docs/api/composables"
---
# Composables

> useLiquidGlass and useLiquidGlassPreferences.

## `useLiquidGlass`

Puts glass on any element without using the component. Pass a template ref and a function that returns the options. It's the same engine `<LiquidGlass>` uses.

```ts
const el = ref<HTMLElement | null>(null)
const { isWebGL, reason, quality, refresh, relayout } = useLiquidGlass(el, () => ({
  source: img.value,
  blur: 10,
}))
```

`reason` tells you why the element is on the CSS fallback, if it is.

## `useLiquidGlassPreferences`

Reactive access to the user settings the library already responds to, in case you want to adapt your own UI to them. It's safe on the server: you get the defaults until the component has mounted.

```ts
const { reducedMotion, reducedTransparency, moreContrast, forcedColors, saveData } = useLiquidGlassPreferences()
```


## Sitemap

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