Documentation and examples for the svelte-otp-input component.
This is a SvelteKit-based documentation site for the Svelte OTP Input component. It provides guides, examples, and API documentation for integrating OTP (One-Time Password) input functionality into your Svelte applications.
- Framework: SvelteKit 2.22
- Styling: Tailwind CSS 4
- Markdown Processing: mdsvex & Marked with Shiki syntax highlighting
- Deployment: Cloudflare adapter
- Build Tool: Vite 7
- Node.js 18+ (recommended)
- npm or pnpm
npm installStart the development server:
npm run devThe site will be available at http://localhost:5173
Build for production:
npm run buildPreview the production build locally:
npm run previewnpm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run format- Format code with Prettiernpm run lint- Check code formatting
This project uses a monorepo workspace setup. Additional packages can be added in the packages/ directory.
- @sveltejs/site-kit - Site utilities and components (workspace)
- svelte-otp-input - The OTP input component being documented
- shiki - Syntax highlighting for code blocks
- marked - Markdown parser
- magic-string - String manipulation utilities
- typescript - Type support
This project uses:
- Prettier - Code formatting with Svelte and Tailwind CSS plugin support
- Svelte Linter - Via Prettier plugin
Run formatting:
npm run formatCheck formatting:
npm run lintThis site is configured to deploy on Cloudflare Pages using the @sveltejs/adapter-cloudflare adapter. Build artifacts are optimized for serverless deployment.
This project is licensed under the MIT License.