Scenic.Component.Input.Caret (Scenic v0.10.3) View Source

Add a blinking text-input caret to a graph.


{height, color}

  • height - integer greater than zero
  • color - any valid color.


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.

|> Caret.add_to_graph({height, theme.text}, id: :caret)

Link to this section Summary

Link to this section Functions

Link to this function

add_to_graph(graph, data \\ nil, opts \\ [])

View Source


add_to_graph(graph :: Scenic.Graph.t(), data :: any(), opts :: list()) ::

Callback implementation for Scenic.Component.add_to_graph/3.