Thank you for your interest in contributing to Flowbite Blazor! This document provides guidelines and instructions for contributing to the project.
-
Clone the repository:
git clone https://github.com/peakflames/flowbite-blazor.git cd flowbite-blazor
-
Install standalone Tailwind CSS CLI executable:
Mac/Linux:
mkdir ./tools && cd ./tools && curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64 && chmod +x tailwindcss-macos-arm64 && mv tailwindcss-macos-arm64 tailwindcss
Windows:
mkdir ./tools -Force; ` cd ./tools; ` Invoke-WebRequest -Uri "https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-windows-x64.exe" ` -OutFile "tailwindcss.exe" ` -UseBasicParsing ; ` cd ..
-
Build the solution
dotnet build
-
Run the DemoApp
cd src/DemoApp dotnet run
Then open http://localhost:5290/ in your browser.
The solution is configured for two development modes:
-
Debug/Development (default):
- Use
dotnet watch
- F5 to run and debug
- Use
-
Release (package testing):
-
Uses NuGet package references
-
Tests the packaged components
-
To test changes with local NuGet packages:
-
Pack the libraries and publish the DemoApp to the .\dist directory:
.\publish-local.ps1
-
Serve the DemoApp as a static web site:
# Ensure you have the dotnet tool `dotnet-serve` installed. cd dist\wwwwroot; dotnet serve
-
-
-
File Organization:
- One component per file
- Place in appropriate feature folder under Components/
- Use partial classes for complex components
-
Naming Conventions:
- PascalCase for public members and types
- _camelCase for private fields
- Parameters must be public properties
-
Documentation:
- XML comments for public APIs
- Include parameter descriptions
- Document event callbacks
-
Code Style:
- Use 4 spaces for indentation
- Prefer C# code in .cs file over .razor file
- Prefer functions over lambda expressions for event handlers
-
Accessibility:
- Include ARIA attributes
- Support keyboard navigation
- Maintain focus management
-
Styling:
- TailwindCSS is integrated via MSBuild
- Use TailwindCSS utilities
- Support dark mode
- Follow Flowbite design system
-
Testing:
- Create demo page examples
- Test all component variants
- Verify accessibility
- Test in both light and dark modes
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes:
- Follow coding standards
- Add/update documentation
- Create/update demo pages
-
Test your changes:
- Build in both Debug and Release modes
- Test with local NuGet packages
- Verify demo pages
-
Create Pull Request:
- Provide clear description
- Reference any related issues
- Include screenshots for UI changes
- List breaking changes if any
- All builds must pass
- Demo pages for new components
- Documentation updates
- No breaking changes without discussion
- Follows coding standards
-
Version Updates:
- Update version numbers
- Update CHANGELOG.md
- Update documentation
-
Package Testing:
- Test with local NuGet packages
- Verify in DemoApp
- Check documentation accuracy
-
Release:
- Create release branch
- Update version numbers
- Create GitHub release
- Publish to NuGet
- Create an issue for bugs
- Start a discussion for features
- Tag maintainers for urgent issues
By contributing, you agree that your contributions will be licensed under the MIT License.