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

[BUG] - Card's shadow cut off when nested inside ListBoxItem #3480

Closed
kui04 opened this issue Jul 16, 2024 · 3 comments · Fixed by #3486
Closed

[BUG] - Card's shadow cut off when nested inside ListBoxItem #3480

kui04 opened this issue Jul 16, 2024 · 3 comments · Fixed by #3486
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@kui04
Copy link

kui04 commented Jul 16, 2024

NextUI Version

2.4.2

Describe the bug

The shadow of a Card component nested inside a ListBoxItem is cut off. The overflow: hidden property in the truncate class appears to be causing this issue.

QQ_1721108740651
Notice the corner of the Card

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Create a new project
  2. Add listbox and card
  3. App.tsx
import { Card, CardBody, CardHeader } from "@nextui-org/card";
import { Listbox, ListboxItem } from "@nextui-org/listbox";

function App() {
  return (
    <Listbox aria-label="test">
      <ListboxItem key="test" textValue="test">
        <Card shadow="lg">
          <CardHeader>header</CardHeader>
          <CardBody>body</CardBody>
        </Card>
      </ListboxItem>
    </Listbox>
  );
}

export default App;

Expected behavior

The shadow of the Card should be fully visible and not cut off when nested inside a ListBoxItem.

Screenshots or Videos

image
shadow is cut off

image
after change overflow:hidden to overflow:visible

Operating System Version

Windows

Browser

Chrome

Copy link

linear bot commented Jul 16, 2024

@awesome-pro
Copy link
Contributor

@kui04 in which component did you change the overflow . can you provide stackblitz or codesandbox for better explanation

@kui04
Copy link
Author

kui04 commented Jul 16, 2024

@kui04 in which component did you change the overflow . can you provide stackblitz or codesandbox for better explanation

I create a codesandbox here with some explanations
It's a span inside the li.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants