A Dart library providing pre-generated Jaspr components for Lucide SVG icons, ready for use in Jaspr projects.
- Reusable Jaspr components for Lucide icons.
- Customizable attributes like
width
,height
,viewBox
, etc. - Easy import via a single export file.
Add the library to your pubspec.yaml
:
dependencies:
jaspr_lucide: ^0.3.0
jaspr: ^0.19.0
Run:
dart pub get
Import the library and use the generated Lucide icon components in your Jaspr project:
import 'package:jaspr_lucide/jaspr_lucide.dart';
@override
Iterable<Component> build(BuildContext context) sync* {
yield
section([
Dog(
width: Unit.pixels(32),
height: Unit.pixels(32),
attributes: {'stroke': 'blue'},
),
House(
width: Unit.pixels(32),
height: Unit.pixels(32),
attributes: {'stroke': 'blue'},
),
])
);
}
Each icon component supports parameters:
width
: Set the icon width (e.g.,Unit.pixels(32)
).height
: Set the icon height (e.g.,Unit.pixels(32)
).viewBox
: Override the SVG viewBox (optional).attributes
: Additional SVG attributes (e.g.,{'stroke': 'blue'}
).
All Lucide icons are available as components, named in camalCase (e.g., homeIcon
, starIcon
, userIcon
).
- Ensure your project uses a compatible version of
jaspr
(seepubspec.yaml
). - Icon components are pre-generated and optimized for Jaspr’s rendering.
Submit issues or pull requests to improve the library, such as adding support for new icons or enhancing component features.
MIT License. See the LICENSE file for details.