@@ -12366,12 +12366,12 @@ export interface NoiseTextureProps extends ComponentProps<"svg"> {
1236612366 className?: string
1236712367 /**
1236812368 * `baseFrequency` for `feTurbulence`; higher values yield finer-grained noise.
12369- * @default 0.5
12369+ * @default 0.4
1237012370 */
1237112371 frequency?: number
1237212372 /**
1237312373 * `numOctaves` for `feTurbulence`; more octaves add detail at smaller scales.
12374- * @default 4
12374+ * @default 6
1237512375 */
1237612376 octaves?: number
1237712377 /**
@@ -12381,25 +12381,25 @@ export interface NoiseTextureProps extends ComponentProps<"svg"> {
1238112381 slope?: number
1238212382 /**
1238312383 * Opacity of the filled noise layer (`rect`).
12384- * @default 0.4
12384+ * @default 0.6
1238512385 */
1238612386 noiseOpacity?: number
1238712387}
1238812388
1238912389export const NoiseTexture = ({
1239012390 className,
12391- frequency = 0.5 ,
12392- octaves = 4 ,
12391+ frequency = 0.4 ,
12392+ octaves = 6 ,
1239312393 slope = 0.15,
12394- noiseOpacity = 0.4 ,
12394+ noiseOpacity = 0.6 ,
1239512395 ...props
1239612396}: NoiseTextureProps) => {
1239712397 const filterId = useId()
1239812398
1239912399 return (
1240012400 <svg
1240112401 className={cn(
12402- "pointer-events-none absolute inset-0 z-0 size-full opacity-50 select-none",
12402+ "pointer-events-none absolute inset-0 z-0 size-full opacity-50 select-none dark:opacity-[0.75] ",
1240312403 className
1240412404 )}
1240512405 xmlns="http://www.w3.org/2000/svg"
@@ -12441,7 +12441,7 @@ import { NoiseTexture } from "@/registry/magicui/noise-texture"
1244112441
1244212442export default function NoiseTextureDemo() {
1244312443 return (
12444- <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-neutral-100 dark:bg-neutral-950">
12444+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-neutral-100/80 dark:bg-neutral-950">
1244512445 <NoiseTexture
1244612446 className={cn(
1244712447 "absolute inset-0",
@@ -12472,8 +12472,8 @@ import { NoiseTexture } from "@/registry/magicui/noise-texture"
1247212472export default function NoiseTextureDemo2() {
1247312473 return (
1247412474 <div className="flex justify-center p-4">
12475- <Card className="bg-card relative w-full max-w-md overflow-hidden border">
12476- <NoiseTexture />
12475+ <Card className="bg-card/80 relative w-full max-w-md overflow-hidden border">
12476+ <NoiseTexture noiseOpacity={0.45} />
1247712477 <CardHeader className="relative z-10 space-y-1 pb-4">
1247812478 <CardTitle className="text-xl">The weekly digest</CardTitle>
1247912479 <CardDescription>
@@ -12517,7 +12517,10 @@ export default function NoiseTextureDemo3() {
1251712517 variant="secondary"
1251812518 >
1251912519 <span className="relative z-10 font-medium">Subscribe</span>
12520- <NoiseTexture className="transition-all group-hover/button:opacity-100" />
12520+ <NoiseTexture
12521+ noiseOpacity={0.45}
12522+ className="transition-all group-hover/button:opacity-100"
12523+ />
1252112524 </Button>
1252212525 </div>
1252312526 )
@@ -12539,7 +12542,7 @@ export default function NoiseTextureDemo4() {
1253912542 Search with texture
1254012543 </Label>
1254112544 <div className="bg-muted/30 relative overflow-hidden rounded-lg border">
12542- <NoiseTexture />
12545+ <NoiseTexture noiseOpacity={0.45} />
1254312546 <Input
1254412547 className="relative z-10 border-0 bg-transparent shadow-none focus-visible:ring-2"
1254512548 id="noise-input-demo"
0 commit comments