-
Notifications
You must be signed in to change notification settings - Fork 22
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
links should behave like text, instead of having padding and being centered #76
Comments
I have actually encountered this pain point myself. I think I will deviate from the shadcn style here and adjust it. Two possible solutions could be add a link "size" to the button variants removing padding, or simply style the Link in its own way and leave the button as is. Thanks for the suggestion |
IMO, I'd go with a separate style for links. Perhaps you can export a LinkButton component that has the button styles (as today), but a standard Link component should behave like any other tag. |
I think the right thing here is to not have a Link component at all (IMO). If you want the link to be styled as a Button, you import the So the right thing would be like this import { buttonVariants } from '@components/button'
const Page = () => {
return <a className={buttonVariants({variant: 'ghost'})}>A link</a>
} |
I looked at how I would do this and came to the same conclusion. I don't think there's a good default style for a link. They are too dependent on where you put them and the content around them. Is it in a paragraph, is it in a navbar etc Will look into making it clearer in the documentation. I still want the Link page as I think its important to let people know that they can use RAC link component and set it up to support NextJS routing, remix etc |
because tailwindcss resets all link styles, I think a Link component should be provided. Otherwise everyone will have to implement their own style for links, which is something this project is trying to address. If anything, don't add a ButtonLink, but add a TextLink. Just my 2c |
when I'm adding a link, I expect to be just a regular text. instead, current links behave more like button links (that's why you inherit from the button styles).
The text was updated successfully, but these errors were encountered: