Skip to content

How can you access actual DOM element for things like Textarea component? #3284

Answered by jperals
purplepenguin2 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

The Cloudscape Textarea component does not offer such APIs (full API docs here), and relying on the component internals is really not recommended because we might change the internal implementation which might then break your functionality.

On the other hand, the Textarea is a quite simple component (essentially a custom styled native textarea) so if you really need such functionality, you might be better off with your own implementation of it, using our design tokens to let it match the Cloudscape styling. For reference, here is our own component implementation (you might not even need all of it) and here are the styles, in which most of the SCSS variables used are publicly available…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jperals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants