May 10, 2024
Introducing gluestack-ui for Flutter 🚀
Introducing gluestack-ui for Flutter, a simplified toolkit for creating seamless user interfaces with unmatched ease. Read on to simplify app development processes.
Author


Book a call
Table of Contents
In the ever-evolving landscape of app development, creating a cohesive and accessible user interface is more critical than ever. gluestack-ui for Flutter, inspired by it predecessor gluestack-ui, is not just a toolkit but a revolution in creating Flutter design systems with unmatched ease and simplicity.Â
Why gluestack-ui for Flutter?
How Can gluestack-ui Help You?
GSStyle object and has support for tons of inline styling options. You can check out the ever-expanding list of widget components that gluestack-ui supports here.Key Features of gluestack-ui for FlutterÂ
- Customizable Widgets: Each widget in gluestack-ui comes with a set of customizable properties, allowing developers to tailor the appearance and behavior of components to their specific needs.
- Declarative and Dynamic Styling: Utilizing JSON for style configurations enables a more declarative approach to UI design, making it easier to change styles dynamically or load them from external sources.
- Web-Focus: Optimized for web experiences, gluestack-ui offers components and styles that are responsive and optimized for desktop interaction and layout, including responsive design, mouse hover interactions, and web-specific UI patterns.
- Flexibility for Developers: Inline style overrides provide developers with the flexibility to customize components on a case-by-case basis without altering the JSON configuration for minor tweaks.
- Responsive Design: Built with modern web design principles, gluestack-ui widgets are fully responsive, ensuring seamless performance across a wide range of device platforms and screen sizes.
- Well-Documented: Comprehensive documentation for each widget, including a list of properties and examples, will help developers to get up and running easily.
- Easy to Use: Designed to be easy to integrate into existing Flutter applications, gluestack-ui requires minimal setup and configuration.
- Independent from Material Design Standards: By embracing independence from Material Design, gluestack-ui grants developers the freedom to craft UI components tailored to their application's unique needs and branding, potentially enhancing user experiences and reducing resource consumption.
Building Your First App with gluestack-ui
Install the Package
Or, you can do the same by adding the following to your pubspec.yaml file:
Or, for the latest development version:
Import the Package
Congratulations, you have now successfully included gluestack-ui for Flutter in your project!
Let's Get Building
Let us imagine that we are making an app that follows the design system of a certain well-known music streaming app. The goal is to make such a button:

Now for the button itself, it may end up looking something like below:
Use GSApp as the Entry Point of the App
Wrap the Entire Thing with GluestackProvider
ButtonChild to it as its child widget. The code would look something like this:But hey, what is this? The button does not look like what we are trying to make, it looks something like this:

What's a config? Configs are basically JSON files that gluestack-ui uses in the form ofMap<String, dynamic>type in Flutter, to give a default styling to the components like GSButton, GSText, etc. that are available under gluestack-ui for Flutter. With proper tools, one can export these config files directly from Figma and use them in their app directly!
full for now.backgroundColor in the config (via GluestackProvider, not in the file directly) or we could define primary color at entire app level, which makes more sense to do here as lots of other components will be using this. Here is how we can do so:We just made two changes, one in config and one in token, but we got the same result:

And this would be consistently applied to all other GSButton and gluestack-ui Flutter widgets! But that is not all. We can do some more fancy stuff thanks to GSStyle that gluestack-ui exposes. Let's say when we hover the mouse on the GSbutton we want button to get a bit expanded as a visual cue of hovering. We can do so by:
Resulting UI:

triggers accept GSStyle object as input, we can modify all possible props available in GSStyle such as padding, color, etc. to be applied when the onHover trigger is executed. Similarly, we also have triggers for screen break points, platforms, etc. This opens up tons of possibilities for powerful customization with minimal efforts.
Let's Build More
Switch - Let us say we want a basic Switch, which is aligned with our design system. Since we have declared our primary colors inside GluestackProvider. We can simply depend upon GSSwitch to create a Switch component aligned with our design language like so:
The output for the above looks like this:

For reference, this is how the output would have looked if we had not specified any custom config or customized token:

Easy and simple, right? Let's take on something a bit complex.
Let's Build Some More
Creating an Accordion can be a pain point to developers. With gluestack-ui though, you can simply depend upon GSAccordion to build one. It accepts an array of GSAccordionItem widget children which in turn take title and the content that needs to be displayed. The code for the above will look like this:
Output so far:

GluestackProvider. But to do, first we would need to refer Accordion's default config to understand what we need to modify, available here.fontWeight defined. We can infer that must be controlling font weight of some text, but we also notice that it is defined, multiple times under _titleText and the _contentText . Since the goal is to change the title text, let us focus there. We can see where it is defined to get a bit more idea. We can see that fontWeight for _titleText is declared in multiple places, inside of sm, md ,lg under size under vairant.Based on the above, we can infer that base config takes defines multiple size variants, namely, sm, md, lg which define config for title text and content text of the GSAccordion widget. We can simply change the fontWeight value for the title text (_titleText) value for the specific size, if we wish, or all instances of fontWeight to be normal. How did we know that we wanted declaring normal is allowed? We referred the default text tokens defined for gluestack-ui, available here, to know what values are allowed in the config. Do not change the base config files directly, unless you know what you're really doing! Generally, the safer option is to create a Map with variants and other config keys and values that we want to change or override, for our case since we want to override, fontWeight inside size inside variants. Our config map would look like this:
Now all that remains is to provide this value to the GluestackProvider, which would signify that we wish to override these keys and values present in the base Accordion config file. We can do this by:
Which results in:

Showcase and Demos
Checkout the Kitchensink interactive web app, created entirely by using gluestack-ui for Flutter. Demo here.

Conclusion
Subscribe to Our Newsletter
Subscribe to RSS
Press & Media Hub RSS FeedRelated Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Jun 27, 2026
Building a Resilient Hybrid-Cloud Network with WireGuard HA, Route-Based Failover, and Deep Observability

Jun 19, 2026
We Built a 114-Second AWS-to-Azure Failover. Here’s What We Learned

Jun 12, 2026
Cloud-Native and Cloud-Agnostic Are Not Ideologies; They Are Business-Stage Decisions

Jun 8, 2026
Geeklego: The Open-Source Design System Built to Work With AI

May 18, 2026
Your Vibe Code Has No Memory. DESIGN.md Fixes That.

May 14, 2026
