Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a style prop to the Avatar component #3100

Closed
Keagel opened this issue Jan 12, 2025 · 6 comments
Closed

Add a style prop to the Avatar component #3100

Keagel opened this issue Jan 12, 2025 · 6 comments
Labels
feature request Request a feature or introduce and update to the project.
Milestone

Comments

@Keagel
Copy link

Keagel commented Jan 12, 2025

Describe the feature in detail (code, mocks, or screenshots encouraged)

The Avatar is one of the components where it makes sense to have custom styling that goes beyond what tailwind classes can offer (ie. changing the background color of the avatar based on the user's name as a fallback when the user doesn't have a profile picture set). It was previously possible in Skeleton v2 using the style prop to pass arbitrary values.

What type of pull request would this be?

Enhancement

Provide relevant links or additional information.

This is how I used to achieve that in Skeleton v2:

<Avatar
    src={avatarUrl}
    {initials}
    width="w-24"
    style="background-color: {backgroundColor}"
    fill="fill-white"
/>
@Keagel Keagel added the feature request Request a feature or introduce and update to the project. label Jan 12, 2025
@endigo9740 endigo9740 added this to the v3.0 (Next) milestone Jan 12, 2025
@rxhul18
Copy link

rxhul18 commented Jan 15, 2025

How can i configure v3 version in mine

@endigo9740
Copy link
Contributor

How can i configure v3 version in mine

I'm not entirely sure what you're asking here. But we cover most implementation details on the documentation here:

@phamduylong
Copy link
Contributor

I can port the implementation from v2.

@rxhul18
Copy link

rxhul18 commented Jan 16, 2025

Is there any video or docs to clone and configure Skeleton v3 codebase?

@phamduylong
Copy link
Contributor

phamduylong commented Jan 16, 2025

Is there any video or docs to clone and configure Skeleton v3 codebase?

I assume you're asking for instruction on getting started with Skeleton v3. Those can be found from the installation page. The code is located in the next branch of the repo so you'll need to checkout into that branch to have a local copy.

Also, I'd suggest asking in Discord if you have more questions, this thread should only be used to discuss this specific issue.

@endigo9740
Copy link
Contributor

endigo9740 commented Jan 16, 2025

@rxhul18 what Long said, but I'll append this as well if you're just looking for a high level overview of what it includes:

@phamduylong long that would be great! I'm not sure it'll be 1:1 with v2 as the Svelte 5 syntax may differ, but I'm sure they cover that in the docs. Also don't forget React the React version too please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

No branches or pull requests

4 participants