Scenic v0.10.2 Scenic.Component.Input.Caret View Source
Add a blinking text-input caret to a graph.
Data
{height, color}
height
- integer greater than zerocolor
- any valid color.
Usage
The caret component is used by the TextField component and usually isn't accessed directly, although you are free to do so if it fits your needs. There is no short-cut helper function so you will need to add it to the graph manually.
The following example adds a caret to a graph.
graph
|> Caret.add_to_graph({height, theme.text}, id: :caret)
Link to this section Summary
Functions
Callback implementation for Scenic.Component.add_to_graph/3
Link to this section Functions
Link to this function
add_to_graph(graph, data \\ nil, opts \\ [])
View Source
add_to_graph(graph, data \\ nil, opts \\ [])
View Source
add_to_graph(graph :: Scenic.Graph.t(), data :: any(), opts :: list()) ::
Scenic.Graph.t()
add_to_graph(graph :: Scenic.Graph.t(), data :: any(), opts :: list()) :: Scenic.Graph.t()
Callback implementation for Scenic.Component.add_to_graph/3
.