NexoreUI
2.0
InstallationComponentsIconsTemplatesNewGeneratorBetaNexore MakePricing
Create Project
GitHub
NexoreUI
2.0
Navigation
InstallationComponentsIconsTemplatesGeneratorBetaNexore MakeCreate Project
InstallationComponents OverviewIcons
Components (72)
ButtonAction ButtonsInputSpecialized InputsForm ControlsCheckboxSelectSwitchSliderRatingFile Upload
CardAccordionTabsTableStepperScroll AreaNavigationDockData DisplayChartsCommerceMedia & Audio
Dialog (Modal)Overlays & DrawersAlertBadgeAvatarTooltipProgressSkeletonLoadersToasterSocial & ChatTheme Toggle
Aurora Border CardAurora Search PillAI Prompt InputCommand PaletteCode Block
Physics Showcase3D Product CardsLive 3D ObjectSoundPulseSilkUnveilNode Flow Graph
NexoreUI v2.0Studio
ComponentsMoiré Grating

Moiré Grating

Optical interference canvas combining two periodic micro-gratings under drift.

PreviousText Rail
NextSwipe Deck
ResourcesFull TemplatesProProject StudioSource on GitHub

Moiré Grating

Optical interference simulator superimposing two micro-gratings under multiply blending, producing geometric interference patterns driven by pointer follower coordinates and Lissajous drift.

Interactive Stage

Move cursor over canvas to drag second layer
Controls
Pattern ModeCircles
Slit Spacing (Gap)9px
Layer Ratio1.040
Spin Speed0.050
Layer B Mix1.00

Installation & Usage

component.tsx
1import { MoireGrating } from "nexoreui";
2
3export function OpticalMoireDemo() {
4 return (
5 <div className="relative h-[440px] w-full overflow-hidden rounded-2xl">
6 <MoireGrating
7 type={0}
8 gap={9}
9 ratio={1.04}
10 rot={0.06}
11 bg="#e8ebef"
12 a="#101014"
13 b="#ff4a2b"
14 className="h-full w-full"
15 />
16 </div>
17 );
18}

API Reference

API Reference (Props)

PropTypeDefaultDescription
typenumber0Grating pattern mode (0: concentric circles, 1: parallel lines, 2: radial beams).
gapnumber9Line spacing in pixels.
dutynumber0.42Line thickness duty cycle ratio.
rationumber1.04Secondary layer scale ratio multiplier creating interference fringes.
rotnumber0.05Rotational angular velocity in radians.
driftnumber0.4Lissajous idle drift speed multiplier.
follownumber0.12Pointer tracking smoothing lag factor.
mixnumber1Multiply blend opacity of the secondary grating.
bgstring"#e8ebef"Substrate background color.
astring"#101014"Primary grating ink.
bstring"#ff4a2b"Secondary interference grating ink.
pausedbooleanfalsePause animation loop manually.