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

Radar

radar

Combines rings, spokes, a rotating sweep, and pointer parallax into a radar display.

Usage

Basic usage

The default main color is chart token, and the background color is transparent; placed in the relative container, it comes with absolute inset-0 z-0.

Radar
tsx
<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <Radar />
</div>

Dense ring · Double flap quick scan

ringCount/spokeCount Control ring and spoke density, sweepLobes=2 Two beams of symmetrical scanning arms at the same time.

tsx
<Radar ringCount={16} spokeCount={16} sweepSpeed={1.8} sweepLobes={2} />

Customize the main color

color Pass any CSS color to overwrite the default token, brightness brightens the entire disk.

tsx
<Radar color="oklch(0.78 0.16 165)" brightness={1.4} scale={0.45} />

Wide scan arm · No spokes

spokeCount=0 Remove the spokes, sweepWidth widen the scanning beam, turn off the mouse parallax to make a pure static background.

tsx
<Radar
  spokeCount={0}
  sweepWidth={1}
  sweepSpeed={0.8}
  enableMouseInteraction={false}
/>

When to Use

A dynamic background that requires the atmosphere of a technology/surveillance/command center, the rotation of the scanning arm is a metaphor for "real-time detection." Use DotPattern / GridPattern for regular geometric lattices/line networks; use Ripple for single-point concentric diffusion waves; Radar is the only "radar dish" in this family with rotating scanning arms + concentric rings + spokes.

Import

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

Props

NameTypeDefaultDescription
speednumber1Overall animation speed factor (ring wave diffusion + scan arm shared base time), mapped GLSL uSpeed
scalenumber0.5View scale: lower values enlarge and crop the disk; higher values shrink it and leave more margin
ringCountnumber10The number of concentric rings, the larger, the denser
spokeCountnumber10Number of spokes (radial dividers), 0 = no spokes
ringThicknessnumber0.05The thickness of the concentric ring lines, the larger, wider and softer
spokeThicknessnumber0.01Spoke line thickness
sweepSpeednumber1Scan arm rotation speed
sweepWidthnumber2Scanning arm width (power sharpness), the larger, narrower and sharper
sweepLobesnumber1Number of scanning arm flaps, 1 = single beam / 2 = symmetrical double beam
colorstringvar(--color-chart-1)Radar main color (ring/spoke/scan arm), any CSS color string
backgroundColorstring-Radar background color (resident base color), default transparent to reveal the host background
falloffnumber2Edge-attenuation exponent; higher values keep the center focused and fade the edge faster
brightnessnumber1Overall brightness ratio
enableMouseInteractionbooleantrueWhether to turn on mouse parallax (the disk moves smoothly with the pointer)
mouseInfluencenumber0.1Mouse parallax influence coefficient
classNamestring-Passthrough to the root container (or fallback div)

Slots

SlotTypeDescription
fallbackReactNodereduced-motion / static alternative content without WebGL (default radial gradient decoration div)

Usage Guidelines

  • Requires client-side rendering (WebGL/ogl), the component comes with "use client"; when placing it into the RSC page, make sure it is hung in the client subtree or dynamic import.
  • The container needs to have its own positioning + overflow-hidden, and the component will cover the parent with absolute inset-0; the radar disk will not be visible when the parent has no size.
  • Reduced-motion and non-WebGL environments render the static fallback; do not use the scanning arm to communicate essential information.

Related

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

<div className="relative h-64 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <Radar
    scale={0.5}
    ringCount={10}
    spokeCount={10}
    sweepSpeed={1}
    sweepLobes={1}
    brightness={1}
    enableMouseInteraction={true}
  />
</div>
PreviousPrismaticBurstDecorationNextRippleGrid

On this page

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