Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Backgrounds

  • DotPattern
  • GridPattern
  • StripedPattern
  • Spotlight
  • FadeMask
  • RetroGrid
  • Ripple
  • Meteors
  • Aurora
  • Particles
  • FlickeringGrid
  • WavyBackground
  • Silk
  • Iridescence
  • Threads
  • Orb
  • LiquidChrome
  • Balatro
  • Ballpit
  • Beams
  • ColorBends
  • DarkVeil
  • Dither
  • DotField
  • EvilEye
  • FaultyTerminal
  • Ferrofluid
  • FloatingLines
  • Galaxy
  • GradientBlinds
  • Grainient
  • GridDistortion
  • GridMotion
  • GridScan
  • Hyperspeed
  • LetterGlitch
  • Lightfall
  • Lightning
  • LightPillar
  • LightRays
  • LineWaves
  • LiquidEther
  • PixelBlast
  • PixelSnow
  • Plasma
  • PlasmaWave
  • Prism
  • PrismaticBurst
  • Radar
  • RippleGrid
  • ShapeGrid
  • SideRays
  • SoftAurora

Overlay Effects

  • BorderBeam
  • ShineBorder
  • GlareHover
  • Lens
  • AnimatedBeam
  • OrbitingCircles
  • ProgressiveBlur
  • CardSpotlight
  • Reveal
  • Antigravity
  • BlobCursor
  • ClickSpark
  • Crosshair
  • ElectricBorder
  • GhostCursor
  • GradualBlur
  • ImageTrail
  • LaserFlow
  • MagicRings
  • Magnet
  • MagnetLines
  • MetaBalls
  • MetallicPaint
  • OrbitImages
  • PixelTrail
  • PixelTransition
  • Ribbons
  • ShapeBlur
  • SplashCursor
  • StarBorder
  • StickerPeel
  • TargetCursor
  • Cubes
  • Tilt
  • BorderGlow
  • GlassIcons
  • GlassSurface
  • Lanyard
  • ModelViewer
  • FluidGlass

GlassIcons

glass-icons

Presents icon actions on layered glass tiles with 3D hover movement.

Usage

Basic usage

Incoming items (Icon + Label + Color), hover/focus See glass 3D Lift up with label slide out.

tsx
import { Heart, Star, Bell, Cloud, Zap, Settings } from "lucide-react";

<GlassIcons
  columns={3}
  items={[
    { icon: <Heart />, label: "Collection", color: "red" },
    { icon: <Star />, label: "Star", color: "orange" },
    { icon: <Bell />, label: "Notification", color: "blue" },
    { icon: <Cloud />, label: "Cloud", color: "indigo" },
    { icon: <Zap />, label: "Lightning", color: "purple" },
    { icon: <Settings />, label: "Settings", color: "green" },
  ]}
/>

Number of grid columns

columns controls the number of grid columns, and narrow screens automatically fall back to 2 columns.

tsx
<GlassIcons
  columns={2}
  items={[
    { icon: <Heart />, label: "Collection", color: "red" },
    { icon: <Star />, label: "Star", color: "orange" },
    { icon: <Bell />, label: "Notification", color: "blue" },
    { icon: <Cloud />, label: "Cloud", color: "indigo" },
  ]}
/>

Monochrome theme color

color passes 'primary' to let the luminous panel take the main color of the theme and automatically adapt to light and shade.

tsx
<GlassIcons
  columns={2}
  items={[
    { icon: <Heart />, label: "Like", color: "primary" },
    { icon: <Star />, label: "Collection", color: "primary" },
  ]}
/>

Custom gradient color

color In addition to the default name, you can also pass any CSS gradient string.

tsx
<GlassIcons
  columns={2}
  items={[
    {
      icon: <Cloud />,
      label: "Aurora",
      color: "linear-gradient(135deg, var(--color-chart-1), var(--color-chart-4))",
    },
    {
      icon: <Zap />,
      label: "Warm Orange",
      color: "linear-gradient(135deg, var(--color-chart-3), oklch(0.72 0.2 30))",
    },
  ]}
/>

When to Use

Use it for a grid of labeled glass-like shortcuts with dimensional hover and focus feedback, such as feature entry points, category navigation, or quick actions. Use BorderBeam or ShineBorder to light one element's border, and GlareHover for a reflected sweep. Each GlassIcons item is interactive and needs an accessible name.

Import

ts
import { GlassIcons } from "@hulianui/ui"

Props

GlassIconsProps

NameTypeDefaultDescription
items*GlassIconItem[]-A list of icon items, rendered as glass buttons in order according to the grid
columnsnumber3Number of grid columns, narrow screen will automatically fall back to fewer columns
classNamestring-Forward the root grid container className (can cover the number of columns/spacing/alignment)
styleCSSProperties-Forward the root container inline style

GlassIconItem · Props

NameTypeDefaultDescription
label*string-hover/focus slides out the text and also acts as a button aria-label
colorstring"primary"Backside glow color, default name primary|blue|purple|red|indigo|orange|green, or any CSS color/gradient
classNamestring-Transmit this button className

GlassIconItem · Events

EventTypeDescription
onClick() => voidCallback when the icon button is clicked

GlassIconItem · Slots

SlotTypeDescription
icon*ReactNodeIcon node (usually lucide-react), rendered in the center of the glass front layer, aria-hidden

Usage Guidelines

  • label is both slide-out text and aria-label, required, do not leave blank for visual - otherwise the button will lose its accessibility name.
  • Glass luminescence is only clear on dark backgrounds, and the effect is weak on light backgrounds; color must be prefixed with --color- when feeding tokens/gradients.
  • The container needs to be overflow-visible, otherwise the 3D lift and label slide out will be cut off.

Related

BorderBeam · ShineBorder · GlareHover · Lens · AnimatedBeam · OrbitingCircles

Playground

import { Heart, Star, Bell } from "lucide-react";

<GlassIcons
  columns={3}
  items={[
    { icon: <Heart />, label: "Collection", color: "red" },
    { icon: <Star />, label: "Star", color: "orange" },
    { icon: <Bell />, label: "Notification", color: "blue" },
  ]}
/>
PreviousBorderGlowDecorationNextGlassSurface

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Usage Guidelines
    • Related
  • Playground