Joko UI

repository·main·Indexed 19 days ago

https://github.com/rayasabari/joko-ui

A library of free, copy-paste ready Tailwind CSS components for building marketing websites and functional web applications. It features two main categories: Application UI (e.g., Accordions, Modals, Tables) and Marketing UI (e.g., Heroes, Pricing, Testimonials). All components support Light and Dark modes out of the box and require no installation or npm dependencies.

Tokens
13.4K
Snippets
34
Records
38
Agent score
64%

What's inside joko-ui

  1. Explore Joko UI component categories

    main

    Joko UI components are divided into two main categories:

    📱 Application UI

    Functional components for building web applications, such as:

    • Accordions, Alerts, Avatars, Badges, Breadcrumbs, Buttons, Cards, Carousels, Checkboxes, Date Pickers, Drawers, Dropdowns, Forms, Inputs, Loaders, Modals, Navbars, Paginations, Progress, Radios, Selects, Sidebars, Skeletons, Tables, Tabs, Toasts, Toggles, and Tooltips.

    📣 Marketing UI

    Components designed for high-converting landing pages, such as:

    • Author Cards, Banners, Blog Cards, Brand Lists, CTAs, Description Lists, Error Pages, FAQ, Feature Sections, Footers, Headers, Heroes, Newsletter, Pricing, Stats, Steppers, Teams, and Testimonials.
  2. Add a new variant to an existing component

    main

    To add a new visual or functional variant to a component, locate the component's definition file in lib/data/components/[category]/[component].tsx. Append a new object to the variants array containing a unique id, a display name, and the code string (the HTML/JSX snippet including Tailwind CSS classes).

    {
      id: 'variant-slug',
      name: 'Variant Name',
      code: `<button class="...">...</button>`,
    }
  3. Add a new component category

    main

    To create an entirely new category of components, follow these steps:

    1. Create the directory: Create a new folder at lib/data/components/[new-category].
    2. Populate components: Create component files within this folder following the standard component definition pattern.
    3. Export category components: Create an index.ts file inside the new category folder to export the array of components.
    4. Integrate with the core registry: Update lib/data/components/index.tsx by:
      • Importing the new category array.
      • Importing an icon for the category.
      • Adding the new category object to the getAllComponents function.
      • Updating the following helper functions to include the new category: getComponentBySlug, getComponentsByCategory, and getTotalComponentCount.
  4. Get started with Joko UI

    main

    Joko UI is a collection of copy-paste ready Tailwind CSS components. There is no installation process, no npm packages to manage, and no configuration required. It is designed to work with any standard Tailwind CSS setup.

    To use Joko UI, simply copy the source code of a component from the official website and paste it directly into your project files.

  5. Add a new component to an existing category

    main

    To introduce a new component into an established category:

    1. Create the component file: Create lib/data/components/[category]/[slug].tsx.
    2. Define the component: Use the ComponentType type to define the component object. You must provide a slug, name, icon (using @tabler/icons-react), description, and a variants array.
    3. Register the component: Open lib/data/components/[category]/index.ts, import your new component, and add it to the exported array (e.g., applicationComponents).
    import { ComponentType } from '../types';
    
    export const myComponent: ComponentType = {
      slug: 'my-component',
      name: 'My Component',
      icon: <IconName stroke={1.5} />,
      description: 'Description of the component',
      variants: [ ... ]
    };
  6. How to use Joko UI components

    main

    Follow these steps to integrate components into your project:

    1. Browse: Visit the Joko UI website to find a component.
    2. Preview: Use the built-in controls to preview the component at different breakpoints (Mobile, Tablet, Desktop).
    3. Theme Check: Toggle Dark Mode to verify how the component renders in dark themes.
    4. Copy: Click the 'Code' tab or the 'Copy Code' button to copy the source code.
    5. Paste: Paste the code into your project.

    Note: All components support both Light and Dark modes out of the box using Tailwind's dark: modifier.

  7. Use Author Card components

    main

    The author-cards component provides several pre-designed profile card layouts for displaying writer or creator information. These are available as different variants depending on your UI needs (e.g., simple, horizontal, stats-focused, or glassmorphism styles). Each variant is provided as a raw HTML/Tailwind CSS snippet that can be integrated into your project.

    import { author_cards } from 'lib/data/components/marketing/author-cards';
    
    // Access variants via author_cards.variants
    const variants = author_cards.variants;
  8. Use the Simple Modal variant

    main

    The simple-modal variant is a lightweight dialog used to display information and a single confirmation button. It uses a max-w-sm constraint and supports dark mode via dark:bg-gray-900 and dark:text-white classes.

    <div class="w-full max-w-sm bg-white dark:bg-gray-900 rounded-2xl shadow-xl border border-gray-200 dark:border-gray-800 p-6">
      <h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2">Modal Title</h3>
      <p class="text-gray-500 dark:text-gray-400 text-sm mb-6">This is a simple modal dialog. You can use it to display some text to the user.</p>
      <div class="flex justify-end">
        <button class="px-4 py-2 bg-gray-900 dark:bg-white text-white dark:text-gray-900 font-medium rounded-lg hover:bg-gray-800 dark:hover:bg-gray-100 transition-colors">
          Understood
        </button>
      </div>
    </div>
  9. Use the Avatar Toast variant

    main

    The avatar-toast variant includes a user avatar, making it ideal for social notifications like mentions.

    <div class="max-w-xs bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-lg rounded-xl p-4 flex items-start gap-3">
      <img src="https://i.pravatar.cc/150?u=a042581f4e29026704d" alt="Avatar" class="w-10 h-10 rounded-full object-cover shrink-0" />
      <div class="flex-1">
        <p class="text-sm font-medium text-gray-900 dark:text-white">Sarah Jenkins</p>
        <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Mentioned you in a comment.</p>
        <p class="text-xs text-lime-600 dark:text-lime-400 mt-2 hover:underline cursor-pointer">View comment</p>
      </div>
    </div>
  10. Use the Success Toast variant

    main

    The success-toast variant uses a lime-colored left border and icon to indicate a successful operation.

    <div class="max-w-xs bg-white dark:bg-gray-800 border-l-4 border-l-lime-500 border-y border-r border-y-gray-200 border-r-gray-200 dark:border-y-gray-700 dark:border-r-gray-700 shadow-lg rounded-xl p-4 flex items-start gap-3">
      <div class="text-lime-500 shrink-0">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
      </div>
      <div class="flex-1">
        <p class="text-sm font-medium text-gray-900 dark:text-white">Success!</p>
        <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">File uploaded completely.</p>
      </div>
      <button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors shrink-0">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
      </button>
    </div>
  11. Use the Newsletter Modal variant

    main

    The newsletter-modal variant is a large-scale marketing component. It uses a split-screen layout (on medium screens and up) with a decorative gradient side and a content side containing a newsletter signup form.

    <div class="w-full max-w-3xl bg-white dark:bg-gray-900 rounded-2xl shadow-xl border border-gray-200 dark:border-gray-800 overflow-hidden flex flex-col md:flex-row">
      <div class="md:w-2/5 h-48 md:h-auto bg-gradient-to-br from-lime-400 via-lime-500 to-lime-600 relative">
        <div class="absolute inset-0 opacity-20 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-white to-transparent"></div>
      </div>
      <div class="md:w-3/5 p-8 relative">
        <button class="absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
          <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
        </button>
        <span class="text-xs font-bold uppercase tracking-wider text-lime-600 dark:text-lime-400 mb-2 block">Newsletter</span>
        <h3 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">Join our community</h3>
        <p class="text-gray-500 dark:text-gray-400 mb-6">Get weekly updates, tips, and exclusive offers straight to your inbox. No spam, ever.</p>
        <div class="flex flex-col sm:flex-row gap-3">
          <input type="email" class="flex-1 px-4 py-2.5 rounded-lg border border-gray-200 dark:border-gray-700 bg-transparent text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-lime-500/20 focus:border-lime-500 transition-colors" placeholder="Enter your email" />
          <button class="px-6 py-2.5 bg-lime-600 text-white font-medium rounded-lg hover:bg-lime-700 transition-colors shadow-sm shadow-lime-600/20 whitespace-nowrap">
            Subscribe
          </button>
        </div>
      </div>
    </div>
  12. Use the Progress Toast variant

    main

    The progress-toast variant includes a progress bar at the bottom, useful for showing the status of long-running tasks like file uploads.

    <div class="max-w-xs w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-lg rounded-xl overflow-hidden flex flex-col">
      <div class="p-4 flex items-center justify-between gap-3">
        <div class="flex items-center gap-3">
          <div class="w-8 h-8 rounded-lg bg-lime-100 dark:bg-lime-900/30 text-lime-600 dark:text-lime-300 flex items-center justify-center shrink-0">
            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"></path></svg>
          </div>
          <div>
            <p class="text-sm font-medium text-gray-900 dark:text-white">Uploading...</p>
            <p class="text-xs text-gray-500 dark:text-gray-400 mt-0.5">document.pdf (75%)</p>
          </div>
        </div>
        <button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors shrink-0">
          <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
        </button>
      </div>
      <div class="w-full bg-gray-100 dark:bg-gray-700 h-1.5">
        <div class="bg-lime-600 dark:bg-lime-300 h-1.5 rounded-r-full" style="width: 75%"></div>
      </div>
    </div>