Git Product home page Git Product logo

opxica / modular-ui Goto Github PK

View Code? Open in Web Editor NEW
228.0 2.0 25.0 591 KB

Create consistent and responsive cross-platform Flutter app interfaces in a snap with Modular UI's flexible building blocks.

Home Page: https://www.modularui.site

License: BSD 3-Clause "New" or "Revised" License

Dart 82.46% Kotlin 0.05% Swift 0.64% Objective-C 0.01% CMake 7.15% C++ 8.49% C 0.53% HTML 0.68%
dart dart-package flu flutter flutter-package flutter-ui ui-components ui-design uikit

modular-ui's Introduction

ModularUI : Pre-built beautiful flutter widgets Inspired by material-tailwind and shadcn/ui

Modular UI Badge Github Badge Twitter Badge Discord Badge

Craft beautiful, accessible, and responsive Flutter UIs with a Modular-UI Design-inspired component library


How to use

Installation

Run this command in your terminal

flutter pub add modular_ui

Import

Add this line to import the package.

import 'package:modular_ui/modular_ui.dart';

Modular UI Widgets:

Primary Cards

Image 2 Image 3 Image 5 Image 1 Image 4

Carousels

Gif 1 Gif 2 Gif 5
Gif 4 Gif 6 Gif 3

Buttons

Tab Bar

Image 2

Dialog Box

Image 2

Sliders

Image 2

Switch

Image 2

Our Widget Catalog

Cards

Buttons

Carousels

CheckBox

Dialogs

Footers

Input Fields

List Tiles

Rating Bars

Switch

Slider

Tabs


Code Samples

Buttons

Primary Button

 MUIPrimaryButton(
      text: "Primary Button",
      onPressed: () => onButtonPressed("Primary Button"),
    ),

Cards

Primary Card

  MUIPrimaryCard(
          title: 'UI/UX Review Check',
          description:
              'The place is close to Barceloneta Beach and bus stop just 2 min by walk and near to "Naviglio" where you can enjoy the main night life in Barcelona',
          image: Image.network(
            'https://images.unsplash.com/photo-1540553016722-983e48a2cd10?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&q=80',
            fit: BoxFit.cover,
          ),
          buttons: [
            MUIPrimaryButton(
              text: 'Read More',
              onPressed: () {},
            ),
          ],
        ),

Carousal

Primary Carousal

  MUICarousel(
            images: [
              "https://github.com/shadcn.png",
              "https://github.com/shadcn.png",
              "https://github.com/shadcn.png",
              "https://github.com/shadcn.png",
              "https://github.com/shadcn.png"
            ],
            indicatorType: CarouselIndicatorType.dot,
            duration: Duration(seconds: 2),
          ),

For more code samples, you can head on to our documentaion at . https://modularui.site


Features

  • Comprehensive Modular-UI Design components: Build modern and feature-rich interfaces with a wide range of buttons, cards, forms, navigation elements, and more.
  • Highly customizable: Tailor components to your exact needs with extensive styling options.
  • Responsive design: Ensure optimal UI experiences across different screen sizes.
  • Accessibility focus: Built with accessibility in mind, adhering to best practices.
  • Lightweight and performant: Efficiently crafted for smooth user interactions.

Additional Features

  • Custom themes and color palettes: Define your own visual style for a cohesive look.
  • Dark mode support: Seamlessly adapt your UI to user preferences.

Contributing

Calling on all the trendsetting Flutter enthusiasts! ❤️‍🔥 Join forces as we pioneer the creation of the ultimate, expansive, and seamless UI Library for Flutter. Let's make waves together! 🚀 Please refer to our contribution guidelines for details and don't forget to drop a Hi at discord


modular-ui's People

Contributors

aadhithya-d avatar aditya-mi avatar dev-o-los avatar omjogani avatar oxelf avatar pranavmasekar avatar user-23xyz avatar utkarsh4517 avatar yash-khattar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

modular-ui's Issues

Defining the development cycle for buttons

We will have following kind of buttons:

  1. Primary Button
  2. Loading Button
  3. Gradient Button
  4. Outlined Button
  5. Text Button
  6. Primary Block Button
  7. Loading Block Button
  8. Gradient Block Button
  9. Outlined Block Button
  10. Text Block Button
  11. Auth Button

Each Button should have Leading and Action widget parameters.

Create a primary button

This marks the beginning of modular-ui

Things needed to be done:

  1. create src folder inside lib

  2. Inside src create buttons

  3. Inside buttons folder create primary_button.dart

  4. Under lib/modular_ui.dart export primary_button,dart -> This will act as the entrypoint for our package like this:

library modular_ui;

export 'src/buttons/primary_button.dart';

Adding responsiveness with breakpoints to the required widgets.

I did a silly mistake making every widget size dynamic to the dimensions without adding any break-point.

with break-point I mean adding a maxWidth with a some default value to every required widget.
If the screen width is less than this value then the widget will be responsive to the screen size
Else if screen width is greater than this maxWidth then the widget width will be equal to maxWidth

and giving a widgetHeight property with some default value, we can also pass dynamic height to this widget while using it from an external application.

This will fix the error of overflows on various screen sizes.

Make switch widget color dynamic

Currently, in the switch widget the color change on toggle is static i.e. from black to white
make it dynamic so that user can define ON state color and OFF state color

Screenshot 2024-01-13 032218 Screenshot 2024-01-13 032234

File that needs changes :
modular_ui/lib/src/switch

button height changing with screen height is unintuitive

button height should't change with screen height. haven't seen material-tailwind or shadui doing it. button width factor makes sense. it would be great to have it constant or let the dev give height/width just like other flutter widget or let the button depend on its parent(how flutter does it now)

Set Initial Aspect Ratio on Cards

  • While Image is loading there should be pre-defined aspect ratio needs to be added...

Current Behavior

image

Expected Behavior (With Blank Image)

image


Walk through of the solution.

  • Just add AspectRatio Widget to occupy initial space for loading image and when Image is loaded it will be child of AspectRatio Widget.
  • This way we can get rid of loading image with less width and sudden width change while image get loaded.

Thanks!

Create a flutter web app

Create a flutter web app which acts as a console to view and use every widget of ModularUI

Needs to be discussed.

Implement Blog Card

Issue Description: Flutter Blog Card Implementation

Description:
The task is to create a Blog card in Flutter, mimicking the design provided in the Material Tailwind UI documentation for a profile card.

Link to UI - https://www.material-tailwind.com/docs/react/card#blog-card

Requirements:

Ensure that the Flutter blog card closely resembles the provided Material Tailwind UI profile card.
The component should adapt well to different screen sizes and orientations.
Allow dynamic content insertion into the component. Placeholder data can be used for testing purposes.
Testing Guidelines:

Verify that the profile card displays correctly on various devices and screen sizes.
Test the dynamic content integration by replacing placeholder data with real data.
Ensure that any interactive elements respond as expected.

Create Sign up card

Currently we have MUISignInCard.
Create a similar widget as MUISignUpCard
Add an extra textfield as ConfirmPassword textfield, password and confirm password should must match.

Some Minor changes is required in all the cards.

Sign in card

  • Instead of of asking a lot of parameters for auth buttons, we can just ask for a list of widgets.

Sign up card

  • Instead of of asking a lot of parameters for auth buttons, we can just ask for a list of widgets.

Simple Card

  • add vertical margin to the description
  • require the button as the widget itself.

Profile Card

  • Bug: Image size is unlimited
  • Require Image widget itself instead of imageUrl

Primary Card

  • add some vertical margin to title
  • require the button as the widget itself

Pricing Card

  • require the button as the widget itself

Blog Card

  • change onBlogCardTap to BlogCardOnPressed

CICD: github workflows for auto publishing

Having a github workflow setup for publishing the package to pub.dev will be a great way to get rid of manually updating it.

If this one sounds interesting, assign this one to me 👍🏼

Implement Secondary Buttons

We might need a secondary type for buttons which should identical to shadcn buttons.

  1. MUISecondaryButton
  2. MUISecondaryLoadingButton
  3. MUISecondaryBlockLevelButton
  4. MUISecondaryLoadingBlockLevelButton

Create a profile card

Issue Description: Flutter Profile Card Implementation

Description:
The task is to create a profile card in Flutter, mimicking the design provided in the Material Tailwind UI documentation for a profile card.

Link to UI - https://www.material-tailwind.com/docs/react/card#profile-card

Requirements:

  1. Ensure that the Flutter profile card closely resembles the provided Material Tailwind UI profile card.
  2. The profile card should adapt well to different screen sizes and orientations.
  3. Allow dynamic content insertion into the profile card. Placeholder data can be used for testing purposes.

Testing Guidelines:

  1. Verify that the profile card displays correctly on various devices and screen sizes.
  2. Test the dynamic content integration by replacing placeholder data with real data.
  3. Ensure that any interactive elements respond as expected.

Auto assign bot

Creating a github workflow for following usecase -

Usecase :

Contributor can comment /assign in any Github issue to assign that issue to himself/herself.

Implement Avatar

Issue Description: Implement Avatar Component

Description:
The task is to create the avatar component in Flutter, mimicking the design provided in the Shadcn documentation for a avatar.

Link to UI - https://ui.shadcn.com/docs/components/avatar

Requirements:

  • Should look and feel close to the Avatar component from Shadcn.
  • Needs to support fallback text, predefined size, bgColor.

Can somebody assign me for this?

Minor Changes in SignIn & SignUp Cards

Currently

image

Required Changes

  • Center the OR CONTINUE WITH text
  • SignIn or SignUp Button should take width according to device width and it should be flexible. In above image it doesn't make sense to have button width as width of card.
  • Change the cursor color to white
  • Icon of Apple and Facebook are too small.
  • There should be little space between Apple & Facebook and Don't have an account? text. When we long press the the Register now button it shows splash with no spacing.
  • Text of Button can be bold and little bigger

Let me know in case you have any question from above points...

Thanks You!

Add Prefix & Suffix Widget in TextField

Currently TextField doesn't have any icon as prefix icon or suffix icon. It's better to have optional prefix and suffix icon. So, When User need it they can directly used for performing different actions on textfield.

Currently

image

Expected

Prefix Icon

image

Suffix Icon

image

Development Walkthrough

  • Create optional parameter for prefixIcon & suffixIcon in lib/src/input_fields/primary_input_field.dart.
  • Pass the parameters to the actual components.
  • Test the Component is it working as expected.
  • onClick is working perfectly or not.
  • Raise the PR of your code

Thank You!

[Suggestion] - Replace getScreenWidth(context) with {num}.sw(context) and getScreenHeight(context) with {num}.sh(context)

This is much easier to understand and removes the need of {*} operator.

the abbreviation sh and sw stands for screenHeight and screenWidth respectively.

Code Implementation is down below

extension NumExt on num {
  double sh(BuildContext context) =>
      this * MediaQuery.of(context).size.height / 100;

  double sw(BuildContext context) =>
      this * MediaQuery.of(context).size.width / 100;
}

Implement Radio Button

Issue Description: Implement Radio Button Component

Description:
The task is to create the Radio component in Flutter, mimicking the design provided in the Shadcn documentation for a Radio .

Link to UI - https://ui.shadcn.com/docs/components/radio-group

Requirements:

Should look and feel close to the Radio Button component from Shadcn.
Needs to support predefined size, bgColor.
Can somebody assign me for this?

Implement Switch

Issue Description: Implement SwitchComponent

Description:
The task is to create the switch component in Flutter, mimicking the design provided in the Shadcn documentation for a switch.

Link to UI - https://ui.shadcn.com/docs/components/switch

Requirements:

Should look and feel close to the Switchcomponent from Shadcn.
Needs to support predefined size, bgColor.
Can somebody assign me for this?

Create a Loading button

Screenshot from 2024-01-02 14-14-50

This should take an async function for onTap behavior and should be in the loading state until the async function is executed.
Also ask about the text to show in the loading state along with the circular progress indicator.

Implement Alert Dialog

Issue Description: Flutter Alert Dialog Implementation

Description:
The task is to create a Alert Dialog in Flutter, mimicking the design provided in the ShadCN documentation for an Alert Dialog

Link to UI - https://ui.shadcn.com/docs/components/alert-dialog

Requirements:

Ensure that the Flutter Alert Dialog closely resembles the provided Shadcn.
The component should adapt well to different screen sizes and orientations.
Allow dynamic content insertion into the component. Placeholder data can be used for testing purposes.
Testing Guidelines:

Verify that the component displays correctly on various devices and screen sizes.
Test the dynamic content integration by replacing placeholder data with real data.
Ensure that any interactive elements respond as expected.

Tabs/Tabview Implementation

So I wanted to implement the Tab view and looked at the tailwind documentation for their Tabs component. https://www.material-tailwind.com/docs/react/tabs

The question I have is, do we want a real Tab view where you supply the tabs and children, or just the Tabs component where you can switch between tabs but need to use a page view and handle the children then for yourself. I think the last one brings more possibilities, like using the tabs as a segmented button.
Would love to hear your opinion before I start working on it!

Bildschirmfoto 2024-01-08 um 16 20 43

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.