-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Joy][docs] Add documentation for Input
component
#35482
Conversation
|
@siriwatknp I restructured the docs, polished and added a common example "newsletter subscription", inspired by https://dribbble.com/shots/14442751-Newsletter-Subscribe-Animation; Let me know! |
Thanks, @hbjORbj. After seeing the subscription demo, I think the input deserves to have a CSS variables playground to help developers create their own version of Input. Here is the list of variables that should be in the playground.
The input preview should have:
|
Hey, Jun, I added CSS variable playground. Opacity can't be in px, so I made some changes to index 8ef657dc55..861acb8320 100644
--- a/docs/src/modules/components/JoyVariablesDemo.tsx
+++ b/docs/src/modules/components/JoyVariablesDemo.tsx
@@ -15,11 +15,11 @@ import KeyboardArrowDown from '@mui/icons-material/KeyboardArrowDown';
interface DataItem {
var: string;
- defaultValue?: string;
+ defaultValue?: string | number;
helperText?: string;
} I wanted to make the stepper to increment/decrement by 0.1 but I couldn't find where that stepper is coming from. I found that it disappears when I remove |
It is the native HTML input attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#step. |
…lace text field with input/form-control/form-label
Made some improvements to {
var: '--Input-placeholderOpacity',
defaultValue: 0.5,
inputAttributes: {
min: 0.1,
max: 1,
step: 0.1,
},
}, Inner HTML input demo is ready as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Great job! pushed some updates
As we are progressing towards removing
TextField
from Joy UI (#35462) (#34176), documentation forInput
component has become essential.Preview: https://deploy-preview-35482--material-ui.netlify.app/joy-ui/react-input