Getting started
Install Remix from pub.dev and render your first styled button
Remix can be used directly as a widget library. You do not need the CLI or a preset for this path. If you want editable component recipes instead, follow the CLI tutorial.
Start with AI
To have a coding agent do the setup, paste this prompt into an agent opened at the root of a Flutter app. This path uses the CLI: the agent installs Remix, pins the registry, and copies the Remix skills from the pinned commit into the project. The agent then works from guidance that matches the code it installs.
Set up Remix, a Flutter component library, in this Flutter app.
1. Run `flutter --version`. Stop and tell me if Flutter is older than 3.44.
2. Add Remix and install its CLI globally, at these versions. An install
without a version selects an old 0.x release:
flutter pub add 'remix:^1.0.0-rc.4'
dart pub global activate remix_cli '^1.0.0-rc.1'
If `remix` is not found afterward, add Pub's bin directory to PATH as the
activate output says.
3. Pin the registry. Use `--preset fortal` or `--preset heroui` if I asked
for one:
remix init --preset vanilla
4. Install the Remix skills at that pin:
remix skills install
If you load project skills from another directory, add `--dir <path>`.
Claude Code uses `--dir .claude/skills`. If the command says to add
`@AGENTS.md` to CLAUDE.md, do it.
5. Read the installed `using-remix/SKILL.md` and follow it for the rest:
add a button with `remix add button`, place the theme scope, and render
the button on the first screen.
Done when:
- `remix.skills.json` and `remix.yaml` name the same `@remix` revision.
- AGENTS.md has one `remix_cli:skills` block that lists `using-remix`.
- The first screen renders the installed button, imported from the
`ui/ui.dart` barrel, with the installed theme above the Navigator.
- `flutter analyze` reports no issues, and you edited no `*.g.dart` file.Commit the files the agent adds. Run remix skills install again after you
move the registry pin. See Agent skills for
what the command writes.
To set up Remix by hand, without the CLI, continue with the next section.
Installation
Remix needs Flutter 3.44 or newer, which bundles Dart 3.12. Check your SDK:
flutter --versionCreate an application and add Remix. Pin the prerelease. An unversioned
install selects the older 0.2.0 stable line, which these docs do not
describe.
flutter create --empty remix_example
cd remix_example
flutter pub add 'remix:^1.0.0-rc.4'Every published version is listed on pub.dev. Contributors who build against a checkout of this repository add the package by path instead; see the contributor notes.
Your first component
Replace lib/main.dart with this example:
import 'package:flutter/widgets.dart';
import 'package:remix/remix.dart';
void main() => runApp(const ExampleApp());
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
final button = ButtonStyler()
.padding(.horizontal(16))
.padding(.vertical(10))
.color(const Color(0xFF2196F3))
.borderRadius(.circular(8))
.label(.color(const Color(0xFFFFFFFF)));
return WidgetsApp(
color: const Color(0xFFFFFFFF),
builder: (context, child) => ColoredBox(
color: const Color(0xFFFFFFFF),
child: Center(
child: button(
label: 'Click me',
onPressed: () => debugPrint('Button pressed'),
),
),
),
);
}
}Run flutter run. You should see a blue button with a white label, and pressing
it should print Button pressed in the debug console.
ButtonStyler holds the appearance. Calling it produces a RemixButton;
your callback supplies the application action. WidgetsApp supplies the Flutter
host; Remix supplies the component and its styling.
Next steps
- Style states and reuse a base style.
- Check host requirements before adding menus or dialogs.
- Build a settings screen with the CLI to learn the application-owned recipe workflow.