- core
- Context
- ElementAllocator
- ElementOutput
- Engine
- Entity
- EventEmitter
- EventHandler
- Group
- Modifier
- OptionsManager
- RenderNode
- Scene
- SpecParser
- Transform
- View
- ViewSequence
- events
- EventArbiter
- EventFilter
- EventMapper
- inputs
- Accumulator
- GenericSync
- MouseSync
- PinchSync
- RotateSync
- ScaleSync
- ScrollSync
- TouchSync
- TouchTracker
- TwoFingerSync
- math
- Matrix
- Quaternion
- Random
- Utilities
- Vector
- modifiers
- Draggable
- Fader
- ModifierChain
- StateModifier
- physics
- PhysicsEngine
- physics/bodies
- Body
- Circle
- Particle
- Rectangle
- physics/constraints
- Surface
- Collision
- Constraint
- Curve
- Distance
- Snap
- Wall
- Walls
- physics/forces
- Drag
- Force
- Repulsion
- RotationalDrag
- RotationalSpring
- Spring
- VectorField
- physics/integrators
- SymplecticEuler
- surfaces
- CanvasSurface
- ContainerSurface
- ImageSurface
- InputSurface
- TextareaSurface
- VideoSurface
- transitions
- CachedMap
- Easing
- MultipleTransition
- SnapTransition
- SpringTransition
- Transitionable
- TransitionableTransform
- TweenTransition
- WallTransition
- utilities
- KeyCodes
- Timer
- Utility
- views
- ContextualView
- Deck
- DrawerLayout
- EdgeSwapper
- FlexibleLayout
- Flipper
- GridLayout
- HeaderFooterLayout
- Lightbox
- RenderController
- ScrollContainer
- Scroller
- Scrollview
- SequentialLayout
- widgets
- NavigationBar
- TabBar
InputSurface
A Famo.us surface in the form of an HTML input element. This extends the Surface class.
Overview
Options
placeholder
type
value
Methods
setPlaceholder
focus
blur
setValue
setType
getValue
setName
getName
InputSurface(options)
Constructor Parameters
options
Object
overrides of default options
placeholder
String
placeholder text hint that describes the expected value of an <input> element
type
String
specifies the type of element to display (e.g. 'datetime', 'text', 'button', etc.)
value
String
value of text
Methods
setPlaceholder(str)
Set placeholder text. Note: Triggers a repaint.
Parameters
str
String
Value to set the placeholder to.
Returns
InputSurface
this, allowing method chaining.
focus()
Focus on the current input, pulling up the keyboard on mobile.
Returns
InputSurface
this, allowing method chaining.
blur()
Blur the current input, hiding the keyboard on mobile.
Returns
InputSurface
this, allowing method chaining.
setValue(str)
Set the placeholder conent. Note: Triggers a repaint next tick.
Parameters
str
String
Value to set the main input value to.
Returns
InputSurface
this, allowing method chaining.
setType(str)
Set the type of element to display conent. Note: Triggers a repaint next tick.
Parameters
str
String
type of the input surface (e.g. 'button', 'text')
Returns
InputSurface
this, allowing method chaining.
getValue()
Get the value of the inner content of the element (e.g. the entered text)
Returns
String
value of element
setName(str)
Set the name attribute of the element. Note: Triggers a repaint next tick.
Parameters
str
String
element name
Returns
InputSurface
this, allowing method chaining.
getName()
Get the name attribute of the element.
Returns
String
name of element
deploy(target)Private
Place the document element this component manages into the document.
Parameters
target
Node
document parent of this container