Skip to content

Version Packages #1534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged

Version Packages #1534

merged 1 commit into from
Mar 24, 2025

Conversation

github-actions[bot]
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Minor Changes

  • #1498 169b5dd Thanks @SutuSebastian! - - Added new project templates:

    • blitzjs - Blitz.js
    • bun - Bun
    • esbuild - ESBuild
    • farm - Farm
    • meteorjs - Meteor.js
    • modernjs - Modern.js
    • react-router - React Router
    • react-server - React Server
    • rsbuild - Rsbuild
    • rspack - Rspack
    • tanstack-router - TanStack Router
    • tanstack-start - TanStack Start
    • vike - Vike
    • waku - Waku
    • webpack - Webpack

[email protected]

Minor Changes

  • #1498 169b5dd Thanks @SutuSebastian! - ## Summary

    This release brings massive improvements to Flowbite React's capabilities, introducing the first automatic Tailwind CSS class generation system and native support for both Tailwind CSS v3 and v4. Key highlights include:

    • Automatic Class Generation: First UI library to automatically detect and generate Tailwind CSS classes
    • Tailwind CSS v4 Support: Native compatibility with both Tailwind CSS v3 and v4
    • Comprehensive Prefix Support: Complete system for customizing class prefixes
    • Enhanced CLI Tools: New project initialization and component creation commands
    • Expanded Framework Support: 15 new framework integration guides and templates

    New Engine

    Automatic Class Generation

    • First UI library to implement automatic Tailwind CSS class detection
    • Only includes styles for components you actually import and use
    • Works like tree-shaking but for Tailwind CSS classes
    • Real-time class list updates during development
    • Optimized production builds with minimal CSS output

    Learn more about class generation in our CLI documentation.

    One-Command Setup

    npx flowbite-react@latest init

    This single command:

    • Detects your project's environment
    • Installs necessary dependencies
    • Configures Tailwind CSS
    • Sets up the appropriate bundler plugin
    • Creates optimal VSCode configuration
    • Initializes the .flowbite-react directory

    See our quickstart guide for detailed setup instructions.

    Smart Version Handling

    • Automatic detection of Tailwind CSS version (v3 or v4)
    • No manual configuration needed
    • Adapts class generation to version-specific syntax
    • Ensures compatibility with both versions simultaneously

    Read more about version compatibility in our compatibility guide.

    Major Features

    1. Enhanced Integration Support

    • Added new framework integration guides and templates:
      • Blitz.js
      • Bun
      • ESBuild
      • Farm
      • Meteor.js
      • Modern.js
      • React Router
      • React Server
      • Rsbuild
      • Rspack
      • TanStack Router
      • TanStack Start
      • Vike
      • Waku
      • Webpack

    Explore all integration guides in our framework guides section.

    2. Prefix Support System

    • Added support for customizing Tailwind CSS class prefixes

    • Different configuration options for Tailwind CSS v3 and v4:

      // Tailwind CSS v3
      /** @type {import('tailwindcss').Config} */
      export default {
        prefix: "tw-",
        // ... rest of your config
      };
      
      // Tailwind CSS v4
      @import "tailwindcss" prefix(tw);
    • Prefix configuration in .flowbite-react/config.json:

      {
        "$schema": "https://unpkg.com/flowbite-react/schema.json",
        "prefix": "tw"
      }
    • ThemeConfig component support for prefix configuration:

      import { ThemeConfig } from "flowbite-react";
      
      export default function App() {
        return (
          <>
            <ThemeConfig prefix="tw" />
            {/* ... */}
          </>
        );
      }

    Learn more about prefix configuration in our prefix documentation.

    3. CLI Enhancements

    • New project initialization command:

      npx flowbite-react@latest init

    Learn more about CLI features in our CLI documentation.

    4. Tailwind CSS Version Compatibility

    • Automatic version detection between Tailwind CSS v3 and v4
    • Seamless support for both versions without manual configuration
    • Improved class merging and prefix handling for each version

    5. Configuration System

    • New .flowbite-react/config.json for centralized configuration (automatically generated):

      {
        "$schema": "https://unpkg.com/flowbite-react/schema.json",
        "components": [],
        "dark": true,
        "path": "src/components",
        "prefix": "",
        "rsc": true,
        "tsx": true
      }

    Learn more about configuration options in our config documentation.

    6. Custom Components

    Component Creation

    • Added CLI command for component generation:

      npx flowbite-react@latest create my-component
    • Automatic setup based on .flowbite-react/config.json configuration:

      • Component path location
      • React Server Components support
      • TypeScript/JavaScript selection

    Theme System Integration

    • Full theming system support for custom components:
      • Global theme inheritance
      • Component-level overrides
      • Provider-level props
      • Theme clearing and applying
      • Type safety with TypeScript

    Technical Improvements

    Build System

    • Improved bundler compatibility and performance
    • Added support for tree-shaking
    • Enhanced TypeScript configuration
    • Optimized production builds

    Component Updates

    • Improved component primitives
    • Enhanced type safety across components
    • Added extensive test coverage

    Developer Experience

    • Added comprehensive TypeScript types
    • Improved VSCode integration
    • Enhanced debugging capabilities

    Exports and Package Structure

    • All components, hooks, and utilities are now exported from the root package
    • Every internal part and primitive is exposed for advanced customization
    • Improved module resolution with better tree-shaking support
    • Direct access to component parts without compound components
    • TypeScript types for all exports are available

    Breaking Changes

    Component Changes

    • Deprecated compound components in favor of simpler component primitives:

      // Before - Compound components
      <Accordion>
        <Accordion.Panel>
          <Accordion.Title>Title 1</Accordion.Title>
          <Accordion.Content>Content 1</Accordion.Content>
        </Accordion.Panel>
      </Accordion>
      
      // After - Simple primitives
      <AccordionRoot>
        <AccordionItem>
          <AccordionTitle>Title 1</AccordionTitle>
          <AccordionContent>Content 1</AccordionContent>
        </AccordionItem>
      </AccordionRoot>
    • Removed helperText prop from all form components in favor of using the HelperText component directly

    • Deprecated href prop in Badge component

    • Updated Button component to use new color system:

      • Added default and alternative colors
      • Changed default color from blue to default
      • Modified hover states to use primary colors
      • Moved theme size styles from inner span to root button element

    Theme System

    • Changed theme application behavior:
      • Enhanced ThemeProvider with deep merging of themes
      • Added support for granular theme resets using clearTheme
      • Improved theme resolution with better performance
      • Updated color schemes to use primary colors consistently
    • Modified component color schemes:
      • Updated default colors to use primary instead of specific colors (e.g., cyan)
      • Standardized color naming across components
      • Enhanced color inheritance and theme customization

    Learn more about theming in our theme documentation.

    Package and Build System

    • Switched package type to module
    • Added new entry points for better module resolution
    • Removed react-icons dependency in favor of custom icon components
    • Added support for Yarn Plug'n'Play (PnP):

    API Changes

    • Deprecated <Flowbite> component in favor of ThemeProvider
    • Removed getStore() export and limited to finite actions and getters
    • Added forwardRef to almost all components
    • Removed redundant Flowbite prefix from type names

    Migration Guide

    1. Update to the latest version:

      npm install flowbite-react@latest
    2. Initialize the new engine:

      npx flowbite-react@latest init

      This will:

      • Set up the .flowbite-react directory
      • Configure your bundler
      • Update VSCode settings
      • Create necessary configuration files
    3. Clean up your Tailwind configuration:

      - import flowbite from 'flowbite-react/tailwind';
      
      /** @type {import('tailwindcss').Config} */
      export default {
        content: [
      -    flowbite.content(),
      +    // The init command will add the correct content paths
        ],
        plugins: [
      -    flowbite.plugin(),
      +    // The init command will add the correct plugins
        ],
      }

    Fixed Issues and Pull Requests

    Resolved Issues

    Resolved Pull Requests

    Technical Requirements

    • Node.js 16+
    • Tailwind CSS v3 or v4
    • React 18+

    For detailed documentation on all new features and integrations, visit:

    Core Documentation

    Customization

Copy link

vercel bot commented Mar 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 24, 2025 5:21pm
flowbite-react-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 24, 2025 5:21pm

Copy link
Contributor

coderabbitai bot commented Mar 24, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@SutuSebastian SutuSebastian merged commit 9223822 into main Mar 24, 2025
1 of 3 checks passed
@SutuSebastian SutuSebastian deleted the changeset-release/main branch March 24, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant