Next UI
Beautiful, modern and fast Flutter UI library inspired by HeroUI design principles.

Features โจ
- ๐จ Modern Design: Components following HeroUI design principles
- ๐ High Performance: Optimized for Flutter's rendering engine
- ๐ฑ Responsive: Works seamlessly across different screen sizes
- ๐ฏ Type Safe: Built with strong typing and comprehensive enums
- ๐งฉ Composable: Easy to combine and customize components
- โฟ Accessible: Built with accessibility in mind
- ๐ Well Documented: Comprehensive documentation and examples
Installation ๐ป
โ In order to start using Next UI you must have the Flutter SDK installed on your machine.
Install via flutter pub add
:
flutter pub add next_ui
Quick Start ๐
import 'package:flutter/material.dart';
import 'package:next_ui/next_ui.dart';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Button Examples
Button.solid(
child: Text('Primary Button'),
onPressed: () {},
),
SizedBox(height: 16),
// Chip Example
NextChip.solid(
child: Text('Success'),
color: ChipColor.success,
),
SizedBox(height: 16),
// Progress Example
NextCircularProgress(
value: 0.7,
isIndeterminate: false,
label: Text('70% Complete'),
),
],
),
),
),
);
}
}
Components Overview ๐ฆ
โ Completed Components
Component | Features | Status |
---|---|---|
Button | 7 variants, 3 sizes, 6 colors, loading states, icons | โ Complete |
Chip | 7 variants, 3 sizes, 6 colors, closable, avatar support | โ Complete |
Checkbox | 3 sizes, 6 colors, indeterminate state, validation | โ Complete |
Checkbox Group | Multi-selection, validation, orientation control | โ Complete |
Radio Group | Single selection, validation, horizontal/vertical layout | โ Complete |
Circular Progress | Determinate/indeterminate, custom labels, stroke width | โ Complete |
Typography | H1-H6, paragraph, caption, multiple weights | โ Complete |
๐ง Roadmap
Planned Components | Status |
---|---|
Button Group | ๐ Planned |
Card | ๐ Planned |
Input/TextField | ๐ Planned |
Switch | ๐ Planned |
Avatar | ๐ Planned |
Badge | ๐ Planned |
Modal | ๐ Planned |
Dropdown | ๐ Planned |
Table | ๐ Planned |
Tooltip | ๐ Planned |
Navbar | ๐ Planned |
Pagination | ๐ Planned |
Dark Mode Support | ๐ Planned |
Component Examples ๐
Button
// Variants
Button.solid(child: Text('Solid'), onPressed: () {});
Button.bordered(child: Text('Bordered'), onPressed: () {});
Button.light(child: Text('Light'), onPressed: () {});
Button.ghost(child: Text('Ghost'), onPressed: () {});
// Colors
Button.solid(
color: ButtonColor.primary,
child: Text('Primary'),
onPressed: () {},
);
// Sizes
Button.solid(
size: ButtonSize.lg,
child: Text('Large'),
onPressed: () {},
);
// Loading State
Button.solid(
isLoading: true,
child: Text('Loading...'),
onPressed: () {},
);
// With Icons
Button.solid(
startContent: Icon(Icons.download),
child: Text('Download'),
onPressed: () {},
);
Chip
// Basic Chip
NextChip.solid(child: Text('Solid Chip'));
// With Avatar
NextChip.solid(
avatar: CircleAvatar(child: Text('A')),
child: Text('Avatar Chip'),
);
// Closable
NextChip.solid(
child: Text('Closable'),
onClose: (event) => print('Chip closed'),
);
// Dot Variant
NextChip.dot(
color: ChipColor.success,
child: Text('Status'),
);
Checkbox
// Basic Checkbox
NextCheckbox(
children: Text('Accept terms'),
onValueChange: (value) => print('Value: $value'),
);
// Indeterminate
NextCheckbox(
children: Text('Select All'),
isIndeterminate: true,
);
// Checkbox Group
NextCheckboxGroup(
label: 'Select your interests',
children: [
NextGroupCheckbox(value: 'sports', children: Text('Sports')),
NextGroupCheckbox(value: 'music', children: Text('Music')),
NextGroupCheckbox(value: 'travel', children: Text('Travel')),
],
);
Radio Group
RadioGroup(
label: Text('Choose framework'),
children: [
NextRadio(value: 'flutter', child: Text('Flutter')),
NextRadio(value: 'react', child: Text('React Native')),
NextRadio(value: 'native', child: Text('Native')),
],
);
// Horizontal Layout
RadioGroup(
orientation: RadioGroupOrientation.horizontal,
children: [
NextRadio(value: 'yes', child: Text('Yes')),
NextRadio(value: 'no', child: Text('No')),
],
);
Circular Progress
// Indeterminate
NextCircularProgress(
label: Text('Loading...'),
);
// Determinate
NextCircularProgress(
value: 0.75,
isIndeterminate: false,
label: Text('Progress'),
showValueLabel: true,
);
// Custom Colors and Sizes
NextCircularProgress(
value: 0.8,
color: CircularProgressColor.success,
size: CircularProgressSize.lg,
strokeWidth: 4,
label: Text('Upload Complete'),
);
Example App ๐ฑ
The package includes a comprehensive example app showcasing all components:
cd example
flutter run
The example app features:
- 6 Interactive Tabs: Buttons, Chips, Checkboxes, Radio Groups, Progress, Typography
- Live Demonstrations: All variants, sizes, colors, and states
- Interactive Controls: Real-time component customization
- Best Practices: Proper usage patterns and code examples
Theme Customization ๐จ
Next UI components integrate with Flutter's Material Theme:
MaterialApp(
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
textTheme: TextTheme(
headlineSmall: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
),
home: MyHomePage(),
);
Custom Colors
// Components support multiple color variants
Button.solid(color: ButtonColor.primary); // Blue
Button.solid(color: ButtonColor.success); // Green
Button.solid(color: ButtonColor.warning); // Orange
Button.solid(color: ButtonColor.danger); // Red
Button.solid(color: ButtonColor.secondary); // Purple
API Reference ๐
Button
Property | Type | Description |
---|---|---|
child |
Widget? |
Button content |
onPressed |
VoidCallback? |
Tap callback |
variant |
ButtonVariant |
Visual style |
color |
ButtonColor |
Color theme |
size |
ButtonSize |
Button size |
isLoading |
bool |
Loading state |
isDisabled |
bool |
Disabled state |
startContent |
Widget? |
Leading icon |
endContent |
Widget? |
Trailing icon |
NextChip
Property | Type | Description |
---|---|---|
child |
Widget? |
Chip content |
variant |
ChipVariant |
Visual style |
color |
ChipColor |
Color theme |
size |
ChipSize |
Chip size |
avatar |
Widget? |
Avatar widget |
onClose |
Function? |
Close callback |
startContent |
Widget? |
Leading content |
endContent |
Widget? |
Trailing content |
NextCheckbox
Property | Type | Description |
---|---|---|
children |
Widget? |
Label content |
isSelected |
bool? |
Selection state |
onValueChange |
ValueChanged<bool>? |
Change callback |
color |
CheckboxColor |
Color theme |
size |
CheckboxSize |
Checkbox size |
isIndeterminate |
bool |
Indeterminate state |
isDisabled |
bool |
Disabled state |
isInvalid |
bool |
Invalid state |
Contributing ๐ค
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Testing ๐งช
For first time users, install the very_good_cli:
dart pub global activate very_good_cli
To run all unit tests:
very_good test --coverage
To view the generated coverage report you can use lcov:
# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
open coverage/index.html
License ๐
This project is licensed under the MIT License - see the LICENSE file for details.
Links & References ๐
Libraries
- next_ui
- Open source, Beautiful, modern and fast Flutter UI library.