Liquid Glass UI Components for React – Glisse

Description:

Glisse is a React UI component library that adds Apple-style Liquid Glass controls to web apps.

It supports glass-styled forms, action menus, and navigation, with draggable lenses on switches and selection controls.

Preview

Glisse liquid glass components

How To Use It

Install glisse

npm install glisse

Styles load with the component imports. Add a controlled switch to a settings panel:

import { useState } from "react";
import { Button, Switch } from "glisse";
export default function NotificationSettings() {
  const [enabled, setEnabled] = useState(true);
  return (
    <section>
      <label>
        Email notifications
        <Switch aria-label="Email notifications" checked={enabled} onCheckedChange={setEnabled} />
      </label>
      <Button variant="filled" onClick={() => console.log(enabled)}>
        Save preferences
      </Button>
    </section>
  );
}

Available UI Components

ComponentPurpose
ButtonGlass or accent-filled actions, with optional icons and destructive styling
SwitchBoolean selection with a draggable lens thumb
SliderContinuous or stepped numeric selection
SegmentedControlSelection between labeled options
TabBarIcon-and-label navigation with a movable selection indicator
MenuAction entries, separators, icons, and destructive items
InputText entry with an optional icon
SearchFieldSearch input with a magnifier icon and clear button
GlassA refractive container for custom content

Add Segmented Selection

Use value and onValueChange to connect a segmented control to the selected reporting period:

import { useState } from "react";
import { SegmentedControl } from "glisse";
export function ReportPeriod() {
  const [period, setPeriod] = useState("week");
  return (
    <SegmentedControl
      aria-label="Report period"
      items={[
        { value: "day", label: "Day" },
        { value: "week", label: "Week" },
        { value: "month", label: "Month" },
      ]}
      value={period}
      onValueChange={setPeriod}
    />
  );
}

Configure Controls

ComponentPropBehavior
Switchchecked / defaultCheckedControlled or initial boolean value
SwitchonCheckedChangeReceives the updated boolean
SegmentedControlitemsOptions with a string value and a renderable label
SegmentedControlvalue / defaultValueControlled or initial selection; null clears it
SegmentedControlonValueChangeReceives the selected string

Style Buttons and Custom Glass

Button defaults to variant="glass"; set variant="filled" for an accent-filled action. Pass an icon to place content before the label.

Set tint to a CSS color for a colored label or fill, and use destructive for destructive actions. An icon-only button needs an aria-label.

The default HTML button type is button; set type="submit" for form submission.

Mark the content behind a custom lens with data-glisse-backdrop. Position the marked background behind Glass within a shared container, outside the lens itself.

For unmarked backgrounds, Chromium applies live backdrop refraction and other browsers retain frost and edge lighting.

Size and shape Glass through style or className. Use --lg-glass-bend for refraction strength, --lg-glass-dispersion for color dispersion, --lg-blur for blur, and --lg-rim-shine for edge lighting.

Related Resources

Add Comment