GithubHelp home page GithubHelp logo

breadcrumbs's Introduction

breadcrumb_web

GitHub license Pub Version

A Flutter package for creating responsive and customizable breadcrumb widgets, ideal for web applications. breadcrumb_web offers an easy way to display a navigation trail for users and enhance their browsing experience in Flutter web projects.

Features

  • Customizable Breadcrumbs: Easily customize font, color, size, and spacing of breadcrumbs.

  • Responsive Design: Adapts to different screen sizes for optimal display.

  • Hover Effects: Optional scale effect on hover for better UI interaction.

  • Icon Support: Include icons in your breadcrumbs for a more intuitive design.

  • Callback Functions: Execute specific functions when a breadcrumb is clicked.

  • Accessibility Support: Designed with accessibility in mind, ensuring a wider user reach.

Getting Started

To use this package, add breadcrumb_web as a dependency in your pubspec.yaml file.

dependencies:
breadcrumb_web: ^1.0.0

Usage

Here is a quick example to get you started:

import 'package:flutter/material.dart';

import 'package:breadcrumb_web/breadcrumb_web.dart';

void main() {

    runApp(MyApp());

}

class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Breadcrumb Web Example',
        home: Scaffold(
          appBar: AppBar(
            title: Text('Breadcrumb Web Example'),
          ),
          body: Center(
            child: BreadcrumbTrail.getCrumbsForWeb(
              crumbs: ['Home', 'Category', 'Item'],
              callbacks: [
                () async => print('Home clicked'),
                () async => print('Category clicked'),
                () async => print('Item clicked'),
              ],
              crumbFontFamily: 'Roboto',
              crumbFontWeight: FontWeight.w600,
              crumbFontColor: Colors.blue,
              crumbSpacing: 8.0,
              scaleOnHover: 1.2,
              crumbFontSize: 16.0,
              crumbIcon: Icons.arrow_forward_ios,
              crumbIconSize: 14.0,
              crumbIconColor: Colors.grey,
            ),
          ),
        ),
      );
    }
}

Customization

BreadcrumbTrail class allows you to customize the following properties:

  • crumbs: A list of strings representing the breadcrumb titles.

  • callbacks: A list of functions to be called when a breadcrumb is tapped.

  • crumbFontFamily: Font family of breadcrumb text.

  • crumbFontWeight: Weight of the font for breadcrumb text.

  • crumbFontColor: Color of the breadcrumb text.

  • crumbSpacing: Space between each breadcrumb item.

  • scaleOnHover: Scale factor when hovering over the breadcrumb (for web).

  • crumbFontSize: Font size of breadcrumb text.

  • crumbIcon: The icon to display between breadcrumbs.

  • crumbIconSize: Size of the icon between breadcrumbs.

  • crumbIconColor: Color of the icon between breadcrumbs.

Contributing

Contributions are welcome! If you have a feature request or bug report, please open an issue on our GitHub repository.

License

This project is licensed under the Unlicense - see the LICENSE file for details.

breadcrumbs's People

Contributors

tratum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.