Giter Site home page Giter Site logo

cmgriffing / boringer-avatars Goto Github PK

View Code? Open in Web Editor NEW
126.0 1.0 4.0 2.05 MB

A fork from boring-avatars. This rewrites the base as Mitosis components and exports into multiple framework flavors.

Home Page: https://cmgriffing.github.io/boringer-avatars/

License: MIT License

JavaScript 12.86% TypeScript 54.08% HTML 1.22% CSS 1.97% Svelte 5.56% Vue 13.53% Mustache 3.63% Astro 1.69% Rust 5.44% SCSS 0.02%

boringer-avatars's Introduction

Boringer Avatars

Boringer Avatars is a tiny JS library that generates custom, SVG-based avatars from any username and color palette.

Origins

This repo is hard-forked from https://github.com/boringdesigners/boring-avatars.

That repo is React-specific. Other users have forked it into framework specific libraries. But as new frameworks come out, that requires yet another codebase and maintainer.

In this repo, we rewrote the components into Mitosis components. This allows us to export the components into a multitude of other frameworks.

Frameworks/Packages

For specific usage, please see the README for whichever framework you need.

We currently support:

Contributing

Want to see another framework supported? Have a way of improving Typescript Types output? Feel free to create an Issue or Pull Request.

Development

To develop and run the project locally, you will need:

  • Node: >= 18

  • pnpm: >= 7.4.0

Installation

Installing the dependencies is done via pnpm:

yarn install

This will install all depencies for the packages and apps within the workspace.

License

MIT License

Copyright (c) 2021 boringdesigners

Copyright (c) 2022 cmgriffing

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

boringer-avatars's People

Contributors

cmgriffing avatar

Stargazers

J. Degand avatar Breno Reis avatar  avatar Rowan Aldean avatar Samet Aydemir avatar Gökay Gürcan avatar  avatar  avatar Grafaffel avatar  avatar Felix Hungenberg avatar ɹǝʞɹɐԀ uǝʌS avatar Kcin Chen avatar Lucas Portet avatar Tanguy Lays avatar Marius avatar Ryan Anders avatar Fatah avatar  avatar Oleksandr Shevenionov avatar Keshav S avatar Felippe Chemello avatar Dominic avatar LZ91X  avatar  avatar Ray avatar standardpointer avatar Muhammad Althaf avatar Alexander avatar Luke Morales avatar Raul Macarie avatar Matheus Michels avatar Omar Chammaa avatar Gabriel Menezes avatar Kayla Firestack avatar Zlatko Fedor avatar Raimund avatar b1ncer avatar Reg Chiu avatar Lawrence Onah avatar Alex Swanson avatar Colin McDonnell avatar Eric Wynn Romere avatar an avatar Alvis Tang avatar Timo avatar Daniel Lazar avatar Gregory Bowne avatar Darren Baldwin avatar  avatar Luis Marsiglia avatar Borja Paz Rodríguez avatar Scott Shillcock avatar Dávid Szabó avatar Kushan Thakur avatar Sam Y avatar Mariusz Kabała avatar  avatar ishan avatar Christopher avatar Geovanny Gil avatar Yoshi avatar ManhND avatar M. Ilham Afandi avatar Felix avatar Compro Prasad avatar Nick Dalby avatar Evgeniy Boreyko avatar Towfiq I. avatar Kolja avatar ᚷᛁᛟᚱᚷᛁ ᛒᚨᛚᚨᚲᚻᚨᛞᛉᛖ avatar Achraf Ait Sidi Hammou avatar  avatar Arya Bakhtiari avatar  avatar Yann Moussaba avatar David Abram avatar Robert Richter avatar Lance Ding avatar Stefan Schonert avatar Marcis Bergmanis avatar  avatar Reuben Rapose avatar Osman Tangören avatar shadow avatar Sunny Singh avatar Arnold Chand avatar Ramon Diogo avatar Jason Scherer avatar PixelSushiRobot avatar Ajdin Memić avatar  avatar Josh Clayton avatar Lindemberg Barbosa avatar C E L L avatar  avatar  avatar Éanna Glavin avatar Eduardo Rabelo avatar Al-Khawarizmi avatar

Watchers

 avatar

boringer-avatars's Issues

Pixel variant when square is true has a missing pixel on the top left

Noticed a bug on the demo apps affecting all libraries. When the square property is set to true and the variant is pixel there is a missing pixel on the top left.

Impacted libraries

  • React
  • Angular
  • Vue 2 & 3
  • Svelte
  • Angular
  • Qwik

Reproducible example (React)

<Avatar
  name="test"
  variant="pixel"
  square={square}
/>

Screenshot:
image

SSR Support Solid Start

Issue

In Solid Start we are seeing on server side document is not defined. When importing import {Avatar as Boring} from "@boringer-avatars/solid";

Expected

To be able to import and use on SSR.

Workaround

To get around this currently what I have done is create a wrapper component around Boringer:

import {Avatar as Boringer} from "@boringer-avatars/solid";

export default function Avatar() {
    return (
        <Boringer
            title={false}
            size={400}
            variant="beam"
            name="testing"
            square={false}
            colors={["#FFAD08", "#EDD75A", "#73B06F", "#0C8F8F", "#405059"]}
        />
    )
}

You can then do a lazy load

const Avatar = lazy(() => import("./Avatar"));

This will mean it is only done client side and wont give issue.

Let me know how I can help.

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.