tsai_ui 0.3.2 copy "tsai_ui: ^0.3.2" to clipboard
tsai_ui: ^0.3.2 copied to clipboard

Enterprise Flutter UI components backed by the Tsai design system.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tsai_ui/tsai_ui.dart';

import 'catalog_app.dart';

void main() => runApp(const CatalogApp());

/// A compact example of theming and composing Tsai UI components.
class QuickStartExample extends StatefulWidget {
  const QuickStartExample({super.key});

  @override
  State<QuickStartExample> createState() => _QuickStartExampleState();
}

class _QuickStartExampleState extends State<QuickStartExample> {
  bool _acceptedTerms = false;

  @override
  Widget build(BuildContext context) => Scaffold(
    body: SafeArea(
      child: Center(
        child: SingleChildScrollView(
          padding: const EdgeInsets.all(24),
          child: ConstrainedBox(
            constraints: const BoxConstraints(maxWidth: 480),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.stretch,
              children: [
                const TsaiTextHeading(
                  'Create your workspace',
                  size: TsaiHeadingSize.extraLarge,
                ),
                const SizedBox(height: 8),
                const TsaiTextBody(
                  'Compose accessible Flutter interfaces with Tsai UI.',
                  size: TsaiBodySize.large,
                  weight: TsaiTextWeight.regular,
                ),
                const SizedBox(height: 32),
                const TsaiInput(
                  placeholder: 'Work email',
                  keyboardType: TextInputType.emailAddress,
                  autofillHints: [AutofillHints.email],
                ),
                const SizedBox(height: 20),
                TsaiCheckbox(
                  value: _acceptedTerms,
                  label: 'I agree to the terms of service',
                  onChanged: (value) =>
                      setState(() => _acceptedTerms = value ?? false),
                ),
                const SizedBox(height: 24),
                TsaiButton(
                  label: 'Create workspace',
                  isExpanded: true,
                  onPressed: _acceptedTerms
                      ? () => ScaffoldMessenger.of(context).showSnackBar(
                          const SnackBar(content: Text('Workspace created')),
                        )
                      : null,
                ),
                const SizedBox(height: 12),
                TsaiButton(
                  label: 'Browse the component catalog',
                  variant: TsaiButtonVariant.outline,
                  isExpanded: true,
                  onPressed: () => Navigator.pushNamed(context, '/buttons'),
                ),
              ],
            ),
          ),
        ),
      ),
    ),
  );
}
0
likes
0
points
1.28k
downloads

Documentation

Documentation

Publisher

verified publishertsai.tech

Weekly Downloads

Enterprise Flutter UI components backed by the Tsai design system.

Homepage
Repository (GitHub)
View/report issues

Topics

#components #design-system #flutter #ui #widget

License

unknown (license)

Dependencies

flutter, flutter_lucide

More

Packages that depend on tsai_ui