@guochenwang/lggc
v0.1.0
Published
Turn DOM elements into liquid glass UI with a single class.
Downloads
69
Maintainers
Readme
LGGC: Liquid Glass by GuoChen
Turn DOM element into a liquid glass UI with a single class
class="lggc".
1. 🚀 Installation
Local / direct usage
<link rel="stylesheet" href="./dist/lggc.css" />
<!-- or -->
<link rel="stylesheet" href="./dist/lggc.min.css" />CDN
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/lggc.css" />
<!-- or -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/lggc.min.css" />NPM
npm install lggc
# test how to import2. 🚀 Usage
CSS only
<div class="lggc">Hello Liquid Glass</div>Or you want to fine-tuning
The following variables are public interfaces:
--lggc-radius--lggc-padding--lggc-bg--lggc-border--lggc-blur--lggc-highlight
Example:
<div
class="lggc"
style="
--lggc-radius: 28px;
--lggc-padding: 1.25rem 1.5rem;
--lggc-bg: rgba(255,255,255,0.18);">
Customized glass
</div>3. Demo
Open index.html to preview the welcome page locally.

4. Features
- Liquid glass visual effect
- Single-class usage with
class="lggc" - CSS-only and open-source
- Super lightweight
5. Inspiration
This work draws inspiration from a video on Bilibili. Special thanks to the creator of the video for sharing such inspiring content and ideas.
