Glass Svelte Component

Glass renders the iOS "liquid glass" material - a translucent, frosted surface with a backdrop blur and subtle inner highlights. It is the same background used under the hood by components like Navbar, Toolbar, Tabbar and Popover, and is now exported so you can build your own glass-styled surfaces.

Any content passed to Glass is rendered inside the glass surface. By default it renders a <div>, which can be changed with the component prop:

<script>
  import { Glass } from 'konsta/svelte';
</script>

<Glass class="rounded-2xl p-4">Liquid Glass</Glass>

The glass effect is only rendered in the iOS theme. In the Material theme Glass renders as a plain element without any extra styling.

Contents

Glass Components

There are following components included:

  • Glass

Glass Props

NameTypeDefaultDescription
colorsobject

Object with Tailwind CSS colors classes

colors.bgIosstring'bg-ios-light-glass dark:bg-ios-dark-glass'
colors.shadowIosstring'shadow-ios-light-glass dark:shadow-ios-dark-glass'
highlightbooleantrue

Enables iOS "liquid glass" hover highlight effect on pointer move (iOS theme only)

Code licensed under MIT.
2026 © Konsta UI by nolimits4web
Start Page HQPaneFlow - Create Stunning Slideshows Visually. No Code Requiredt0ggles - Your ultimate multiple projects management toolSwiper Studio - Create Beautiful And Responsive Sliders Without Writing Any CodeUI Initiative - Premium templates & plugins for Swiper and Framework7Cladd - A React UI kit for building actual appsFisper - Local AI Voice Dictation for macOS