Skip to main content

una 0.1.2 copy "una: ^0.1.2" to clipboard
una: ^0.1.2 copied to clipboard

A themeable Flutter design system: 100+ widgets, frosted-glass surfaces, desktop and phone metrics in one theme, Liquid Glass on iOS and macOS, and no Material dependency.

Interfaces that feel at home, on every screen.

Over a hundred beautifully crafted components that adapt seamlessly across desktop, mobile, and web.
Liquid Glass on Apple platforms. Includes skills for agentic engineering.

pub package Flutter test MIT licence

Component library · Live demos · Quick start · Theming · Agent skills

A wall of una components, among them a chart, a sign-up form, a calendar, a chat, a settings list, a command palette, toasts and a one-time code field

una is a design system for Flutter. One UnaThemeData themes every widget, the same code lays itself out for a desktop window and for a phone, and the bars, sheets and controls become Liquid Glass on iOS and macOS. It does not depend on Material.

flutter pub add una
dart run skills@ get una

Live demos #

Four apps that showcase what you can build with una. The apps adapt seamlessly to any device, so try them on different-sized windows.

Una Social in a desktop window and on a phone

Una Social
A feed, stories, groups, a marketplace and a messenger.
Open the app · Source

Una Cowork in a desktop window and on a phone

Una Cowork
Team boards with cards you drag, an inbox and templates.
Open the app · Source

Una Banking in a desktop window and on a phone

Una Banking
Accounts, cards, payments, savings and analytics.
Open the app · Source

Una Dating in a desktop window and on a phone

Una Dating
Profiles to swipe, matches and chat.
Open the app · Source

Liquid Glass on Apple platforms #

Five phone screens from the iOS Simulator, with a glass tab bar over a photograph, a glass sheet over a blurred feed, a glass segmented control, switch and slider, and glass bar buttons

On iOS and macOS, natively and in a browser, the bars, sheets, menus and lens controls (switch, slider, segmented control, tab bar) are drawn with liquid_glass_widgets. Nothing in your code changes. On every other platform the same surfaces are una's own frosted glass. The screens above are captures from the iOS Simulator.

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // Loads the shaders, so the first glass is not a frame late.
  await LiquidGlass.initialize();
  runApp(const MyApp());
}

UnaThemeData(liquidGlass: const LiquidGlassTheme(mode: LiquidGlassMode.never)) keeps the frosted look everywhere, and LiquidGlassMode.always shows the glass on any platform.

One theme, two form factors #

One screen of Una Banking in a desktop window and on a phone, built from the same widgets, with the phone's larger controls and a floating tab bar

Every style has desktop metrics and phone metrics, and UnaApp picks one from the window's width. A UnaButton is 36 points tall on a desktop and 44 on a phone, with no if (isMobile) in your code. Where a screen is arranged differently on a phone, branch on the theme, not on the window.

FormFactorBuilder(
  mobile: (context) => const ConversationList(),
  desktop: (context) => const Row(
    children: [ConversationList(), Expanded(child: Conversation())],
  ),
)

Spacing comes from the theme too. Name the relationship between two things and the theme picks the number.

UnaPageContainer(
  scrollable: true,
  child: UnaColumn(
    gap: GapSize.lg, // 16 on a desktop, 12 on a phone
    crossAxisAlignment: CrossAxisAlignment.stretch,
    children: [
      const Text('Jobs'),
      UnaRow(gap: GapSize.md, children: stats),
      const Gap.xl(),
      results,
    ],
  ),
)

Theming #

The same card in the fluid, crisp, pebble and sharp styles, light above and dark below, each on a different colour scheme

UnaThemeData() is the default look, the fluid style on the Slate colour scheme. A theme is a style, a colour scheme and a text theme, and each can be replaced on its own.

UnaThemeData(
  style: StyleTokens.crisp,
  colorScheme: const IrisColorScheme.light().copyWith(
    primary: const Color(0xFF6D28D9),
  ),
  radius: const BorderRadius.all(Radius.circular(6)),
)
  • Four styles. fluid is the default, with glass, springs and soft radii. crisp is compact and neutral, pebble is round and roomy, and sharp is square and dense.
  • Seven colour schemes, each light and dark on one ladder of lightness, so none is louder than another. UnaColorScheme.fromSeed makes one from any colour.
  • Every token is yours. A style is a set of measured tokens (control heights, radii, shadows, type roles, glass, spacing, motion), changed with StyleTokens.fluid.copyWith(...); each component also has its own theme on UnaThemeData.
  • Motion on springs. Durations and springs live on the style, an interrupted animation keeps its velocity, and reduced motion is honoured everywhere.

The theme editor restyles the whole component library while you pick a look, a colour and a font, then hands you the UnaThemeData as code.

The component library at una.serverpod.dev with the theme editor docked beside it

Quick start #

flutter pub add una
dart run skills@ get una
import 'package:flutter/widgets.dart';
import 'package:una/una.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return UnaApp(
      theme: UnaThemeData(),
      darkTheme: UnaThemeData(brightness: Brightness.dark),
      themeMode: UnaThemeMode.system,
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: UnaCard(
        style: const UnaCardTheme(width: 320),
        title: const Text('Create project'),
        description: const Text('Deploy your new project in one click.'),
        footer: UnaButton(
          onPressed: () {},
          child: const Text('Deploy'),
        ),
        child: const UnaTextField(placeholder: Text('Name of your project')),
      ),
    );
  }
}

The component library is the full reference, with a page per component and guides on theming, layout, form factors, motion, forms and overlays.

Skills for coding agents #

skills/una-overview/ is an Agent Skill that holds una's API as an agent reads it, with a page per component and its examples, and guides on app structure, theming, layout, forms, overlays and the mistakes to avoid. Add it to your project with dart run skills@ get una after adding the package, and the agent writes una the way the documentation does. The component pages are generated from the same source as the component library, so the two do not drift.

Good to know #

  • Names. Every component and theme type carries the Una prefix, as in UnaButton, UnaCard, UnaTheme and UnaThemeData, and so does everything named after one (UnaButtonVariant, UnaButtonTheme, showUnaDialog). Utilities and tokens such as Gap, Pressable, Motion and StyleTokens have none. No component shares its name with a Material widget, so a file can import both libraries. InputDecorator, TimeOfDay, DateTimeRange and DayPeriod do share Material's names, and there you hide one side.
  • Icons. The Phosphor icons are bundled in six weights and drawn with const PhosphorIcon(PhosphorIconsRegular.house). A release build keeps only the glyphs your app uses.
  • Fonts. una bundles no text fonts, so text is set in the platform's font until you choose one. Use UnaThemeData(textTheme: UnaTextTheme.fromGoogleFont(GoogleFonts.inter)) with google_fonts, or UnaTextTheme(family: 'Inter') with your own files. The default look was designed around Geist.
  • Material and Cupertino. Opt in with package:una/material.dart and wrap the app in a UnaMaterial, as in UnaApp(builder: (context, child) => UnaMaterial(child: child!), ...). It derives a Material theme from the una theme.
  • Accessibility. Reviewed against the WAI-ARIA patterns and WCAG 2.2 AA. A control is one named node, a composite is one Tab stop walked with the arrow keys, and what changes out of focus is announced.
  • Localised in 82 locales.
  • Platforms. Android, iOS, macOS, Windows, Linux and the web, including WebAssembly. Requires Flutter 3.50 or later (Dart 3.14).
  • Versioning. una is at 0.x, so the API can still change between minor versions, with no deprecation shims. Every change is in the changelog.

Contributing #

Contributions are welcome, and CONTRIBUTING.md says how. To report a security problem, see SECURITY.md.

Credits #

una is made by Serverpod. It is a fork of shad, which began as flutter-shadcn-ui by Alexandru Mariuti, a Flutter port of shadcn/ui. Its icons are Phosphor Icons, bundled under the MIT License, and its Liquid Glass is drawn by liquid_glass_widgets.

Licence #

MIT

11
likes
160
points
223
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A themeable Flutter design system: 100+ widgets, frosted-glass surfaces, desktop and phone metrics in one theme, Liquid Glass on iOS and macOS, and no Material dependency.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#user-interface #design-system #theming #material-alternative #widget

License

MIT (license)

Dependencies

boxy, collection, cupertino_icons, flutter, flutter_localizations, intl, liquid_glass_widgets, slang, slang_flutter, theme_extensions_builder_annotation, two_dimensional_scrollables, web

More

Packages that depend on una