Simple Grain
Simple grain overlay: a two-octave noise tile at overlay blend with adjustable opacity that follows the parent's corner radius. Built on the grain utility, which comes with the item.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
Installation
pnpm dlx shadcn@latest add @01orbital/simple-grainnpx shadcn@latest add @01orbital/simple-grainyarn dlx shadcn@latest add @01orbital/simple-grainbunx --bun shadcn@latest add @01orbital/simple-grainUsage
import { SideGlow } from "@/components/glow/side-glow"
import { Subheading } from "@/components/subheading/subheading"
import { SimpleGrain } from "@/components/texture/simple-grain"
const COPY = {
title: "Night notes",
body: "Written after sundown.",
} as const
export default function SimpleGrainDemo() {
return (
<div className="flex min-h-full w-full flex-1 items-center justify-center p-6">
<article className="relative isolate flex aspect-4/3 w-full max-w-96 flex-col justify-end overflow-hidden rounded-3xl bg-[oklch(0.372_0.044_257.3)] p-8 text-scene-foreground">
<SideGlow />
<SimpleGrain />
<div className="relative">
<Subheading>{COPY.title}</Subheading>
<p className="mt-3 text-sm/6">{COPY.body}</p>
</div>
</article>
</div>
)
}This example installs with everything it uses:
pnpm dlx shadcn@latest add @01orbital/simple-grain-demonpx shadcn@latest add @01orbital/simple-grain-demoyarn dlx shadcn@latest add @01orbital/simple-grain-demobunx --bun shadcn@latest add @01orbital/simple-grain-demoExamples
Mistsimple-grain-mist
Simple Grain Mist: an example of simple-grain.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
pnpm dlx shadcn@latest add @01orbital/simple-grain-mistnpx shadcn@latest add @01orbital/simple-grain-mistyarn dlx shadcn@latest add @01orbital/simple-grain-mistbunx --bun shadcn@latest add @01orbital/simple-grain-mistTerracottasimple-grain-terracotta
Simple Grain Terracotta: an example of simple-grain.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
pnpm dlx shadcn@latest add @01orbital/simple-grain-terracottanpx shadcn@latest add @01orbital/simple-grain-terracottayarn dlx shadcn@latest add @01orbital/simple-grain-terracottabunx --bun shadcn@latest add @01orbital/simple-grain-terracottaAPI reference
Overlay grain from the shared grain texture, laid over its parent and following its rounded corners. The parent needs relative.
Prop
Type
It also accepts the HTML attributes of the element it renders.
Dependencies
npm: cn. The CLI installs it for you.
Used in blocks
2 blocks are built with Simple Grain:
Last updated on