Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`Avatar`: Add predefined color presets based on `alt` initials

Aperta
#7,013 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
tailwindcss, typescript
Ambito
frontend

Direzione di ricerca

Look at the Avatar component source in the repository, likely in packages/ui/src/components/Avatar. Examine how the color prop is currently handled and where the alt text is used. Research how to generate a deterministic color from initials (e.g., hash the string). Consider the variant prop proposal and how to integrate with the existing theming system, including user-customized colors. Check for existing tests for Avatar to understand the expected behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

triage
Package

v4.x

Description

Currently, we can manually set the color of the Avatar component when using only the alt attribute. It would be useful if the background color were predefined based on the initials.

It would also be better to use a solid background with white or black text instead of a muted background with highlighted text. Maybe variant prop could be useful here - so either solid, soft, outline, etc.

However, I'm not sure how this would work if the user has customized the UI colors, as the avatars may or may not fit well with the adjusted color scheme.

https://mui.com/material-ui/react-avatar/#letter-avatars

Additional context

No response

Lingua principale
TypeScript
Stelle
7k
Fork
1.1k
Merge medio
1g 19h
PR unite (30g)
170

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nuxt/ui

Tutte le issue di nuxt/ui

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.