BadtzUI

repository·main·Indexed 42 days ago

https://github.com/badtzx0/badtz-ui

A performance-optimized React UI library built with TypeScript and Tailwind CSS, specifically designed for building high-converting landing pages. It provides pre-built, fully typed components, conversion-optimized sections (Premium Blocks), and complete templates for rapid MVP development. Components can be installed via the shadcn CLI.

Tokens
39.8K
Snippets
134
Records
177
Agent score
53%

What's inside BadtzUI

  1. Overview of BadtzUI

    main
    BadtzUI is a modern React UI library designed for rapid frontend development. It provides a collection of pre-built, high-performance components that are fully typed with TypeScript. Developers can use it to build beautiful interfaces quickly while maintaining the ability to customize themes to match specific branding requirements.
  2. Overview of Badtz UI features and philosophy

    main

    Badtz UI is a free, open-source React component library specifically designed for building high-converting landing pages. Unlike generic UI libraries that focus on basic elements (buttons, inputs), Badtz UI provides specialized, production-ready sections optimized for marketing and conversion.

    Key Characteristics

    • Landing Page Focused: Includes hero sections, pricing tables, testimonials, and CTAs.
    • Conversion-Optimized: Layouts are based on proven SaaS patterns and user psychology to drive user action.
    • Modern Stack: Built using React, TypeScript, and Tailwind CSS.
    • Mobile-First: All components are designed to work across all device sizes.
    • Production Ready: Designed for a 'copy, paste, and ship' workflow with minimal configuration.
  3. Core features of the Modular Glassmorphism Template

    main

    The template includes several built-in optimizations and design patterns:

    • Accessibility: Uses semantic HTML, proper tab order, ARIA labels, and alt text to ensure WCAG compliance.
    • Animations: Powered by Motion for fluid transitions and interactivity. Animations can be customized or disabled to respect user motion preferences.
    • SEO Optimization: Structured for high performance and search engine visibility out of the box.
    • Design System: A modular structure using reusable components and unified project styles (typography, color tokens, and layout) for easy scaling.
  4. Mappl Template Technical Specifications

    main

    The Mappl Template is a modular SaaS template designed for legal professionals and startups. Key technical features include:

    • Accessibility: WCAG-compliant out of the box using semantic HTML, proper tab order, ARIA labels, and alt text.
    • Animations: Fluid, elegant animations powered by Motion that can be customized or disabled for motion-conscious users.
    • SEO: Optimized for performance and search engine visibility.
    • Design System: A modular architecture using reusable components and unified project styles (typography, color tokens, and layout) for easy scaling.
  5. Use Premium Blocks for landing pages

    main

    Premium Blocks are complete, conversion-optimized sections designed for marketing sites and landing pages. Unlike individual free components (buttons, forms), these are ready-to-deploy sections that follow proven SaaS design patterns.

    Available Block Types:

    • Hero Sections: Variations with CTAs, social proof, and different visual styles.
    • Pricing Tables: Layouts optimized using psychological pricing principles.
    • Feature Grids: Scannable layouts for product benefits.
    • Testimonials: Social proof sections for building trust.
    • Call-to-Actions (CTAs): High-converting blocks focused on urgency and value.

    Key Characteristics:

    • Copy & Deploy: No complex configuration; copy the code and customize content.
    • Mobile-Optimized: Fully responsive behavior.
    • Performance-Ready: Server-side rendered for SEO and speed.
  6. Use Complete Templates for full-page layouts

    main

    Complete Templates provide entire, production-ready frontends that can be deployed with minimal effort. These are ideal for rapid MVP development or creating investor-ready demos.

    Available Template Types:

    • Landing Pages: Multi-section marketing sites (Hero, Features, Pricing, Testimonials).
    • Authentication Pages: Sign-up, sign-in, and password reset interfaces.
    • Dashboard Layouts: Complete admin interfaces for SaaS backends.

    Technology Stack: Templates are built using:

    • Next.js App Router (SSR and performance)
    • Framer Motion (Animations)
    • Tailwind CSS (Styling)
    • shadcn/ui (Accessible components)
    • TypeScript (Type safety)
  7. Getting Started with the Mappl SaaS Template

    main

    To use the Mappl SaaS Template, follow these five steps:

    1. Download: Download the template package.
    2. Install: Install the necessary dependencies using your package manager.
    3. Configure: Update the configuration files to match your project requirements.
    4. Develop: Start the local development server using npm run dev.
    5. Deploy: Use the provided deployment configurations to launch your site.

    The template is built using Next.js, TypeScript, Motion, and Shadcn UI.

    npm run dev
  8. Install the Stripe Animated Gradient component

    main

    You can install the Stripe Animated Gradient component using either the CLI or a manual installation process.

    Using CLI

    Run the following command to add the component directly to your project:

    npx shadcn@latest add https://badtz-ui.com/r/stripe-animated-gradient.json

    Manual Installation

    1. Install dependencies:
      npm install clsx tailwind-merge
    2. Setup utility function: Ensure you have a cn utility function in your @/lib folder:
      import { ClassValue, clsx } from "clsx";
      import { twMerge } from "tailwind-merge";
      
      export function cn(...inputs: ClassValue[]) {
        return twMerge(clsx(inputs));
      }
    3. Add Shader: Download stripe-shader.zip, extract stripe-shader.js, and place it inside your components/ui directory.
    4. Add Component: Copy the stripe-animated-gradient.tsx source code into your components/ui directory and update any import paths to match your project structure.
  9. Create a ThemeProvider component

    main

    Create a client-side wrapper for next-themes to manage theme state. This component uses the "use client" directive and re-exports the ThemeProvider from next-themes with standard component props.

    "use client"
    
    import * as React from "react"
    import { ThemeProvider as NextThemesProvider } from "next-themes"
    
    export function ThemeProvider({
      children,
      ...props
    }: React.ComponentProps<typeof NextThemesProvider>) {
      return <NextThemesProvider {...props}>{children}</NextThemesProvider>
    }
  10. Install the Blur Reveal component

    main

    You can install the BlurReveal component using the shadcn CLI or by manual installation.

    Using CLI

    Run the following command to add the component directly to your project:

    npx shadcn@latest add https://badtz-ui.com/r/blur-reveal.json

    Manual Installation

    1. Install required dependencies:
    npm install clsx tailwind-merge
    1. Ensure you have a cn utility function in your @/lib folder:
    import { ClassValue, clsx } from "clsx";
    import { twMerge } from "tailwind-merge";
    
    export function cn(...inputs: ClassValue[]) {
      return twMerge(clsx(inputs));
    }
    1. Copy the component source code into your project and update the import paths to match your project structure.
  11. Configure ThemeProvider in Next.js Root Layout

    main

    To apply the theme globally, wrap your application's children with the ThemeProvider in your root layout.

    Important Requirements:

    1. Add the suppressHydrationWarning prop to the <html> tag to prevent hydration mismatch errors caused by theme injection.
    2. Configure the ThemeProvider with recommended props:
      • attribute="class": Uses a CSS class to toggle themes.
      • defaultTheme="system": Defaults to the user's system preference.
      • enableSystem: Enables automatic detection of system color schemes.
      • disableTransitionOnChange: Prevents CSS transitions from firing during theme changes, avoiding visual glitches.
    import { ThemeProvider } from "@/components/theme-provider"
    
    export default function RootLayout({ children }: RootLayoutProps) {
      return (
        <>
          <html lang="en" suppressHydrationWarning>
            <head />
            <body>
              <ThemeProvider
                attribute="class"
                defaultTheme="system"
                enableSystem
                disableTransitionOnChange
              >
                {children}
              </ThemeProvider>
            </body>
          </html>
        </>
      )
    }