hero-one
sv-blocks/hero-oneFreeBlock
Veil Hero component, variant One.
Install it
npx shadcn@latest add https://sv-blocks.vercel.app/r/hero-one.jsonSource
1<script lang="ts">2 // Shadcn Svelte UI Button Component3 import Button from "$COMPONENTS$/ui/button/button.svelte";45 // You can store Hero Header Component in seperate file6 // I have used snippet for better readability78 // Hero Header Component9 import { cn } from "$UTILS$";10 import Menu from "@lucide/svelte/icons/menu";11 import X from "@lucide/svelte/icons/x";12 import ArrowRight from "@lucide/svelte/icons/arrow-right";13 import ChevronRight from "@lucide/svelte/icons/chevron-right";14 import { scrollY } from "svelte/reactivity/window";1516 type MenuItem = {17 name: string;18 href: string;19 };2021 let menuItems: MenuItem[] = [22 { name: "Features", href: "#a" },23 { name: "Solution", href: "#a" },24 { name: "Pricing", href: "#a" },25 { name: "About", href: "#a" },26 ];2728 let menuState = $state(false);29 let isScrolled = $derived.by(() => {30 if (scrollY.current !== undefined && scrollY.current > 50) {31 return true;32 }33 return false;34 });3536 import {37 Beacon,38 Bolt,39 Cisco,40 Claude,41 Figma,42 FirebaseFull,43 Hulu,44 Spotify,45 SupabaseFull,46 VercelFull,47 } from "$LIB$/svgs";48</script>4950<div>51 <!-- Scroll below to see the snippet code -->52 {@render heroheader()}5354 <main class="overflow-hidden">55 <div class="absolute inset-0 isolate hidden opacity-65 contain-strict lg:block">56 <div57 class="absolute top-0 left-0 h-320 w-140 -translate-y-87.5 -rotate-45 rounded-full bg-[radial-gradient(68.54%_68.72%_at_55.02%_31.46%,hsla(0,0%,85%,.08)_0,hsla(0,0%,55%,.02)_50%,hsla(0,0%,45%,0)_80%)]"58 ></div>59 <div60 class="absolute top-0 left-0 h-320 w-60 [translate:5%_-50%] -rotate-45 rounded-full bg-[radial-gradient(50%_50%_at_50%_50%,hsla(0,0%,85%,.06)_0,hsla(0,0%,45%,.02)_80%,transparent_100%)]"61 ></div>62 <div63 class="absolute top-0 left-0 h-320 w-60 -translate-y-87.5 -rotate-45 bg-[radial-gradient(50%_50%_at_50%_50%,hsla(0,0%,85%,.04)_0,hsla(0,0%,45%,.02)_80%,transparent_100%)]"64 ></div>65 </div>66 <section>67 <div class="relative pt-24 md:pt-36">68 <div69 class="absolute inset-0 -z-10 size-full [background:radial-gradient(125%_125%_at_50%_100%,transparent_0%,var(--color-background)_75%)]"70 ></div>71 <div class="mx-auto max-w-7xl px-6">72 <div class="text-center sm:mx-auto lg:mt-0 lg:mr-auto">73 <div>74 <a75 href="#link"76// … truncated
What it pulls in
Other registry items
Files it writes
More from sv-blocks
All 64 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| call-to-action-fourcall-to-action-four | sv-blocks | Blocks | Free | no deps | |
| call-to-action-onecall-to-action-one | sv-blocks | Blocks | Free | no deps | |
| call-to-action-threecall-to-action-three | sv-blocks | Blocks | Free | no deps | |
| call-to-action-twocall-to-action-two | sv-blocks | Blocks | Free | no deps | |
| comparator-onecomparator-one | sv-blocks | Blocks | Free | no deps | |
| comparator-threecomparator-three | sv-blocks | Blocks | Free | no deps | |
| comparator-twocomparator-two | sv-blocks | Blocks | Free | no deps | |
| contact-onecontact-one | sv-blocks | Blocks | Free | no deps |
