atomsbox 0.4.0

A curated library of pre-styled, reusable components for Flutter developers to build apps at scale

atomsbox

A curated library of pre-styled, reusable Flutter widgets organized based on Atomic Design principles to build apps at scale.

Learn more at atomsbox.com!


Getting started

To use any pre-styled component from atomsbox, follow these steps:

  1. Add the latest version of the package in your pubspec.yaml:
dependencies:
  atomsbox: <latest_version>
  1. To keep atomsbox design, import the package and use the pre-defined theme from the library
import 'package:atomsbox/atomsbox.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: AppTheme.theme,
      darkTheme: AppTheme.darkTheme,
      themeMode: currentMode,
      home: const HomeScreen(),
    );
  }
}

Usage

Three examples of how to use atomsbox components in your Flutter apps. More components are available, check the component gallery at atomsbox.com!

Create an AppCardImageAndContentBlock pre-styled component

AppCardImageAndContentBlock(
  margin: const EdgeInsets.only(bottom: AppConstants.sm),
  headline: AppText('This is a card'),
  subhead: sampleText,
  actions: [
    AppFilledButton(
        onPressed: () {}, child: AppText('Action 1')),
    AppFilledButton.gradient(
        onPressed: () {}, child: AppText('Action 2')),
  ],
), 
atomsbox pre-styled card

Create an AppForm pre-styled component

AppForm(
  title: AppText('This is a form'),
  description: AppText('This is a form description'),
  formButton: AppFilledButton(
    onPressed: () {},
    child: AppText('Submit'),
  ),
  formItemNames: const ['One', 'Two', 'Three'],
  formItems: [
    AppTextFormField(),
    AppTextFormField(),
    AppTextFormField(),
  ],
),
atomsbox pre-styled form

Create an AppTab pre-styled component

AppTab(
  tabs: [
    Tab(
      icon: Column(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: [Icon(Icons.code), AppText('Atoms')],
      ),
    ),
    Tab(
      icon: Column(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: [Icon(Icons.code), AppText('Molecules')],
      ),
    ),
  ],
  children: [
    Column(
      children: [
        AppCard.elevated(
          height: 300,
          width: double.infinity,
          child: Center(child: AppText('Atoms')),
        ),
      ],
    ),
    Column(
      children: [
        AppCard.elevated(
          height: 300,
          width: double.infinity,
          child: Center(child: AppText('Molecules')),
        ),
      ],
    ),
  ],
),
atomsbox pre-styled tab

Apps built with atomsbox

  • Music App - an example of how to build a music app UI with atomsbox components.
atomsbox music-app atomsbox music-app
  • News App - an example of how to build a news app UI with atomsbox components.
atomsbox news-app atomsbox news-app atomsbox news-app

Components & Examples

Contributions are welcome! However, you can also request new components by opening a new issue and describing the desired component: Request a feature

Here is an extensive list of the currently available pre-styled components with their respective examples!

CategoryComponent
atomsApp Text
atomsApp Image
atomsApp Icon Button
atomsApp Text Button
atomsApp Elevated Button
atomsApp Filled Button
atomsApp Outlined Button
atomsApp Card
atomsApp Glass
atomsApp Gradient Background
atomsApp Slider
atomsApp Text Form Field
atomsApp Gradient Text
atomsApp Label
moleculesApp Expansion Tile
moleculesApp Segmented Button
moleculesApp List Tile
moleculesApp Card With Image And Content Block
moleculesApp Card Image Overlay
moleculesApp Rating Bar
moleculesApp Text Block
moleculesApp User Card
moleculesApp Search With Autocomplete
organismsApp Form
organismsApp Grid
organismsApp List
organismsApp Drawer
organismsApp Bottom Nav Bar
organismsApp Data Table
organismsApp Carousel
organismsApp Tab
organismsApp Tree View
organismsApp Audio Card

Contributions

Contributions are welcome! If you find a bug, have a feature request, or would like to improve the package, go ahead and create a new issue:

Feel free to get in touch to discuss more, email at: massimo@atomsbox.com