Page UI Documentation

repository·main·Indexed 23 days ago

https://github.com/pageai-pro/page-ui

A collection of free, open-source React and Next.js components and templates for building high-converting landing pages. Themeable with Tailwind CSS and inspired by Shadcn UI, it includes a CLI tool (@page-ui/wizard) for project initialization and a variety of landing page sections such as CTAs, testimonials, pricing, and bento grids.

Tokens
86.3K
Snippets
181
Records
303
Agent score
80%

What's inside Page UI

  1. Overview of @page-ui/wizard CLI

    main
    The @page-ui/wizard CLI is a tool used to install Page UI, a collection of landing page components and templates for React and Next.js. Page UI components are open source, themeable with Tailwind CSS, and designed for creating high-converting landing pages.
  2. Explore Landing Page Components

    main

    The library provides a collection of presentational components designed to work together to build landing pages. These components are located in the components/landing directory of the project. They are highly customizable and can be used individually or combined to create unique sections for your brand.

    Available component categories include:

    • Navigation & Layout: Navigation / Header, Footer, Band, Bento Grid, Marquee.
    • Call to Action (CTA): Primary Image CTA, Primary Video CTA, Primary Text CTA, Sale CTA, Discount, Cta Background Effects, Cta Text Effects.
    • Social Proof: Social Proof, Social Proof Band, Testimonial, Testimonial Grid, Testimonial List, Testimonial Inline, Rating, Showcase, Stats.
    • Product & Features: Product Card, Product Feature, Product Video Feature, Product Features Grid, Product Steps, Product Tour, Feature List, Feature, Feature Key Points.
    • Pricing: Pricing, Pricing Plan, Pricing Comparison.
    • Content & Engagement: FAQ, FAQ Collapsible, Blog List, Blog Post, Newsletter, Problem Agitator, Problem / Solution, About, Team.
    • Buttons & Badges: App Store Button, Leading Pills, Product Hunt Award.
  3. How to use text effects in Landing Page CTA sections

    main

    Text effects in this library are not standalone components, but rather Tailwind CSS patterns applied to elements passed into the titleComponent prop of CTA section components.

    These effects are designed to be used with:

    • LandingPrimaryImageCtaSection
    • LandingPrimaryTextCtaSection
    • LandingPrimaryVideoCtaSection

    To apply an effect, wrap the target text in a <span> (or similar element) and apply the corresponding Tailwind CSS classes (e.g., bg-clip-text, text-transparent, or underline with decoration-* utilities).

    /* Example of the pattern: passing a styled element to titleComponent */
    <LandingPrimaryTextCtaSection
      titleComponent={
        <h1 className="font-normal text-2xl md:text-3xl lg:text-4xl leading-tight md:max-w-2xl">
          Grow your{' '}
          <span className="font-semibold bg-gradient-to-r from-primary-500 via-primary-300 to-primary-500 bg-clip-text text-transparent">
            revenue
          </span><br/>
          across multiple channels
        </h1>
      }
      description="Description text here"
      textPosition="center"
    >
      <Button size="xl" asChild>
        <a href="#">Start Free Trial</a>
      </Button>
    </LandingPrimaryTextCtaSection>
  4. Customize LandingNewsletterSection appearance

    main

    You can use several boolean props to change the visual layout of the newsletter section:

    • Text Alignment: Use textPosition="left" or textPosition="center" to control where the title and description are placed.
    • Backgrounds: Use withBackground to enable a background color or withBackgroundGlow to enable a glowing background effect.
    • Social Proof: Use withAvatars (defaults to true) to show user images. This is often paired with passing custom children like LandingSocialProof to increase conversion rates.
    • Visual Variants: Use variant and backgroundGlowVariant with values 'primary' or 'secondary' to switch between different theme styles.
  5. Customize LandingStatsSection layout and styling

    main

    You can customize the appearance of the LandingStatsSection using several props:

    • Title & Description: Use title and description to add a heading and subtext to the section.
    • Grid Layout: Control columns via columnsDesktop and columnsMobile.
    • Borders: Toggle borders using hasBorders (boolean).
    • Backgrounds: Enable a background with withBackground. You can set the variant (e.g., "secondary") to change the background style.
    • Glow Effects: Enable a background glow with withBackgroundGlow. Use backgroundGlowVariant (e.g., "secondary") to control the glow color/style.
    <LandingStatsSection
      title="Our Achievements"
      description="We take pride in our accomplishments."
      columnsDesktop={4}
      columnsMobile={1}
      hasBorders={false}
      withBackground={true}
      variant="secondary"
      withBackgroundGlow={true}
      backgroundGlowVariant="secondary"
      stats={[
        { value: '15+', label: 'apps', description: 'Projects delivered.' }
      ]}
    />
  6. Customize LandingHeader with logos, backgrounds, and variants

    main

    You can customize the LandingHeader appearance using several patterns:

    Custom Logo Pass a React element to the logoComponent prop.

    Background and Variants Use withBackground to add a background (centered on larger screens). Combine this with the variant prop ('primary' or 'secondary') to control the background color.

    Icon Buttons To include icons or specialized buttons, use LandingHeaderMenuItem with type="icon-button" and pass a React element (like a Lucide icon) to the label prop.

    // Example with custom logo, background, and secondary variant
    <LandingHeader
      logoComponent={<Image width={40} height={40} src="/logo.png" />}
      withBackground
      variant="secondary"
    >
      <LandingHeaderMenuItem href="/" label="Home" />
      <LandingHeaderMenuItem href="#" label={<SearchIcon />} type="icon-button" variant="ghost" />
    </LandingHeader>
  7. Customize LandingPricingPlan appearance and state

    main

    You can modify the visual state and pricing display of the LandingPricingPlan using specific props:

    • Price Suffix: Use priceSuffix to add text like /mo or /year after the price.
    • Highlighting: Use highlighted for visual emphasis or featured to make a plan stand out (often used for higher-tier plans).
    • Discounts: Use discountPrice to show a sale price alongside the main price.
    • Sold Out State: Use soldOut to disable the CTA button when a plan is unavailable.
    // Example: Discounted plan
    <LandingPricingPlan
      title="Pro"
      price="$20"
      discountPrice="$10"
    >
      <p>Feature 1</p>
    </LandingPricingPlan
    
    // Example: Sold out plan
    <LandingPricingPlan
      title="Pro"
      price="$20"
      soldOut
    >
      <p>Feature 1</p>
    </LandingPricingPlan>
  8. How LandingBlogPost adapts to LandingBlogList

    main

    When LandingBlogPost is used as a child of a LandingBlogList component, it inherits contextual styling and layout logic automatically:

    • Automatic image positioning: The component detects if it is in a grid or list layout. In a grid, images are positioned at the top. In a list, images are positioned on the right.
    • Container styling: Padding, spacing, and borders are automatically adjusted to fit the parent section.
    • Priority logic: If you provide an explicit imagePosition prop to the LandingBlogPost, it will override the automatic positioning logic.

    The component provides full responsive and dark mode support out of the box when used within this parent context.

  9. How Bento Grid components work together

    main

    The Bento Grid system is composed of a main container, LandingBentoGridSection, and several specialized child items designed for specific content types. The container manages the grid layout, columns, and rows, while the child items provide pre-designed layouts for displaying icons, metrics, or images. You can mix and match these specialized items or use generic children to create complex, visually appealing feature grids for landing pages.

    import {
      LandingBentoGridSection,
      LandingBentoGridIconItem,
      LandingBentoGridNumberItem,
      LandingBentoGridImageItem,
    } from '@/components/landing/bento-grid';
    
    <LandingBentoGridSection title="Title" description="Description">
      <LandingBentoGridIconItem icon={<Icon />} bottomText="Text" />
      <LandingBentoGridNumberItem number="10%" bottomText="Metric" />
      <LandingBentoGridImageItem imageSrc="/path.webp" bottomText="Caption" />
    </LandingBentoGridSection>
  10. How to use Page UI components

    main

    Page UI is not a traditional npm library dependency. Instead, it follows a pattern similar to Shadcn UI: it is a collection of reusable components and code snippets. To use them, you copy and paste the component code directly into your own codebase. This allows you to own the code and customize it freely without managing a heavy external dependency. Some components are built on top of Shadcn UI.

    To add components:

    1. Follow the installation guide to set up the base requirements.
    2. Navigate to the component documentation, templates, or usage examples.
    3. Copy the code for the desired component and paste it into your project.