Admin Portal examples and templates
Hi Team,
I am new to Solara and trying to build an Admin Portal based on Flask REST API.
Are there any Solara examples and templates available which I could re-use and start from?
...
how do I build a solara app thats on a website?
I'm new to solara. I have a google collab file that takes in input and prints out output. I want a way to put this on a website somehow so when I go to a link it'll just let me type and press a button.
Is this doable?...
Best practices for state management and encapsulation
I am trying to figure out how to handle application state in a pythonic and scalable way. I don't like having global (reactive) variables, and I would like to encapsulate as much logic as possible into the components to separate concerns.
1. Is there any way for components to access reactives (solara.reactive or solara.use_state) on other components?
2. Can components be classes, or in some other way carry methods / properties / reactives in order to encapsulate behaviour? (eg general form of question above)
3. Are there examples/docs/instructions for how to create complex application states to be shared between components? I'm envisaging the application state as a big, nested dict that contains all state.
4. Is component state better managed by having a module per component that defines one or more reactives and their manipulation functions together with the component itself, so that you would import my_component and then use my_component.MyComponent, my_component.data and my_component.update_data(new_data)?...
http requests to backend API
Hi,
Is there any libarary available in Solara to create HTTP requests to my Flask backend?
What is your recommendation?...
InputDateRange question
UI/solara newbie question
Greetings. I am trying to use the solara InputDateRange component but I am having a problem. I set the default values w/ use_reactive(), I have InputDateRange component to alter/update the date range, and a separate part that actually uses the values. My problem is that when I make a change of dates, my app fails before I can set the end date - i.e. only the first date gets set. Below is a toy version of my code:
import solara...
ipyaggrid styling
Hi everyone, I have tried to override Balham dark theme specifically for ipyaggrid component I’m using. For example highlight a row, say, green, if a column value == to a specific value. Also more general styling overrides. I have tried using a css string variable and setting this to style param when implementing the grid. But not much luck at all. Thank you!
Ipyaggrid Grid element - Get selected row if click on it
Hello!
Is there any way to add to Grid element on Ipyaggdrid the click interaction with the grid.observe?...
why use_routes can't work in jupyterlab?
I am debugging multipage, and tried to run the same code in jupyterlab, and it raised an error.... and yes I can't find any code from use_routes... how does this work when I run in prompt line mode?

Need a button with a label that changes with each click
I am not sure if this is a solara question, or a vue issue. I need a button that switches between 2 values (OFF/ON) and also shows the value (text) in the button label field.
I think I have a solution in https://py.cafe/rob.on.lists/solara-interactive-toggles
However... some of the clicks do make the switch change value, some of the clicks are seemingly ignored.
Also, I need more than one button, and enabling the 2nd button makes me wonder if the reactive id is passed by name, or by reference. Because sometimes when I press the right button, the left value changes....
Using plotly.express to create scatterplot_mapbox, map displays but animation does not work
I am creating a map with scatterplot_mapbox, I can create a map with my desired points plotted. However, animation does not work (buttons appear but do not function). I have run the exact same code in a jupyter notebook and the animation works. Any tips on getting the animation working?
Code:
fig = px.scatter_mapbox(plot_data, lat='lat', lon='lon', #z='Magnitude',
center=dict(lat=start_lat, lon=start_lon), zoom=1,...
automatic reload not working (new user) (fixed)
I have just installed solara on linux mint 20.3 (based on ubuntu 20.04).
I have a sol.py on local directory (a copy of apps/tutorial-streamlit.py) and started solara run sol.py in a terminal window as suggested in the tutorial. My firefox opens automatically and I see the first web page. Great. Success at the first attempt.
I modify the file (locally) and save. The browser window is not refreshed, I see no message in the terminal window.
I check ls -l and the time stamp of sol.py was changed....
Pyodide locally
Hi , really love the pycafe project. I was wondering if there was a possibility to compile a Solara app with Pyodide locally (without using pycafe). Is it possible?
Providing a custom Layout
I tried this example to start working on custom layouts, but I am unsure if that's working for me (e.g., the print statement doesn't get executed). Do you have to do anything special to "register" this
Layout
, or is adding this to my __init__.py
, like what I am doing now, sufficient?
error running solara
I just started using solara and am trying to run a pretty simple application. I am getting the following error when I use solara run my_file.py : "A widget with mount-id="solara-main" should go here", which is displayed in my browser. Does anyone know what could be causing this ? Thank You !
Styling guide
Hello, newly introduced to Solara. I went through the tutorials and the gallery. Can some point me to any guides on customizing the look of Solara components? Thanks!
how to use on_kernel_start
I want to initial some data, when I run in notebook thsee code works, but when deploy in py these doesn't work!
if Record_initialing.value:
# print('检测执行情况')
...
Solara code generation by LLM
Hi. It seems that GPT-4o and Claude Opus don't have any/much info about Solara code. Am I right?
Do you happen to have any fine tuned model to generate your code? GPT-4 and Claude speed up my production with Streamlit a lot. And I have a Streamlit project almost finished, but would like to have fast converter/generator to Solara rather than rewriting it all.
Any suggestions, please?...
How can I Identify whether cellphone or PC is visiting my page
I've tried tos show headers. but is it hard to determine... can I just check the max width or some other direct methods

"Global" variables, scoped to user
It seems that there are two scopes for reactive variables: global, or app-level variables that seem to be shared by all users on a server; and local, component-level variables that are contained within a defined solara component. However, it's not clear how to create variables that are shared across components but are still scoped to an individual user.
Currently, we have to maintain an accessible dictionary that contains the session id and individual instances of global variables in order to share across pages/component without affecting other users.
Is there a more appropriate way to handle this use case?...