Skip to content

Page โ€‹



Skaya's AI-powered page generator accelerates UI development with smart, context-aware scaffolding. Generate production-ready pages with integrated api, components, styling, and documentation in seconds.

Prerequisites

This guide assumes knowledge of:

Key Features โ€‹

FeatureDescription
๐Ÿค– AI-PoweredContext-aware generation with dynamic prop/state suggestions
๐ŸŒ Language SupportTypeScript (tsx) with strict typing enforcement
๐ŸŽจ Styling OptionsCSS | SCSS | styled-components | Tailwind
๐Ÿงช Test CoverageAuto-generated Jest/Vitest + Storybook stories
๐Ÿ”„ Dependency ImportSeamlessly import existing components and APIs

Every page includes:

  • โœ… Core component file with TypeScript interface
  • โœ… Unit tests with sample test cases
  • โœ… Style file (CSS/SCSS) or CSS-in-JS setup

Creating Pages โ€‹

Interactive Mode โ€‹

bash
skaya create
# Follow the interactive prompts

Direct Generation โ€‹

bash
skaya create page --project frontend --filename profile

Quick Start with npx โ€‹

bash
npx skaya create page -p frontend -f profile

:::danger[Advanced Configuration]

Custom Template Setup (Coming in v2.0) โ€‹

skaya create page --template path/to/template.json :::

Example Workflow with Custom imports โ€‹

1: Initiate Creation โ€‹

bash
skaya create page -f profile

2: Configuration โ€‹

bash
โœ” Enter the folder where you want to create the component for profile:
myapp/src/pages
โœ” Use AI to generate the component? Yes
? Select which required components you would like to import: 
(Press <space> to select, <a> to toggle all, <i> to invert selection)
  โ—‰ component
โฏ โ—ฏ api

You can select existing components or APIs to import into your newly generated page, allowing for seamless integration and reusability. For instance, you might want to import a NftCard component and a BuyNow API into a new Profile page.

3. Import Custom Selection โ€‹

A. Import BuiltIn Componenet โ€‹

bash
โœ” Select which required components you would like to import: component, api
? Select component components to import:
(Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
โฏโ—ฏ Walletbutton
โฏโ—‰ NftCard

B. Import BuiltIn Apis โ€‹

bash
โœ” Select component components to import: Walletbutton
? Select api components to import:
โฏโ—ฏ Login
โฏโ—‰ BuyNow

4. Ai Prompt Specification For Page Generation โ€‹

bash
โœ” Select component components to import: NftCard
โœ” Select api components to import: BuyNow

--- Dependencies to be imported ---

Dependencies (component):
- NftCard

Dependencies (api):
- BuyNow
-------------------------------------------------
? Enter AI Prompt on how the files and code should work: Import the Nftcard and use BuyNow api to create a pofile page

5. File Generation Output โ€‹

bash
โœ… component file created at myapp/src/pages/ProfilePage/Pofile.tsx
โœ… component file created at myapp/src/pages/ProfilePage/Pofile.test.tsx
โœ… component file created at myapp/src/pages/ProfilePage/Pofile.css

Key Notes โ€‹

1. When using AI generation: โ€‹

- You can import existing components if needed, fostering a modular and reusable codebase.
- Provide clear, specific prompts for best results, especially when defining how imported components  or APIs should interact.
- Generated files include tests by default.

2. Folder structure: โ€‹

- Pages are created in PascalCase
- Test files are automatically paired
- CSS modules are generated by default

Import Behavior โ€‹

  • Automatic Props Binding: Imported components' props are automatically wired
  • API Hook Generation: Required API hooks are generated with proper typing
  • Dependency Tracking: All imports are tracked in the component's metadata

Updating Pages โ€‹

Learn how to modify existing pages in our Component Update Guide.