Spectrum is now read-only. Learn more about the decision in our official announcement.


Style props for rapid UI development


Typescript autocomplete.

April 13, 2020 at 8:01pm

Typescript autocomplete.

April 13, 2020 at 8:01pm
Has anyone got typescript autocompleting style props to work with styled system?
For example, I would expect to see a list of justify-content values here (vscode intellisense):
Screen Shot 2020-04-13 at 12.58.08 PM.png
This is the basics of my type my setup:
Screen Shot 2020-04-13 at 12.59.55 PM.pngScreen Shot 2020-04-13 at 1.00.08 PM.png
Thanks in advance for any tips.

April 13, 2020 at 8:08pm
Ok awesome, so just use /radix-system to replace styled system? Thanks for the quick feedback.
No, I meant they managed to have proper TS autocomplete. /radix-system uses /core and /css internally but has a different API. Radix is worth checking out.

May 1, 2020 at 5:26pm
If anyone is curious I managed to do this by re-typing the styled-system types with the upcoming version of csstype that is in beta. I don't think it is possible with the current version of csstype.

May 2, 2020 at 8:16pm
Cool! Any change to see the source code? 👀

November 12, 2020 at 4:15am
Sorry to wake this discussion up again. I'm having exactly the same problem that you had. Any chance I could get a sneak peek on how you solved this? (hainessss)

February 26, 2021 at 12:02am
This should be solved now that the latest version of css-type is out. make sure to upgrade to it. (gihdz)