In [7]:
from awesome_panel_extensions.awesome_panel.notebook import Header
Header(folder="examples/reference/frameworks/fast", notebook="FastLiteralAreaInput.ipynb")
Out[7]:

Fast LiteralAreaInput - Reference Guide

The FastLiteralAreaInput widget is based on the fast-text-field web component and extends the built in Panel LiteralAreaInput widget.

Parameters:

Core
  • value (str): Parsed value of the indicated type
  • type (type or tuple(type)): A Python literalarea type (e.g. list, dict, set, int, float, bool, str)
  • serializer (str['ast', 'json]): The serialization (and deserialization) method to use. 'ast' uses ast.literalarea_eval and 'json' uses json.loads and json.dumps.
Display
  • name (str): The label of the LiteralAreaInput.
  • placeholder (string): A placeholder string displayed when no value is entered.
  • apperance (string): Determines the appearance of the LiteralAreaInput. One of outline or filled. Defaults to outline.
  • max_length (integer): The maximum number of characters. Default is 5000.
  • disabled (boolean): Whether or not the LiteralAreaInput is disabled. Defaults to False.
  • readonly (bool): Whether or not the LiteralAreaInput is read only. Defaults to False.

The FastLiteralAreaInput has the same layout and styling parameters as most other widgets. For example width and sizing_mode.

Please note that you can only use the Fast components inside a custom Panel template that

We provide the FastTemplate for easy usage.

You can also develop your own custom Panel template if you need something special. For example combining it with more fast.design web components and the Fluent Design System to create VS Code and Microsoft Office like experiences.

Please note that Fast components will not work in older, legacy browser like Internet Explorer.


Let's start by importing the dependencies

In [8]:
import param
import panel as pn
from awesome_panel_extensions.frameworks.fast import FastTemplate, FastLiteralAreaInput

pn.config.sizing_mode = "stretch_width"
pn.extension()