Liquid Glass React UI Component Library – LiquiKit

Build glass-styled React forms, menus, and navigation with LiquiKit, a UI component library based on Base UI and installed through shadcn.

LiquiKit is a React UI component library with refracting glass controls for forms, menus, dialogs, and navigation.

Features

  • 30+ UI components, from switches and number fields to navigation menus and toast notifications.
  • SVG displacement maps based on a curved glass lens, with refraction activated during interaction.
  • Draggable switch lenses, stretching sliders, animated tabs, and menus that expand from their triggers.
  • Base UI keyboard and focus behavior for interactive controls.
  • Light and dark themes, accent colors, and adjustable lens profiles.
  • Individual shadcn registry installs or a single command for the whole library.

How To Install LiquiKit

Install shadcn/ui in your project:

npx shadcn@latest init

Add the LiquiKit registry to the existing components.json configuration:

{
  "registries": {
    "@liquikit": "https://liquikit.dev/r/{name}.json"
  }
}

Install a UI component:

npx shadcn@latest add @liquikit/switch @liquikit/menu

Or install the complete UI component library:

npx shadcn@latest add @liquikit/all

Components are copied to components/liquikit/, with shared glass code in components/liquikit/glass/. The registry also installs the required @base-ui/react and motion dependencies.

Basic Usage in Next.js

A Next.js App Router Server Component can render LiquiKit’s exports, including the individual parts of a menu. Use GlassScope around the background and controls that should refract together.

import { GlassScope } from "@/components/liquikit/glass";
import {
  MenuItem,
  MenuPopup,
  MenuRoot,
  MenuSeparator,
  MenuTrigger,
} from "@/components/liquikit/menu";
import { Switch } from "@/components/liquikit/switch";
export default function SettingsPage() {
  return (
    <main className="mx-auto max-w-3xl p-8">
      <GlassScope
        className="overflow-hidden rounded-3xl p-8"
        backdrop={
          <div className="h-full w-full bg-gradient-to-br from-amber-200 via-sky-200 to-indigo-400" />
        }
      >
        <div className="flex flex-wrap items-center gap-5">
          <Switch defaultChecked aria-label="Email notifications" />
          <MenuRoot>
            <MenuTrigger>Project actions</MenuTrigger>
            <MenuPopup>
              <MenuItem>Duplicate</MenuItem>
              <MenuItem>Rename</MenuItem>
              <MenuSeparator />
              <MenuItem>Archive</MenuItem>
            </MenuPopup>
          </MenuRoot>
        </div>
      </GlassScope>
    </main>
  );
}

Available UI Components

Forms and Data Entry

NameDescription
AutocompleteA text field that suggests matching options as you type.
CheckboxGlass-styled checkboxes and checkbox groups.
ComboboxA searchable field with an animated dropdown list.
FieldText inputs, field groups, fieldsets, and form controls.
Number FieldA numeric stepper with a draggable scrub area.
OTP FieldA one-time passcode input with individual character slots.
RadioGlass-styled radio buttons and radio groups.
Search FieldA search input with a magnifying icon and clear button.
SelectA selection menu that expands from its trigger.
SliderA range slider whose glass thumb stretches during dragging.
SwitchA toggle whose thumb lifts into a glass lens as it moves.

Actions and Selection

NameDescription
ButtonA glass button with animated press and lighting effects.
Segmented ControlA selection control with a draggable glass indicator.
TabsTab panels and a floating tab bar with a draggable lens.
ToggleA glass button with pressed and unpressed states.
Toggle GroupRelated toggle buttons joined into a glass capsule.

Menus and Navigation

NameDescription
Context MenuA contextual action menu that opens at the pointer position.
MenuAn animated glass menu that expands from its trigger.
MenubarA row of menu triggers sharing a reshaping glass panel.
Navigation MenuNavigation links with an animated panel that changes between items.
ToolbarA glass capsule containing action buttons and separators.

Overlays and Feedback

NameDescription
AlertAn alert dialog that expands from a central glass droplet.
DialogA modal panel that expands from its trigger and closes back into it.
PopoverA glass popup that opens from an attached trigger.
Preview CardA compact glass preview linked to another element.
SheetA glass panel that rises into view and can be dragged down.
ToastNotifications that unfold from a capsule near the top edge.
TooltipA small glass popup for contextual labels or hints.

Content and Layout

NameDescription
AccordionExpandable sections with spring-driven glass transitions.
AvatarA profile image or initials displayed inside a glass disc.
MeterFrosted meter and progress indicators.
Scroll AreaA scrollable container with an overlay scrollbar and separator.

Alternatives and Related Resources

Himanshu Aggarwal

Himanshu Aggarwal

Senior Software Engineer at Diesel Laptops ยท Founder of Kaori Labs

Leave a Reply

Your email address will not be published. Required fields are marked *