मजकुराकडे जा
Yuva subscribe formमेनू

Yuva subscribe form

A mailing list sign-up form: e-mail, optional name, a checkbox per list, an unticked consent box whose sentence is stored as shown, and a switch per list for signed-in users.

पूर्वावलोकन नमुना डेटावर चालते. त्याला नेटवर्क किंवा चॅनेल लागत नाही.

इन्स्टॉलेशन

हे shadcn प्रकल्पात चालवा. फाइल्स तुमच्या स्वतःच्या कोडमध्ये कॉपी होतात.

Shell
npx shadcn@latest add https://useyuva.com/r/yuva-subscribe.json

वापर

tsx
import { YuvaSubscribe } from "@/components/yuva-subscribe"

<YuvaSubscribe server={server} channel={channel} />

Props

YuvaSubscribeProps

Propप्रकार
server?string
channel?string
client?YuvaClient
identityToken?IdentityTokenSource | null
lists?string[]
layout?"stacked" | "inline"
name?"off" | "optional" | "required"
consent?string
privacyUrl?string
locale?string
labels?Partial<YuvaSubscribeLabels>
onSubscribe?(detail: { lists: string[]; confirmation: boolean }) => void
className?string

लेबल

प्रत्येक लेबलला इंग्रजी डिफॉल्ट आहे. ते बदलण्यासाठी किंवा भाषांतरित करण्यासाठी labels ऑब्जेक्टचा काही भाग द्या.

लेबलडिफॉल्ट
lists"Lists"
email"E-mail address"
name"Your name"
nameOptional"Your name (optional)"
button"Subscribe"
sending"Subscribing…"
consent(lists, inbox) => `I want to receive e-mails about ${lists} from ${inbox}. I can unsubscribe at any time.`
privacy"Privacy policy"
checkInbox"Almost done. Check your inbox and confirm your subscription."
subscribed"Thanks! You are subscribed."
pending"Check your inbox to confirm."
chooseList"Choose at least one list."
invalidEmail"Enter a valid e-mail address."
nameRequired"Enter your name."
consentRequired"Tick the box to agree."
noEmail"Your account has no e-mail address yet."
rateLimited"Too many attempts. Wait a moment and try again."
offline"You seem to be offline."
generic"Could not subscribe. Try again."

अवलंबित्वे

हा आयटम इन्स्टॉल केल्याने खालील गोष्टीही जोडल्या जातात.

shadcn/ui चे घटक

Yuva चे इतर आयटम

npm पॅकेजेस