circular avatar cropped shadcn
Answered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
Hello, quick question, is the shadcn avatar component not supposed to crop and make the image into a circle? If not, what's the recommended way to display images as a cropped circle similar to how shadcn has it in their example.
Answered by Plott Hound
if you are using tailwind then simply
rounded-full will make it round. if you are working with images that aren't square (1:1) then you'll also need to provide the width and height eg w-8 h-8 or aspect-square and potentially object-cover to make sure it doesn't look like an oval3 Replies
Plott Hound
if you are using tailwind then simply
rounded-full will make it round. if you are working with images that aren't square (1:1) then you'll also need to provide the width and height eg w-8 h-8 or aspect-square and potentially object-cover to make sure it doesn't look like an ovalAnswer
Asiatic LionOP
actually shadcn avatar component does do it by default.. I was importing radix instead of shadcn
the names are the same and vscode picks the wrong one