Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
holoviz
GitHub Repository: holoviz/panel
Path: blob/main/doc/how_to/interact/interact_fix_values.md
2011 views

Fix Values with Interact

This guide addresses how to fix the value for certain arguments with Panel interact.

1. The [How to > Generate Widgets for Function Arguments](interact_basics) guide covers how to generate widgets for function arguments with Panel interact.

First, let's declare a simple function.

import panel as pn from panel.interact import fixed pn.extension() # for notebook def f(x, y): return x, y

Now, call interact using the panel.interact.fixed function to fix one of the values:

pn.interact(f, x=1, y=fixed(10))