BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/neon-ui/create-project

CreateProject

neon-ui/create-project
FreeBlock

Create-project onboarding panel: project form on the left, the interactive region map on the right.

Install it

npx shadcn@latest add https://ui.neon.com/r/create-project.json

Source

src/blocks/create-project/create-project.tsxui.neon.com/r/create-project.json · first 6 KB
1"use client";
2
3import { Cancel01Icon, DicesIcon, ZapIcon } from "@hugeicons/core-free-icons";
4import { HugeiconsIcon } from "@hugeicons/react";
5import type { ComponentProps, FormEvent, ReactNode } from "react";
6import { useId, useRef, useState } from "react";
7
8import { RegionCard } from "@/components/region-card/region-card";
9import { RegionGlobe } from "@/components/region-globe/region-globe";
10import type { ServerRegion } from "@/components/region-select/region-select";
11import { Button } from "@/components/ui/button";
12import { Input } from "@/components/ui/input";
13import { Label } from "@/components/ui/label";
14import {
15 Select,
16 SelectContent,
17 SelectItem,
18 SelectTrigger,
19 SelectValue,
20} from "@/components/ui/select";
21import { Switch } from "@/components/ui/switch";
22import { cn } from "@/lib/utils";
23
24export interface CreateProjectValues {
25 name: string;
26 postgresVersion: string;
27 regionId: string;
28 enableAuth: boolean;
29}
30
31export type CreateProjectProps = Omit<
32 ComponentProps<"form">,
33 "onSubmit" | "title"
34> & {
35 /** Regions offered in the picker and plotted on the map. */
36 regions: ServerRegion[];
37 /** Postgres versions offered, newest first. */
38 postgresVersions?: string[];
39 /** Initial Postgres version; defaults to the first offered. */
40 defaultPostgresVersion?: string;
41 /** Initial region id; defaults to the first region. */
42 defaultRegionId?: string;
43 /** Called with the form values when Create is pressed. */
44 onSubmit?: (values: CreateProjectValues) => void;
45 /** Renders the Cancel action. */
46 onCancel?: () => void;
47 /** Renders the close button in the header. */
48 onClose?: () => void;
49 /** Locks the actions and swaps the Create label. */
50 isBusy?: boolean;
51 /** Panel heading. */
52 title?: ReactNode;
53 /** Description under the Neon Auth toggle. */
54 authDescription?: ReactNode;
55 /** Measured round-trips by region id, e.g. from useRegionPing. */
56 latencies?: Record<string, number | null | undefined>;
57 /** Hide the tilted globe under the map. */
58 hideGlobe?: boolean;
59 /** Inline field errors, e.g. from a rejected create request. */
60 errors?: Partial<Record<"name" | "region", string>>;
61};
62
63const DEFAULT_POSTGRES_VERSIONS = ["18", "17", "16"];
64
65/* Name generator: quiet adjective-noun pairs, Neon-style. */
66const NAME_ADJECTIVES = [
67 "misty",
68 "quiet",
69 "amber",
70 "bold",
71 "crimson",
72 "dawn",
73 "emerald",
74 "frosty",
75 "gentle",
76 "hidden",
77 "lunar",
78 "polished",
79 "rapid",
80 "silent",
81 "velvet",
82 "wandering",
83// … truncated

What it pulls in

npm packages

  • @hugeicons/react
  • @hugeicons/core-free-icons

Other registry items

  • utils
  • https://ui.neon.com/r/neon-tokens.json
  • https://ui.neon.com/r/button.json
  • https://ui.neon.com/r/input.json
  • https://ui.neon.com/r/select.json
  • https://ui.neon.com/r/switch.json
  • https://ui.neon.com/r/region-select.json
  • https://ui.neon.com/r/region-globe.json
  • https://ui.neon.com/r/region-card.json
  • https://ui.neon.com/r/label.json

Files it writes

  • src/blocks/create-project/create-project.tsx

Facts

Registry
neon-ui
Type
registry:block
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-04
Last confirmed
today

Go to the source

ui.neon.com neon-solutions/ui on GitHub Raw registry item This item as JSON
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex