shadcn_flutter Documentation

repository·master·Indexed 21 days ago

https://github.com/sunarya-thito/shadcn_flutter

A comprehensive UI ecosystem for Flutter inspired by the shadcn/ui design system, featuring over 84 customizable components across categories like Forms, Layout, Navigation, and Surfaces. It supports cross-platform development (Android, iOS, Web, macOS, Windows, and Linux) and can be used as a full replacement for Material/Cupertino or adopted incrementally. The ecosystem includes shadcn_flutter_genui, which enables the rendering of AI-generated interfaces using the A2UI protocol and OpenRouter models.

Tokens
102.2K
Snippets
264
Records
424
Agent score
75%

What's inside shadcn_flutter

  1. Introduction to shadcn_flutter

    master

    shadcn_flutter is a cohesive UI ecosystem for Flutter applications (mobile, web, and desktop) based on the shadcn/ui design system. It is designed to provide a consistent, production-ready experience that can replace Material or Cupertino design systems.

    Key features include:

    • Over 84 components.
    • A standalone ecosystem that does not require Material or Cupertino, though it supports interop.
    • Implementation of shadcn/ui design tokens and the 'New York' theme.
    • Cross-platform support for Android, iOS, Web, macOS, Windows, and Linux.
    • Typography extensions for various widget purposes.
  2. Overview of GenUI Chat Example

    master

    The GenUI Chat Example is a full chat application that integrates OpenRouter models with shadcn_flutter widgets. It uses the genui package and the shadcn_flutter_genui catalog to transform model responses into interactive UI.

    Key features:

    • Plain Text Replies: Rendered as standard chat bubbles using shadcn_flutter's ChatBubble.
    • Live UI Generation: When the model emits A2UI messages, they are parsed and rendered inline as real shadcn_flutter widgets (e.g., forms, cards, buttons, sliders, tabs).
    • Interactive Loops: User interactions with the generated widgets are fed back to the model to maintain conversational context.
  3. Overview of shadcn_flutter packages

    master

    The shadcn_flutter monorepo contains several specialized packages for using shadcn-inspired components in Flutter:

    • shadcn_flutter: The core published library. This is the primary package you will install to use the components in your applications.
    • shadcn_flutter_genui: A GenUI catalog designed to render AI-generated interfaces using shadcn_flutter widgets.
    • shadcn_flutter/example: A minimal consumer application demonstrating how to integrate and use the library.
    • docs: A Flutter Web-based component gallery and documentation site.
    • gen: Developer tooling for generating icons, styles, colors, and documentation/LLM references.
  4. Overview of shadcn_flutter

    master
    shadcn_flutter is a cohesive UI ecosystem for Flutter (mobile, web, and desktop) based on the shadcn/ui design system. It is designed to provide a production-ready experience that allows developers to build professional UIs without relying on Material or Cupertino widgets. It features over 84 components, full support for shadcn/ui design tokens, and is optimized for WebAssembly (WASM).
  5. Configure the Carousel component

    master

    The Carousel component provides a flexible way to display a sequence of items with support for sliding or fading transitions, autoplay, and manual navigation.

    Key Features

    • Transitions: Supports sliding and fading with customizable timing.
    • Autoplay: Configurable automatic progression with autoplaySpeed and autoplayReverse options.
    • Navigation: Programmatic control via CarouselController and support for touch gestures/dragging.
    • Layout: Supports both horizontal and vertical orientations (Axis), multiple alignment options, and responsive sizing via CarouselSizeConstraint.
  6. Features of CodeSnippet

    master

    The CodeSnippet component includes the following built-in features:

    • Syntax Highlighting: Supports automatic language detection and coloring.
    • Copy to Clipboard: Includes a built-in copy button that provides toast confirmation.
    • Custom Actions: Allows adding extra buttons via the actions property.
    • Responsive Design: Supports both horizontal and vertical scrolling for long code blocks.
    • Theme Integration: Automatically adapts to light and dark themes.
    • Loading States: Provides smooth loading indicators during initialization.