Command palette

@yasinsensoy/web

Page templates

Ready, working Next.js (App Router) pages. When writing a new page, copy the closest template first and adapt it; they show the right way to use the library (server/client split, Form + server action, *Field, skeleton loading, mobile layout). npx @yasinsensoy/web template <name> copies the files into place in the project (into src/app when it exists). Register the icon names used in the templates with UIProvider icons or replace them with your own; adjust the paths (/panel, /giris) to your project.

app-shell

App skeleton: the Sidebar main menu on the left, page content next to it. On desktop it collapses into an icon rail (⌘B / Ctrl+B) and remembers its state; on phones it becomes a bottom navigation bar. The user menu is at the bottom of the sidebar.

  • It is a server component: menu items are written on the server and icons are given by name. The active page is marked automatically from the URL (the @yasinsensoy/web/next provider wires usePathname).
  • The dashboard and settings templates are written to sit inside this skeleton (/panel, /panel/settings).
  • Icon names used: ev, grafik, sepet, kullanici, klasor, ayarlar, cikis, diger. Register them with UIProvider icons or replace them with your own names.
Copy into your project
Bash
npx @yasinsensoy/web template app-shell

Files

  • app/panel/layout.tsx

dashboard

Dashboard: summary cards (KPI) with small trend lines, a monthly income/expense chart, a traffic channels donut chart, a recent orders table and an activity feed.

  • It is a server component: data is read on the server from the functions in data.ts; only the interactive parts (chart, menu) go to the browser.
  • While loading, loading.tsx shows a skeleton in the same layout; the page does not shift.
  • On phones the cards stack and table rows turn into cards.
  • Runs at /panel inside the app-shell template; can also be used on its own.
  • Icon names used: indir, ekle, diger.
Copy into your project
Bash
npx @yasinsensoy/web template dashboard

Files

  • app/panel/page.tsx
  • app/panel/data.ts
  • app/panel/loading.tsx

login

Sign-in page: a centered card, email + password, "Forgot password", social sign-in buttons and a two-step verification code (OTP).

  • Works with a single server action (actions.ts); the two steps change in the same card, the page does not reload.
  • Correct autoComplete values are set for the browser's password manager and one-tap code filling; on Android the SMS code fills automatically via WebOTP, and the form submits itself when the code is complete.
  • Pressing and holding the eye at the end of the password field shows the password.
  • Errors appear below the field and the first invalid field is focused.
  • On phones the card is full width, and when the keyboard opens the field does not stay under it.
  • Runs outside the panel layout, with its own layout (app/login).
Copy into your project
Bash
npx @yasinsensoy/web template login

Files

  • app/login/page.tsx
  • app/login/actions.ts
  • app/login/login-form.tsx

settings

Settings page: Profile, Account, Notifications and Appearance tabs and a "Delete account" section.

  • Each tab is a separate Form and server action (actions.ts): validation happens in the browser (required, type, mask) and on the server, server errors are spread below the fields via Form state, and success is announced with toast.
  • The profile photo is picked with FileField and cropped round with edit (MediaEditor).
  • Phone uses mask="phone"; password fields reveal on press and hold.
  • The theme is changed with useTheme + ThemeView; no flicker on first paint.
  • Deletion is confirmed with await confirm(...); while deleting, the dialog's confirm button shows loading.
  • A tab can be linked to: /panel/settings?tab=account.
  • Icon names used: kullanici, kilit, zil, ayarlar.
Copy into your project
Bash
npx @yasinsensoy/web template settings

Files

  • app/panel/settings/page.tsx
  • app/panel/settings/actions.ts
  • app/panel/settings/forms.tsx