Skip to content

Releases: themesberg/flowbite-react

[email protected]

26 Mar 17:23
a2038a2
Compare
Choose a tag to compare

Patch Changes

[email protected]

26 Mar 08:45
eddce06
Compare
Choose a tag to compare

Patch Changes

[email protected]

26 Mar 10:12
8a8fa60
Compare
Choose a tag to compare

Patch Changes

[email protected]

25 Mar 17:21
c2b8795
Compare
Choose a tag to compare

Patch Changes

  • #1543 868e485 Thanks @SutuSebastian! - add new migrate CLI command

    • add new transformer from compound components to singular imports

      import { Button } from "flowbite-react";
      
      // from
      <Button.Group>
        <Button>tab 1</Button>
        <Button>tab 2</Button>
        <Button>tab 3</Button>
      </Button.Group>
      
      // to
      import { Button, ButtonGroup } from "flowbite-react";
      
      <ButtonGroup>
        <Button>tab 1</Button>
        <Button>tab 2</Button>
        <Button>tab 3</Button>
      </ButtonGroup>

[email protected]

25 Mar 08:49
0e53a94
Compare
Choose a tag to compare

Patch Changes

  • #1541 af49b10 Thanks @SutuSebastian! - fix(ui~cli): path normalzation for windows support (setup plugins paths)

  • #1539 6caecce Thanks @SutuSebastian! - refactor(Alert): onDismiss prop

    • Changed the type of onDismiss prop in Alert component from boolean to a function type
    • Removed onDismiss default values from various Alert stories to align with the updated prop type

[email protected]

24 Mar 18:01
47bde19
Compare
Choose a tag to compare

Patch Changes

[email protected]

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

[email protected]

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

[email protected]

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/[email protected]@0.10.2

[email protected]

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

Patch Changes