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

Card: Add a border design token #7330

Open
4 tasks
BenJackGill opened this issue Feb 26, 2025 · 2 comments
Open
4 tasks

Card: Add a border design token #7330

BenJackGill opened this issue Feb 26, 2025 · 2 comments
Labels
Type: New Feature Issue contains a new feature or new component request

Comments

@BenJackGill
Copy link

BenJackGill commented Feb 26, 2025

Describe the bug

The Card element has a card.border.radius design token.

But it impossible to set card.border design token preset.

This is very strange since the home page shows the Aura theme Cards that have a flat border. In reality, those Card elements have a shadow and no border is able to be set.

To make something that looks like the homepage we need to do something like this, which is only partially possible without the card.border design token:

import { definePreset } from '@primeuix/themes';
import Aura from '@primeuix/themes/aura';

export const preset = definePreset(Aura, {
  components: {
    card: {
      root: {
        border: 'border-surface border', // This does not work because there is no `border` token
        shadow: 'none', // This works, it removes the shadow
      },
    },
  },
});

This is very strange since the home page shows the Aura theme cards that have a flat border. In reality, those Card elements have a shadow and no border is able to be set.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

N/A

Environment

primevue 4.3.1

Vue version

3.5.13

PrimeVue version

4.3.1

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

N/A

Expected behavior

N/A

@BenJackGill BenJackGill added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 26, 2025
@eneeio-nm
Copy link
Contributor

If you have a look at the code for the Overview example, it doesn't use PrimeVue cards.

@BenJackGill
Copy link
Author

BenJackGill commented Mar 4, 2025

If you have a look at the code for the Overview example, it doesn't use PrimeVue cards.

Yeah thats what I mean, the home page has something else used in place of what looks like a Card component. Then the real Card component has a shadow and no border. I can almost recreate the home page "fake card" look used on the homepage by removing the shadow but I can't easily add a border. That is why I was asking for a border design token.

The home page not using a real Card component is not really the problem, I just think the Card component could really do with a border token that can be styled by us. Seems like a basic thing for that component to have style wise.

Especially since it already has card.border.radius but no possible card.border.

@tugcekucukoglu tugcekucukoglu added Type: New Feature Issue contains a new feature or new component request and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

3 participants