-
-
Notifications
You must be signed in to change notification settings - Fork 50.4k
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
5.0 Component Token Request #38975
Comments
Exposing all available tokens to the Is there any specific reason for not exposing all available tokens? If I can't customize the parts of my application via Javascript, what was the point of replacing Same for the Thanks for the great work on v5. |
I agree with @alioguzhan: why aren't all available tokens exposed? We are upgrading ffrom v4 and |
Also, can we pin this issue so everyone can see it and comment ? @MadCcc |
Because in V5's Design Token system, less token is needed for theming. |
What's the conclusion? Is exporting all tokens in a roadmap? If not, what's the recommended way to customise components. |
I have a similar problem, |
Please export all tokens. This would make it very easy to upgrade from v4. Our initial attempt at upgrading was a failure due to various styles which were not exported. Thanks for creating antd. |
👍 what is the recommended way to achieve the following with V5?
|
It would be nice if I could change the horizontal padding on table cells, titles and footers. As it stands, the only way is by changing |
@Wxh16144 are you able to please advise? |
Developers of antd, please tweak fontSize token for Typography component separately- now the only way to set font size for it is to set seed token for all components, but it doesn't fit my project |
@evgeniyworkbel can't you use the component token in this case? For example (haven't tested it): |
Similar to another typography request, I'd like to set |
Why not expose all component tokens? v5 is much less customizable than v4, it should be stronger, I don't understand. |
Where i can find all the list of token that are being added in every release. Is there anyway to find all the list having new and old tokens? |
I can't evaluate the transition to the new version yet because nothing from what was promised works 100%. Tokens are a modern and long-awaited solution, but they don't work. I don't get why this version is called 5 and not beta. Here is the simplest example with a button: /* global css */
.ant-btn {
padding: 25px !important; /* ! */
} /* local css */
.button {
color: red !important; /* ! */
}
.button:hover {
color: green !important; /* ! */
}
.button:active {
color: red !important; /* ! */ <ConfigProvider theme={{
components: {
Button: {
colorPrimaryBg: 'white', // not available
colorPrimaryBgHover: 'green', // not available
colorPrimaryBgActive: 'red', // not available
colorPrimaryText: 'red', // not available
colorPrimaryTextHover: 'green', // not available
colorPrimaryTextActive: 'red' // not available
padding: 25px // not available
}
}}>
<Button className={styles.button} type="primary">Text</Button>
</ConfigProvider> And such issues with every component |
@monolithed it seems like Button component has not yet been migrated to the new token system, see check list in #41884 |
@abenhamdine, the last time I worked with Ant Design was 4 years ago. Back then, there were also a lot of issues, mostly related to API inconsistency. I had to write wrappers for components to make the interfaces look consistent. Nevertheless, I promoted Ant Design wherever I worked as one of the best libraries on the market because the rules of the game were clear. Now I've seen that version 5 has been released, which seems to have addressed the old issues. It introduced tokens, made the API more consistent, although they still haven't added refs to many components, and the dark background in the layout hasn't gone anywhere. The tokens don't work, CSS build is deprecated, and breakpoints with SSR (next@13) also behave incorrectly. Take a look at the instructions on how to connect Ant Design. Do you see how to connect styles there? In the new version, the style assembly has become outdated, and now you need to assemble it yourself, but beginners only find out about this after their interface starts jumping like a horse on a racetrack: Screen.Recording.2023-06-03.at.20.54.35.movIf you were a manager, could you recommend this library for developing a serious project with fixed deadlines? I wouldn't, because releasing a major version with killer features that only work halfway is very strange. How do you envision such development? Writing something in the old style, something in the new style, but who will be the investor for subsequent refactoring? In my opinion, version 5 is more like an initial beta stage. |
I would strongly recommend using version 4 only, for now.
definitely |
@abenhamdine, I get it, but I don't believe them because these new things like tokens are being released without any testing 😭 |
I agree It's worrying. Let's wait for the dust to settle. OSS world is full of pitfalls like that. |
Please for Popconfirm:
|
Please expose token to set line height for tree content or fix it so it uses the global lineHeight token. Currently, lineHeight for |
Please expose Collapse component tokens.
|
Couldn't find tokens for AutoComplete, but there is a workaround though |
You didn't answer the original question which is #38975 (comment) |
@ayrosochang layout token seems indeed incomplete, see also #41884 (comment) |
It will be cool to provide tokens:
Of course it needs the same tokens like above also for small size of Switch
|
The token names |
Migrating from v4 to v5, I have used primary color variants like |
Please add component token to modify font-weight of labels under |
Need tokens to control Button height. |
@guoyunhe Tokens for controlling button height are already available as global token
|
Thank you! This is very helpful! |
Overall the header color design is just a bit weird... Look at the official example at home page, when turned to dark mode, the text is not even visible by default. Dark algorithm is not applied. |
Add token to customize |
In 5.0 and later versions, we provide component token for users to customize component style more easily. However, considering the risk of breaking change, we will add component tokens which are necessary for theming little by little.
Any request of component token is welcomed to discuss here. We will make it better in later versions.
The text was updated successfully, but these errors were encountered: