Skip to content

[bug]: TweetCard avatar shrinks inconsistently in grid/flex layouts #850

@coderomm

Description

@coderomm

Describe the bug

When multiple TweetCard components are rendered inside a grid or flex-based layout,
the user avatar sometimes appears at inconsistent sizes.

This happens because the avatar container is a flex item and is allowed to shrink
to accommodate the right-side content (username, name, etc.). In tighter layouts,
the avatar visually shrinks instead of maintaining a fixed size.

Expected behavior:

  • Avatar should always render at a consistent size.

Actual behavior:

  • Avatar shrinks in some cards depending on layout and text length.

I plan to submit a PR that fixes this by preventing the avatar container from shrinking.

Proposed fix:

  • Apply shrink-0 to the avatar container to prevent flex shrinking.

Affected component/components

apps/www/registry/magicui/tweet-card.tsx

How to reproduce

  1. Render multiple TweetCard components inside a CSS grid or flex layout.
  2. Use varying username / name lengths.
  3. Observe that some avatars appear smaller than others.

This is more noticeable when the container width is constrained.

Codesandbox/StackBlitz link

No response

Logs

System Info

- OS: macOS
- Browser: Chrome (latest)
- Framework: React / Next.js
- Styling: Tailwind CSS

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions