Skip to content

Releases: themesberg/flowbite-react

flowbite-react@0.11.0

24 Mar 17:17
9223822
Compare
Choose a tag to compare

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

    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
      <Accordion>
        <AccordionPanel>
          <AccordionTitle>Title 1</AccordionTitle>
          <AccordionContent>Content 1</AccordionContent>
        </AccordionPanel>
      </Accordion>
    • 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...

Read more

create-flowbite-react@1.1.0

24 Mar 17:17
9223822
Compare
Choose a tag to compare

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

flowbite-react@0.10.2

01 Oct 06:46
bed3c41
Compare
Choose a tag to compare

Patch Changes

  • #1190 25bb353 Thanks @ddiasfront! - ### Datepicker Component Updates

    The Datepicker has been enhanced with several improvements:

    1. Controlled Inputs: Supports controlled inputs via value and defaultValue props, enabling programmatic date updates without manual clicks.
    2. State Management: Optimized internal state management using useMemo and useEffect.
    3. Documentation: Added sections in documentation for controlled usage and handling null values.
    4. Test Cases: Comprehensive unit tests added for date handling.
    5. Storybook: Improved stories, showcasing different states (controlled/uncontrolled).

    Files Updated:

    • apps/web/content/docs/components/datepicker.mdx: Added controlled usage section.
    • Datepicker.spec.tsx: Added unit tests.
    • Datepicker.stories.tsx: Enhanced story variants.
    • Datepicker.tsx: Expanded DatepickerProps.
    • DatepickerContext.tsx: Adjusted selectedDate type.
    • Decades.tsx, Months.tsx, Years.tsx: Updated logic to check for selectedDate.
  • #1484 38913e5 Thanks @KRTirtho! - fix: autocomplete for string enums with dynamic value not working

What's Changed

New Contributors

Full Changelog: https://github.com/themesberg/flowbite-react/compare/create-flowbite-react@1.0.8...flowbite-react@0.10.2

flowbite-react@0.10.1

21 Jun 15:12
1ddf19d
Compare
Choose a tag to compare

Patch Changes

create-flowbite-react@1.0.8

21 Jun 15:12
1ddf19d
Compare
Choose a tag to compare

Patch Changes

flowbite-react@0.10.0

20 Jun 13:10
ba3463d
Compare
Choose a tag to compare

Minor Changes

Patch Changes

What's Changed

New Contributors

Full Changelog: https://github.com/themesberg/flowbite-react/compare/flowbite-react@0.9.0...flowbite-react@0.10.0

create-flowbite-react@1.0.7

20 Jun 13:10
ba3463d
Compare
Choose a tag to compare

Patch Changes

flowbite-react@0.9.0

16 Apr 23:16
8ae8b16
Compare
Choose a tag to compare

Introducing Drawer and Mega menu

Summary

Say hello to Drawer and Mega menu!

These long-awaited components from the vanilla Flowbite library have finally made their way to Flowbite React. Everything you need to get started - including full theme support, and the full set of examples to match the main Flowbite library - are ready at your fingertips.

Special thank you to @dhavalveera for your work on Drawer!

Changes

  • added Drawer component
  • added Mega menu component

flowbite-react@0.8.0

04 Apr 12:33
a3d282b
Compare
Choose a tag to compare

Minor Changes

  • #1344 bf1bdb0 Thanks @SutuSebastian! - Rework build process using rollup and tsc

    Summary

    In order to bring more performance to the build process of flowbite-react package, we have to consider transpiling the files using other tools rather than tsc, which is very slow.

    After evaluating various tools including tsup, tshy, and bun build, we chose rollup with the esbuild plugin for transpiling due to its performance and flexibility. We continue to use tsc solely for generating *.d.ts declaration files.

    Changes

    • added rollup + esbuild for transpiling files
      • all files in the cjs directory now have .cjs extension
      • all files in the esm directory now have .mjs extension
      • declaration file types (*.d.ts) have been moved from dist/esm to dist/types
    • changed the build output dir from lib to dist
    • created a facade layer for easier management of the content path as well as the plugin
    • fixed turbo repo dependency tree configs in order for apps/web to properly pipe and require the build output of packages/ui in certain script steps such as build and dev

    Breaking changes

    tailwind.config.js content path:

    old: "node_modules/flowbite-react/lib/esm/**/*.js"

    new: "node_modules/flowbite-react/dist/esm/**/*.mjs" - (flowbite.content() returns it)

    Before

    /** @type {import('tailwindcss').Config} */
    module.exports = {
      content: [
        // ...
        "node_modules/flowbite-react/lib/esm/**/*.js",
      ],
      plugins: [
        // ...
        require("flowbite/plugin"),
      ],
    };

    After

    const flowbite = require("flowbite-react/tailwind");
    
    /** @type {import('tailwindcss').Config} */
    module.exports = {
      content: [
        // ...
        flowbite.content(),
      ],
      plugins: [
        // ...
        flowbite.plugin(),
      ],
    };

    Addresses Issues

    #1326, #1329, #1343

flowbite-react@0.7.8

01 Apr 18:54
65e7c89
Compare
Choose a tag to compare

Patch Changes