Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.36 KB

README.md

File metadata and controls

52 lines (35 loc) · 1.36 KB

blade-boring-avatars

A Blade version of Boring Avatars. Built using Laravel Blade.

Based on Boring Avatar's description,

Boring Avatars a tiny JavaScript React library that generates custom, SVG-based, round avatars from any username and color palette.

Here I make a blade component to use in your laravel projects

Features

Installation

composer require khaled-sadek/blade-boring-avatars

Props

Props:

  • size: number
    • Default: 40
  • name: string
    • Default: "Clara Barton"
  • colors: array[]
    • Accepts a php array of colors.
    • Default: ["#92A1C6", "#146A7C", "#F0AB3D", "#C271B4", "#C20D90"]

Usage

Basic usage (with default props):

<Avatar />

With props:

  <!--
      view.blade.php
      Where $colors is php valid array
  -->
  <Avatar size="80" name="Khaled Sadek" :colors="$colors" />

Credits

Credits to @hihayk (GitHub) and @josep_martins (GitHub) for creating the original Boring Avatars library at boringdesigners!