arwes / arwes

Futuristic Sci-Fi UI Web Framework.

Home Page:https://arwes.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add TextField component

romelperez opened this issue · comments

Create an input component to handle input text and textarea elements.

  • Create TextField component.
  • Add multiline: boolean = false prop to enable textarea. Otherwise it creates an input element.
  • When multiline = false, create input element with possible types: ['text', 'email', 'search', 'password', 'tel', 'url', 'number'].
  • Allow basic props and events passed down to the real input/textarea element.
  • Add palette: string prop.
  • If animated and autoFocus enabled, focus element on animator entering.
  • If animated, remove input focus on animator exiting.
  • Animate text placeholder if provided on transitions.
  • Animate text value/defaultValue if provided on transitions.

Would this support input types like 'datetime', 'email', 'number', 'checkbox' etc?

Thank you a lot for your work!

Hey @Nexuist, by default the component creates an Input with possible types: ['text', 'email', 'search', 'password', 'tel', 'url', 'number'], unless the component is multiline which will turn it into a Textarea. 😃

This is awesome. Looking forward to it!