prismatic gives you two effects. Each is one small shader, made for Flutter's Impeller renderer. They run on Skia and the web too.
A beam of light that travels around a widget's border. Put it on a card while an agent works, on a search bar, or on anything that is thinking.
BorderBeam(
borderRadius: 16,
colors: BeamColors.ocean,
child: card,
)Pick the effect that fits:
rotatelaps the border. It's the default.linerides one edge. Lovely on inputs.pulsebreathes in from every side. A calm "thinking" state.
There are 19 palettes, squircle corners, a theme and a controller. Use the same radius as your widget, and the light sits right on its edge.
A colourful wave that bends one screen into the next. Use it when someone pays, sends, finishes a step, or succeeds.
![]() vertical: up from a button |
![]() horizontal: across from an edge |
![]() center: a ring from an icon |
DistortionWave(
revealed: sent,
revealedChild: const ReceiptScreen(),
child: ReviewScreen(
send: DistortionWaveAnchor(
child: FilledButton(
onPressed: () => setState(() => sent = true),
child: const Text('Send'),
),
),
),
)Flip revealed to send the wave out. Flip it back to bring it home. The
anchor tells the wave where to start, and it leans toward your finger.
Going to a new page? Push a DistortionWaveRoute:
Navigator.of(context).push(
DistortionWaveRoute<void>(
source: WaveSource.of(context),
builder: (_) => const ReceiptScreen(),
),
);Five palettes come built in, and any BorderBeam palette works too
through WavePalette.fromBeamColors(BeamColors.aurora). Or pass your own
colours:
DistortionWave(
palette: const WavePalette(
colors: [Color(0xFF7C5CFF), Color(0xFF39C6FF), Color(0xFF4CF2B5)],
ahead: Color(0xFFFF8FD8),
behind: Color(0xFF3D5AFE),
),
// ...
)flutter pub add prismaticimport 'package:prismatic/prismatic.dart';You need Flutter 3.47 or newer. Load the shaders before your first frame, so the very first beam or wave is smooth:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await BorderBeam.precache();
await DistortionWave.precache();
runApp(const App());
}- Give both screens of a wave an opaque background. The wave paints pictures of them.
- The beam reads your light or dark theme from
material_ui. Still onpackage:flutter/material.dart? SetBeamStyle(theme: BeamTheme.dark)yourself. - Both effects respect the system's reduced-motion setting.
- Live demo in your browser.
- The example app:
cd example && flutter run.
- API reference on pub.dev.
- Guides for every option, written for you and your coding agent.
- Contributing: how to build, test and send a change.
Both effects began as designs by Jakub Antalik: border-beam (React) and Distortion waves (SwiftUI), both MIT. prismatic recreates their look with its own Flutter renderer. If you like it, go star the originals.



