Releases: themesberg/flowbite-react
flowbite-react@0.11.0
Minor Changes
-
#1498
169b5dd
Thanks @SutuSebastian! - ## SummaryThis 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:
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 theHelperText
component directly -
Deprecated
href
prop inBadge
component -
Updated
Button
component to use new color system:- Added
default
andalternative
colors - Changed default color from
blue
todefault
- Modified hover states to use primary colors
- Moved theme size styles from inner span to root button element
- Added
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
- Enhanced
- 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
- Updated default colors to use
Learn more about...
create-flowbite-react@1.1.0
Minor Changes
-
#1498
169b5dd
Thanks @SutuSebastian! - - Added new project templates:blitzjs
- Blitz.jsbun
- Bunesbuild
- ESBuildfarm
- Farmmeteorjs
- Meteor.jsmodernjs
- Modern.jsreact-router
- React Routerreact-server
- React Serverrsbuild
- Rsbuildrspack
- Rspacktanstack-router
- TanStack Routertanstack-start
- TanStack Startvike
- Vikewaku
- Wakuwebpack
- Webpack
flowbite-react@0.10.2
Patch Changes
-
#1190
25bb353
Thanks @ddiasfront! - ### Datepicker Component UpdatesThe Datepicker has been enhanced with several improvements:
- Controlled Inputs: Supports controlled inputs via
value
anddefaultValue
props, enabling programmatic date updates without manual clicks. - State Management: Optimized internal state management using
useMemo
anduseEffect
. - Documentation: Added sections in documentation for controlled usage and handling
null
values. - Test Cases: Comprehensive unit tests added for date handling.
- 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
: ExpandedDatepickerProps
.DatepickerContext.tsx
: AdjustedselectedDate
type.Decades.tsx
,Months.tsx
,Years.tsx
: Updated logic to check forselectedDate
.
- Controlled Inputs: Supports controlled inputs via
-
#1484
38913e5
Thanks @KRTirtho! - fix: autocomplete for string enums with dynamic value not working
What's Changed
- revamp homepage and docs styles by @SutuSebastian in #1442
- Fix/datepicker decade picker unclickable by @Maraket in #1452
- Web/fixes by @SutuSebastian in #1461
- fix(datepicker) duplicate month display #1456 by @khareembld in #1457
- SEO: a11y + open external links in new tabs by @SutuSebastian in #1463
- fix: not allowing to select other year by @khareemnurulla in #1465
- chore: up packages by @SutuSebastian in #1464
- chore: Make label prop optional in Dropdown component by @raky291 in #1468
- Docs: not found page by @SutuSebastian in #1476
- fix: autocomplete for string enums with dynamic value not working by @KRTirtho in #1484
- Feat/date value datepicker by @ddiasfront in #1190
New Contributors
- @Maraket made their first contribution in #1452
- @khareembld made their first contribution in #1457
- @khareemnurulla made their first contribution in #1465
- @raky291 made their first contribution in #1468
- @KRTirtho made their first contribution in #1484
- @ddiasfront made their first contribution in #1190
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
Patch Changes
- #1433
a5d008e
Thanks @SutuSebastian! - addAdonisJS
integration guide
create-flowbite-react@1.0.8
Patch Changes
- #1433
a5d008e
Thanks @SutuSebastian! - addAdonisJS
integration guide
flowbite-react@0.10.0
Minor Changes
- #1413
26401bc
Thanks @dhavalveera! - feat(components): add "Clipboard"
Patch Changes
-
#1405
c8dba76
Thanks @dhavalveera! - Renamed theTabs
attribute fromstyle
tovariant
to allow the use of thestyle
attribute, which was previously blocked. -
#1430
83a055a
Thanks @SutuSebastian! - fix(ui): timeline - content - separateTimelineContent
base styles from horizontal/vertical styles -
#1428
b963b2c
Thanks @SutuSebastian! - fix(ui): Toggle Switch - styles- RTL
- broken switch when label too long
- bring back animations
-
#1371
92cec6f
Thanks @SutuSebastian! - Mega Menu - export all entities -
#1423
4350ffb
Thanks @SutuSebastian! - update packages -
#1346
92f41fe
Thanks @dhavalveera! - feat: addHR
component
What's Changed
- docs(popover) - fix svg path JSX format by @SutuSebastian in #1372
- chore: export all entities by @SutuSebastian in #1371
- docs(drawer) - examples cleanup by @SutuSebastian in #1374
- Exclude analytics from
examples
page by @SutuSebastian in #1376 - Docs : Toggle Switch #1321 - Issue has been fixed by @akashMasih in #1397
- fix(docs): single quote to double by @SutuSebastian in #1416
- Core: update packages + fixes by @SutuSebastian in #1423
- fix: fixed the Tabs attribute from style to variant by @dhavalveera in #1405
- feat(components): add Clipboard by @dhavalveera in #1413
- feat(ui) Add advanced list story by @paghar in #1361
- Add suppressHydrationWarning for nextJS by @sylwit in #1335
- Fix React warning in ButtonGroup by @chunkerchunker in #1323
- Add an override to useTypeAhead behavior from @floating-ui/react allowing use in DropDown.Header by @dragonlipz in #1394
- feat: add
HR
component by @dhavalveera in #1346 - fix(ui): Toggle Switch - styles by @SutuSebastian in #1428
- fix(ui): timeline - content - separate base styles from horizontal/vertical by @SutuSebastian in #1430
New Contributors
- @akashMasih made their first contribution in #1397
- @chunkerchunker made their first contribution in #1323
- @dragonlipz made their first contribution in #1394
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
Patch Changes
- #1423
4350ffb
Thanks @SutuSebastian! - update packages
flowbite-react@0.9.0
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
Minor Changes
-
#1344
bf1bdb0
Thanks @SutuSebastian! - Rework build process usingrollup
andtsc
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 thantsc
, which is very slow.After evaluating various tools including
tsup
,tshy
, andbun build
, we choserollup
with theesbuild
plugin for transpiling due to its performance and flexibility. We continue to usetsc
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 fromdist/esm
todist/types
- all files in the
- changed the build output dir from
lib
todist
- created a facade layer for easier management of the
content
path as well as theplugin
- fixed turbo repo dependency tree configs in order for
apps/web
to properly pipe and require the build output ofpackages/ui
in certain script steps such asbuild
anddev
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
- added
flowbite-react@0.7.8
Patch Changes
- #1339
8430004
Thanks @SutuSebastian! - fix package.json types path