responsive_styles 1.10.4
responsive_styles: ^1.10.4 copied to clipboard
You don't need to be worried just because you have to support multiple screens
@displaykit/responsive_stylesheet #
You don't need to be worried just because you have to support multiple screens πΊ π₯ π» π±
It's a set of common utility strategies to work with responsive styles with CSS in JS and Flutter
Summary #
Dart/Flutter π¦ #
How to install? #
flutter pub add responsive_styles
Get started #
- Check this file to see a small example project
- Go direct to usage in this line
Demo #

body: Container(
color: responsive.value({
Breakpoints.xs: Colors.red.shade200,
Breakpoints.sm: Colors.yellow.shade200,
Breakpoints.md: Colors.green.shade200,
Breakpoints.lg: Colors.blue.shade200,
Breakpoints.xl: Colors.purple.shade200,
}),
)
Learn more looking at the code example with a small implementation
Or this one of the gif with the Web "Holy Grail Layout"
Other demos
- Basic demo
- Code
- Holy grail layout
- Code
- Chat App
- Code
JavaScript/React β #
How to install? #
yarn add @displaykit/responsive_stylesheet
Get started #
- Check this project to see a small example project
- Go direct to usage in this line
Demo #
Docs #
What are the default values for the breakpoints? #
xs: 0From 0 screen width until 479sm: 480From 480 screen width until 767md: 768From 768 screen width until 991lg: 992From 992 screen width until 1199xl: 1200From 1200 and beyond
All values from here came from other libraries and responsive Front End frameworks.
Can I customize the breakpoints? #
Today, no. But it's in the have a way to do this but the names xs...xl will remain part of the library to make it easier to use the abstractions.
Resources and features #
| Feature. | Dart/Flutter | JavaScript/React |
|---|---|---|
| Responsive | β | β |
| breakpoints | β | β |
| GridItem | β | π§ |
| BreakpointsProvider | π§ | π§ |
| parseStylesheet | π§ | β |
| StyleSheet | π§ | β |
| BaseComponent | π§ | π§ |
β Ready, π§ WIP, β Not in roadmap by now, πΊοΈ Inside roadmap
Other project stuff #
Contributing #
Want to contribute to the project? Check our guide with how and our code guidelines
How to report a bug? #
Please just open an issue with a link do a small reproduction of the bug and let's discuss it
License #
MIT License Β© Mario Souto