Skip to content

Can't customize the style of controls #351

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

Open
LucyGit opened this issue Feb 25, 2025 · 2 comments
Open

Can't customize the style of controls #351

LucyGit opened this issue Feb 25, 2025 · 2 comments

Comments

@LucyGit
Copy link

LucyGit commented Feb 25, 2025

Checkbox style is rect with round corner, we can't customize it
Textfield Textarea have different padding with vscode controls, and we can't customize it.
Could you add parts to the controls so that we can customize it.

@bendera
Copy link
Member

bendera commented Feb 26, 2025

Checkbox style is rect with round corner, we can't customize it

The components are intentionally not customizable. They were designed to adapt to VS Code design language.

Textfield Textarea have different padding with vscode controls

Do you mean TExctfield and TExtarea have different paddings, or Textfiled and Textarea differ form the original VSCode native controls?

Anyway, this three components can be implemented with pure css, and that's what exactly the VSCode Element Lite does:
https://github.com/vscode-elements/elements-lite/tree/main/lib/components/checkbox
https://github.com/vscode-elements/elements-lite/tree/main/lib/components/textfield
https://github.com/vscode-elements/elements-lite/tree/main/lib/components/textarea
You can do whatever you want with them.

@LucyGit
Copy link
Author

LucyGit commented Feb 28, 2025

Hi Bendera,
The controls in vscode webview-ui-toolkit can be customized because they have designed "parts" for them.
I think the customization is a basic requirements for a controls library.
We don't have time to switch to other libraries.
I mean the TextField and Textarea differ from the original VSCode web toolkit controls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants