Add `id` parameter to st.container (and other objects)
See original GitHub issueProblem
I would like to be able to style containers or elements without hacking with nth-child(). This would be easier if it were possible to reference the container by id
instead of using the generated css class.
Solution
Looking at the layouts.py
code, this is non-trivial. Ideally each object would have an id
member, which then gets rendered out to the react component as an attribute.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6
Top Results From Across the Web
st.container - Streamlit Docs
To add elements to the returned container, you can use "with" notation (preferred) or just call methods directly on the returned object. See...
Read more >Store configuration data using Docker Configs
Docker swarm service configs allow you to store non-sensitive information, such as configuration files, outside a service's image or running containers.
Read more >Create a user delegation SAS - Azure Storage - Microsoft Learn
Specifies the object ID for an Azure AD security principal that's authorized by the owner of the user delegation key to perform the...
Read more >121 Blueprint Container Specification - OSGi Compendium 7
Bean Manager - A manager that has metadata for creating Java objects and injecting them with objects and component instances that come from...
Read more >FeatureLayer | API Reference - ArcGIS Developers
Name Type Class
apiKey String FeatureLayer
blendMode String FeatureLayer
capabilities Object FeatureLayer
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Targeting any specific element with css ID & classes would be HUGE. It would allow us to add custom responsive grids, hovering effects, using frameworks like bootstraps, better customisation for any elements inside a particular container. etc.
st.component_name( class=“myclass my2ndclass” id=“myID” ) would help a lot and solve most of the headaches about unreliable css hacking/creating custom component just for it etc.
Just realized this is a duplicate of #3888. Closing since the other issue is older and has more upvotes. Will look at the comments in here when we work on it!