Material design: Cards
paper-material
is a container that renders two shadows on top of each other to
create the effect of a lifted piece of paper.
Example:
<paper-material elevation="1">
... content ...
</paper-material>
- Annotations
- CustomElementProxy('paper-material')
- Extends
- Object
- EventTarget
- Node
- Element
- HtmlElement
- PaperMaterial
- Mixes-in
- CustomElementProxyMixin
- PolymerBase
Properties
- JsObject $
-
read-only, inheritedThe underlying Js Element's
$
property. - bool animated
-
read / writeSet this to true to animate the shadow when setting a new
elevation
value. - Map<String,String> attributes
-
read / write, inheritedAll attributes on this element.
- String baseUri
-
read-only, inherited
- JsArray<JsObject> behaviors
-
read-only, inheritedThe underlying behaviors list created for this element.
- CssRect borderEdge
-
read-only, inheritedAccess the dimensions and position of this element's content + padding + border box.
- List<Node> childNodes
-
read-only, inheritedA list of this node's children.
- List<Element> children
-
read / write, inheritedList of the direct children of this element.
- CssClassSet classes
-
read / write, inheritedThe set of CSS classes applied to this element.
- String className
-
read / write, inherited
- Rectangle client
-
read-only, inheritedGets the position of this element relative to the client area of the page.
- int clientHeight
-
read-only, inherited
- int clientLeft
-
read-only, inherited
- int clientTop
-
read-only, inherited
- int clientWidth
-
read-only, inherited
- CssRect contentEdge
-
read-only, inheritedAccess this element's content position.
- String contentEditable
-
read / write, inherited
- MenuElement contextMenu
-
read / write, inherited
- JsObject customStyle
-
read-only, inherited
- Map<String,String> dataset
-
read / write, inheritedAllows access to all custom data attributes (data-*) set on this element.
- String dir
-
read / write, inherited
- Point documentOffset
-
read-only, inheritedProvides the coordinates of the element relative to the top of the document.
- Element domHost
-
read-only, inheritedReturn the element whose local dom within which this element is contained. This is a shorthand for Polymer.dom(this).getOwnerRoot().host.
- bool draggable
-
read / write, inherited
- String dropzone
-
read / write, inherited
- num elevation
-
read / writeThe z-depth of this element, from 0-5. Setting to 0 will remove the shadow, and each increasing number greater than 0 will be "deeper" than the last.
- Node firstChild
-
read-only, inheritedThe first child of this node.
-
read / write, inherited
- String id
-
read / write, inherited
- String innerHtml
-
read / write, inheritedParses the HTML fragment and sets it as the contents of this element.
- InputMethodContext inputMethodContext
-
read-only, inherited
- bool isContentEditable
-
read-only, inherited
- JsObject jsElement
-
read-only, inherited
- String lang
-
read / write, inherited
- Node lastChild
-
read-only, inheritedThe last child of this node.
- JsObject listeners
-
read-only, inheritedThe underlying listeners object created for this element.
- String localName
-
read-only, inherited
- CssRect marginEdge
-
read-only, inheritedAccess the dimensions and position of this element's content + padding + border + margin box.
- String namespaceUri
-
read-only, inheritedA URI that identifies the XML namespace of this element.
- Element nextElementSibling
-
read-only, inherited
- Node nextNode
-
read-only, inheritedThe next sibling node.
- String nodeName
-
read-only, inheritedThe name of this node.
- List<Node> nodes
-
read / write, inheritedA modifiable list of this node's children.
- int nodeType
-
read-only, inheritedThe type of node.
- String nodeValue
-
read-only, inheritedThe value of this node.
- Rectangle offset
-
read-only, inheritedGets the offset of this element relative to its offsetParent.
- int offsetHeight
-
read-only, inherited
- int offsetLeft
-
read-only, inherited
- Element offsetParent
-
read-only, inherited
- int offsetTop
-
read-only, inherited
- int offsetWidth
-
read-only, inherited
- ElementEvents on
-
read-only, inheritedThis is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
- ElementStream<Event> onAbort
-
read-only, inherited
- ElementStream<Event> onBeforeCopy
-
read-only, inheritedStream of
beforecopy
events handled by thisElement
. - ElementStream<Event> onBeforeCut
-
read-only, inheritedStream of
beforecut
events handled by thisElement
. - ElementStream<Event> onBeforePaste
-
read-only, inheritedStream of
beforepaste
events handled by thisElement
. - ElementStream<Event> onBlur
-
read-only, inherited
- ElementStream<Event> onCanPlay
-
read-only, inherited
- ElementStream<Event> onCanPlayThrough
-
read-only, inherited
- ElementStream<Event> onChange
-
read-only, inherited
- ElementStream<MouseEvent> onClick
-
read-only, inherited
- ElementStream<MouseEvent> onContextMenu
-
read-only, inherited
- ElementStream<Event> onCopy
-
read-only, inheritedStream of
copy
events handled by thisElement
. - ElementStream<Event> onCut
-
read-only, inheritedStream of
cut
events handled by thisElement
. - ElementStream<Event> onDoubleClick
-
read-only, inherited
- ElementStream<MouseEvent> onDrag
-
read-only, inherited
- ElementStream<MouseEvent> onDragEnd
-
read-only, inherited
- ElementStream<MouseEvent> onDragEnter
-
read-only, inherited
- ElementStream<MouseEvent> onDragLeave
-
read-only, inherited
- ElementStream<MouseEvent> onDragOver
-
read-only, inherited
- ElementStream<MouseEvent> onDragStart
-
read-only, inherited
- ElementStream<MouseEvent> onDrop
-
read-only, inherited
- ElementStream<Event> onDurationChange
-
read-only, inherited
- ElementStream<Event> onEmptied
-
read-only, inherited
- ElementStream<Event> onEnded
-
read-only, inherited
- ElementStream<Event> onError
-
read-only, inherited
- ElementStream<Event> onFocus
-
read-only, inherited
- ElementStream<Event> onFullscreenChange
-
read-only, inheritedStream of
fullscreenchange
events handled by thisElement
. - ElementStream<Event> onFullscreenError
-
read-only, inheritedStream of
fullscreenerror
events handled by thisElement
. - ElementStream<Event> onInput
-
read-only, inherited
- ElementStream<Event> onInvalid
-
read-only, inherited
- ElementStream<KeyboardEvent> onKeyDown
-
read-only, inherited
- ElementStream<KeyboardEvent> onKeyPress
-
read-only, inherited
- ElementStream<KeyboardEvent> onKeyUp
-
read-only, inherited
- ElementStream<Event> onLoad
-
read-only, inherited
- ElementStream<Event> onLoadedData
-
read-only, inherited
- ElementStream<Event> onLoadedMetadata
-
read-only, inherited
- ElementStream<MouseEvent> onMouseDown
-
read-only, inherited
- ElementStream<MouseEvent> onMouseEnter
-
read-only, inherited
- ElementStream<MouseEvent> onMouseLeave
-
read-only, inherited
- ElementStream<MouseEvent> onMouseMove
-
read-only, inherited
- ElementStream<MouseEvent> onMouseOut
-
read-only, inherited
- ElementStream<MouseEvent> onMouseOver
-
read-only, inherited
- ElementStream<MouseEvent> onMouseUp
-
read-only, inherited
- ElementStream<WheelEvent> onMouseWheel
-
read-only, inherited
- ElementStream<Event> onPaste
-
read-only, inheritedStream of
paste
events handled by thisElement
. - ElementStream<Event> onPause
-
read-only, inherited
- ElementStream<Event> onPlay
-
read-only, inherited
- ElementStream<Event> onPlaying
-
read-only, inherited
- ElementStream<Event> onRateChange
-
read-only, inherited
- ElementStream<Event> onReset
-
read-only, inherited
- ElementStream<Event> onResize
-
read-only, inherited
- ElementStream<Event> onScroll
-
read-only, inherited
- ElementStream<Event> onSearch
-
read-only, inheritedStream of
search
events handled by thisElement
. - ElementStream<Event> onSeeked
-
read-only, inherited
- ElementStream<Event> onSeeking
-
read-only, inherited
- ElementStream<Event> onSelect
-
read-only, inherited
- ElementStream<Event> onSelectStart
-
read-only, inheritedStream of
selectstart
events handled by thisElement
. - ElementStream<Event> onStalled
-
read-only, inherited
- ElementStream<Event> onSubmit
-
read-only, inherited
- ElementStream<Event> onSuspend
-
read-only, inherited
- ElementStream<Event> onTimeUpdate
-
read-only, inherited
- ElementStream<TouchEvent> onTouchCancel
-
read-only, inheritedStream of
touchcancel
events handled by thisElement
. - ElementStream<TouchEvent> onTouchEnd
-
read-only, inheritedStream of
touchend
events handled by thisElement
. - ElementStream<TouchEvent> onTouchEnter
-
read-only, inheritedStream of
touchenter
events handled by thisElement
. - ElementStream<TouchEvent> onTouchLeave
-
read-only, inheritedStream of
touchleave
events handled by thisElement
. - ElementStream<TouchEvent> onTouchMove
-
read-only, inheritedStream of
touchmove
events handled by thisElement
. - ElementStream<TouchEvent> onTouchStart
-
read-only, inheritedStream of
touchstart
events handled by thisElement
. - ElementStream<TransitionEvent> onTransitionEnd
-
read-only, inheritedStream of
transitionend
events handled by thisElement
. - ElementStream<Event> onVolumeChange
-
read-only, inherited
- ElementStream<Event> onWaiting
-
read-only, inherited
- String outerHtml
-
read-only, inherited
- Document ownerDocument
-
read-only, inheritedThe document this node belongs to.
- CssRect paddingEdge
-
read-only, inheritedAccess the dimensions and position of this element's content + padding box.
- Element parent
-
read-only, inheritedThe parent element of this node.
- Node parentNode
-
read-only, inheritedThe parent node of this node.
- Element previousElementSibling
-
read-only, inherited
- Node previousNode
-
read-only, inheritedThe previous sibling node.
- JsObject properties
-
read-only, inheritedThe underlying properties object created for this element.
- Node root
-
read-only, inheritedThe shady or shadow root for this element.
- int scrollHeight
-
read-only, inherited
- int scrollLeft
-
read / write, inherited
- int scrollTop
-
read / write, inherited
- int scrollWidth
-
read-only, inherited
- ShadowRoot shadowRoot
-
read-only, inherited
- bool spellcheck
-
read / write, inherited
- CssStyleDeclaration style
-
read-only, inherited
- int tabIndex
-
read / write, inherited
- String tagName
-
read-only, inherited
- String text
-
read / write, inheritedAll text within this node and its decendents.
- String title
-
read / write, inherited
- bool translate
-
read / write, inherited
- dynamic xtag
-
read / write, inheritedExperimental support for web components. This field stores a reference to the component implementation. It was inspired by Mozilla's x-tags project. Please note: in the future it may be possible to
extend Element
from your class, in which case this field will be deprecated.
Constructors
Methods
-
$$(
String selector) → Element -
inheritedConvenience method to run querySelector on this local DOM scope. This function calls Polymer.dom(this.root).querySelector(slctr).
-
add(
String path, item) → void -
inheritedAdd
item
to a list atpath
. -
addAll(
String path, Iterable items) → void -
inheritedAdd
items
to a list atpath
. -
addEventListener(
String type, dynamic listener(Event event), [bool useCapture]) → void -
inherited
-
animate(
Object effect, [Object timing]) → AnimationPlayer -
inherited
-
append(
Node newChild) → Node -
inheritedAdds a node to the end of the child nodes list of this node.
-
appendHtml(
String text, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → void -
inheritedParses the specified text as HTML and adds the resulting node after the last child of this element.
-
appendText(
String text) → void -
inheritedAdds the specified text after the last child of this element.
-
async(
void callback(), {int waitTime}) → int -
inheritedRuns a callback function asyncronously.
-
attached(
) → void -
inheritedCalled by the DOM when this element has been inserted into the live document.
-
attributeChanged(
String name, String oldValue, String newValue) → void -
inheritedCalled by the DOM whenever an attribute on this has been changed.
-
attributeFollows(
String name, Element toElement, Element fromElement) → void -
inheritedRemoves an HTML attribute from one node, and adds it to another.
-
blur(
) → void -
inherited
-
cancelAsync(
int handle) → void -
inheritedCancels an async operation started with async.
-
cancelDebouncer(
String jobName) → void -
inheritedCancels an active debouncer. The callback will not be called.
-
classFollows(
String name, Element toElement, Element fromElement) → void -
inheritedRemoves a class from one node, and adds it to another.
-
clear(
String path) → void -
inheritedRemove all items from a list at
path
. -
click(
) → void -
inherited
-
clone(
bool deep) → Node -
inheritedReturns a copy of this node.
-
contains(
Node other) → bool -
inheritedReturns true if this node contains the specified node.
-
create(
String tag, Map props) → Element -
inheritedConvenience method for creating an element and configuring it.
-
createFragment(
String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → DocumentFragment -
inheritedCreate a DocumentFragment from the HTML fragment and ensure that it follows the sanitization rules specified by the validator or treeSanitizer.
-
createShadowRoot(
) → ShadowRoot -
inherited
-
debounce(
String jobName, void callback(), {int waitTime}) → void -
inheritedCall debounce to collapse multiple requests for a named task into one invocation which is made after the wait time has elapsed with no new request. If no wait time is given, the callback will be called at microtask timing (guaranteed before paint).
-
detached(
) → void -
inheritedCalled by the DOM when this element has been removed from the live document.
-
dispatchEvent(
Event event) → bool -
inherited
-
distributeContent(
) → void -
inheritedForce this element to distribute its children to its local dom. A user should call distributeContent if distribution has been invalidated due to changes to selectors on child elements that effect distribution that were not made via Polymer.dom. For example, if an element contains an insertion point with <content select=".foo"> and a foo class is added to a child, then distributeContent must be called to update local dom distribution.
-
elementMatches(
String selector, Element node) → bool -
inheritedPolyfill for Element.prototype.matches, which is sometimes still prefixed.
-
enteredView(
) → void -
inheritedDeprecated*: override attached instead.
-
fillRange(
String path, int start, int end, [fillValue]) → void -
inheritedSets the objects in the range
start
inclusive toend
exclusive to the givenfillValue
on the list atpath
. -
fire(
String type, {detail, bool canBubble: true, bool cancelable: true, Node node}) → CustomEvent -
inheritedDispatches a custom event with an optional detail object.
-
flushDebouncer(
String jobName) → void -
inheritedImmediately calls the debouncer callback and inactivates it.
-
focus(
) → void -
inherited
-
get(
String path, [root]) → dynamic -
inheritedGets a value at
path
for theroot
object. Theroot
defaults tothis
. Theroot
must be a JsProxy or PolymerElement object. -
getAnimationPlayers(
) → List<AnimationPlayer> -
inherited
-
getAttribute(
String name) → String -
inherited
-
getAttributeNS(
String namespaceURI, String localName) → String -
inherited
-
getBoundingClientRect(
) → Rectangle -
inheritedReturns the smallest bounding rectangle that encompasses this element's padding, scrollbar, and border.
-
getClientRects(
) → List<Rectangle> -
inheritedReturns a list of bounding rectangles for each box associated with this element.
-
getComputedStyle(
[String pseudoElement]) → CssStyleDeclaration -
inheritedThe set of all CSS values applied to this element, including inherited and default values.
-
getContentChildNodes(
[String selector]) → List<Node> -
inheritedReturns a list of nodes distributed to this element's <content>.
-
getContentChildren(
[String selector]) → List<Element> -
inheritedReturns a list of element children distributed to this element's <content>.
-
getDestinationInsertionPoints(
) → List<Node> -
inheritedReturns a list of shadow DOM insertion points to which this element is distributed.
-
getEffectiveChildNodes(
) → List<Node> -
inheritedReturns a list of nodes that are the effective childNodes. The effective childNodes list is the same as the element's childNodes except that any
<content>
elements are replaced with the list of nodes distributed to the<content>
, the result of itsgetDistributedNodes
method. -
getEffectiveChildren(
) → List<Element> -
inheritedReturns a list of elements that are the effective children. The effective children list is the same as the element's children except that any
<content>
elements are replaced with the list of elements distributed to the<content>
. -
getEffectiveText(
) → String -
inheritedReturns a string of text content that is the concatenation of the text content's of the element's effective childNodes (the elements returned by
getEffectiveChildNodes
. -
getElementsByClassName(
String classNames) → List<Node> -
inheritedReturns a list of nodes with the given class name inside this element.
-
getNamespacedAttributes(
String namespace) → Map<String,String> -
inheritedGets a map for manipulating the attributes of a particular namespace.
-
getPropertyInfo(
String property) → JsObject -
inheritedReturns a property descriptor object for the property specified.
-
hasChildNodes(
) → bool -
inheritedReturns true if this node has any children.
-
importHref(
String href, {void onLoad(e), void onError(e)}) → LinkElement -
inheritedConvenience method for importing an HTML document imperatively.
-
insert(
String path, int index, element) → void -
inheritedInserts
element
at positionindex
to the list atpath
. -
insertAdjacentElement(
String where, Element element) → Element -
inherited
-
insertAdjacentHtml(
String where, String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → void -
inheritedParses text as an HTML fragment and inserts it into the DOM at the specified location.
-
insertAdjacentText(
String where, String text) → void -
inherited
-
insertAll(
String path, int index, Iterable elements) → void -
inheritedInserts
elements
at positionindex
to the list atpath
. -
insertAllBefore(
Iterable<Node> newNodes, Node refChild) → Node -
inheritedInserts all of the nodes into this node directly before refChild.
-
insertBefore(
Node newChild, Node refChild) → Node -
inheritedInserts all of the nodes into this node directly before refChild.
-
instanceTemplate(
TemplateElement template) → DocumentFragment -
inheritedCalls importNode on the content of the template specified and returns a document fragment containing the imported content.
-
isDebouncerActive(
String jobName) → bool -
inheritedReturns whether a named debouncer is active.
-
isLightDescendant(
Element node) → bool -
inheritedChecks whether an element is in this element's light DOM tree.
-
isLocalDescendant(
Element node) → bool -
inheritedChecks whether an element is in this element's local DOM tree.
-
leftView(
) → void -
inheritedDeprecated*: override detached instead.
-
linkPaths(
String to, String from) → void -
inheritedAliases one data path as another, such that path notifications from one are routed to the other.
-
listen(
Element node, String eventName, String methodName) → void -
inheritedConvenience method to add an event listener on a given element, late bound to a named method on this element.
-
matches(
String selectors) → bool -
inherited
-
matchesWithAncestors(
String selectors) → bool -
inheritedChecks if this element or any of its parents match the CSS selectors.
-
notifyPath(
String path, value, {fromAbove: false}) → void -
inheritedNotify that a value at a path has been changed.
-
offsetTo(
Element parent) → Point -
inheritedProvides the offset of this element's borderEdge relative to the specified
parent
. -
query(
String relativeSelectors) → Element -
inheritedAlias for querySelector. Note this function is deprecated because its semantics will be changing in the future.
-
queryAll(
String relativeSelectors) → ElementList<Element> -
inheritedAlias for querySelectorAll. Note this function is deprecated because its semantics will be changing in the future.
-
queryAllEffectiveChildren(
String selector) → List<Element> -
inherited
-
queryEffectiveChildren(
String selector) → Element -
inherited
-
querySelector(
String selectors) → Element -
inheritedFinds the first descendant element of this element that matches the specified group of selectors.
-
querySelectorAll(
String selectors) → ElementList<Element> -
inheritedFinds all descendent elements of this element that match the specified group of selectors.
-
reflectPropertyToAttribute(
String name) → void -
inheritedSerializes a property to its associated attribute.
-
remove(
) → void -
inheritedRemoves this node from the DOM.
-
removeAt(
String path, int index) → dynamic -
inheritedRemoves the item at
index
from the list atpath
. Returns the removed element. -
removeEventListener(
String type, dynamic listener(Event event), [bool useCapture]) → void -
inherited
-
removeItem(
String path, value) → bool -
inheritedRemoves the first occurrence of
value
from the list atpath
. Returns true if value was in the list, false otherwise. Note: Renamed fromremove
because that conflicts with HtmlElement.remove. -
removeLast(
String path) → dynamic -
inheritedRemoves the last from the list at
path
. Returns the removed element. -
removeRange(
String path, int start, int end) → void -
inheritedRemoves the objects in the range
start
inclusive toend
exclusive from the list atpath
. -
removeWhere(
String path, bool test(element)) → void -
inheritedRemoves all objects from the list at
path
that satisfytest
. TODO(jakemac): Optimize by removing whole ranges? -
replaceRange(
String path, int start, int end, Iterable replacement) → void -
inheritedRemoves the objects in the range
start
inclusive toend
exclusive and inserts the contents ofreplacement
in its place for the list atpath
. -
replaceWith(
Node otherNode) → Node -
inheritedReplaces this node with another node.
-
requestFullscreen(
) → void -
inherited
-
requestPointerLock(
) → void -
inherited
-
retainWhere(
String path, bool test(element)) → void -
inheritedRemoves all objects from the list at
path
that fail to satisfytest
. -
scopeSubtree(
Element container, bool shouldObserve) → void -
inheritedApply style scoping to the specified container and all its descendants. If shoudlObserve is true, changes to the container are monitored via mutation observer and scoping is applied.
-
scrollIntoView(
[ScrollAlignment alignment]) → void -
inheritedScrolls this element into view.
-
serializeValueToAttribute(
value, String attribute, [Element node]) → void -
inheritedSets a typed value to an HTML attribute on a node.
-
set(
String path, value) → void -
inheritedSets a value on an attribute path, and notifies of changes.
-
setAll(
String path, int index, Iterable iterable) → void -
inheritedOverwrites objects in the list at
path
with the objects ofiterable
, starting at positionindex
in this list. -
setAttribute(
String name, String value) → void -
inherited
-
setAttributeNS(
String namespaceURI, String qualifiedName, String value) → void -
inherited
-
setInnerHtml(
String html, {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) → void -
inheritedParses the HTML fragment and sets it as the contents of this element. This ensures that the generated content follows the sanitization rules specified by the validator or treeSanitizer.
-
setRange(
String path, int start, int end, Iterable iterable, [int skipCount = 0]) → void -
inheritedCopies the objects of
iterable
, skippingskipCount
objects first, into the rangestart
, inclusive, toend
, exclusive, of the list atpath
. -
setScrollDirection(
[String direction = 'all', Element node]) → void -
inheritedOverride scrolling behavior to all direction, one direction, or none.
-
toggleAttribute(
String name, [bool value, Element node]) → void -
inheritedToggles an HTML attribute on or off.
-
toggleClass(
String name, [bool value, Element node]) → void -
inheritedToggles a CSS class on or off.
-
toString(
) → String -
inheritedThe string representation of this element.
-
transform(
String transform, [Element node]) → void -
inheritedCross-platform helper for setting an element's CSS transform property.
-
translate3d(
String x, String y, String z, [Element node]) → void -
inheritedCross-platform helper for setting an element's CSS translate3d property.
-
unlinkPaths(
String path) → void -
inheritedRemoves a data path alias previously established with linkPaths.
-
updateStyles(
) → void -
inheritedRe-evaluates and applies custom CSS properties based on dynamic changes to this element's scope, such as adding or removing classes in this element's local DOM.