Skip to content

Theme Data

Defines the theme and color scheme for the app.

The supported color schemes are:

  • blue
  • gray
  • green
  • neutral
  • orange
  • red
  • rose
  • slate
  • stone
  • violet
  • yellow
  • zinc

Usage

import 'package:shadcn_ui/shadcn_ui.dart';
@override
Widget build(BuildContext context) {
return ShadApp(
darkTheme: ShadThemeData(
brightness: Brightness.dark,
colorScheme: const ShadSlateColorScheme.dark(),
),
child: ...
);
}

You can override specific properties of the selected theme/color scheme:

import 'package:shadcn_ui/shadcn_ui.dart';
@override
Widget build(BuildContext context) {
return ShadApp(
darkTheme: ShadThemeData(
brightness: Brightness.dark,
colorScheme: const ShadSlateColorScheme.dark(
background: Colors.blue,
),
primaryButtonTheme: const ShadButtonTheme(
backgroundColor: Colors.cyan,
),
),
),
child: ...
);
}