-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathhtmlArea.Rd
145 lines (105 loc) · 5.45 KB
/
htmlArea.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
% Auto-generated: do not edit by hand
\name{htmlArea}
\alias{htmlArea}
\title{Area component}
\description{
Area is a wrapper for the <area> HTML5 element. For detailed attribute info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area
}
\usage{
htmlArea(children=NULL, id=NULL, n_clicks=NULL,
n_clicks_timestamp=NULL, key=NULL, role=NULL, alt=NULL,
coords=NULL, download=NULL, href=NULL, hrefLang=NULL,
media=NULL, referrerPolicy=NULL, rel=NULL, shape=NULL,
target=NULL, accessKey=NULL, className=NULL,
contentEditable=NULL, contextMenu=NULL, dir=NULL,
draggable=NULL, hidden=NULL, lang=NULL, spellCheck=NULL,
style=NULL, tabIndex=NULL, title=NULL, loading_state=NULL,
...)
}
\arguments{
\item{children}{A list of or a singular dash component, string or number. The children of this component}
\item{id}{Character. The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.}
\item{n_clicks}{Numeric. An integer that represents the number of times
that this element has been clicked on.}
\item{n_clicks_timestamp}{Numeric. An integer that represents the time (in ms since 1970)
at which n_clicks changed. This can be used to tell
which button was changed most recently.}
\item{key}{Character. A unique identifier for the component, used to improve
performance by React.js while rendering components
See https://reactjs.org/docs/lists-and-keys.html for more info}
\item{role}{Character. The ARIA role attribute}
\item{alt}{Character. Alternative text in case an image can't be displayed.}
\item{coords}{Character. A set of values specifying the coordinates of the hot-spot region.}
\item{download}{Character. Indicates that the hyperlink is to be used for downloading a resource.}
\item{href}{Character. The URL of a linked resource.}
\item{hrefLang}{Character. Specifies the language of the linked resource.}
\item{media}{Character. Specifies a hint of the media for which the linked resource was designed.}
\item{referrerPolicy}{Character. Specifies which referrer is sent when fetching the resource.}
\item{rel}{Character. Specifies the relationship of the target object to the link object.}
\item{shape}{Character. }
\item{target}{Character. Specifies where to open the linked document (in the case of an <a> element) or where to display the response received (in the case of a <form> element)}
\item{accessKey}{Character. Keyboard shortcut to activate or add focus to the element.}
\item{className}{Character. Often used with CSS to style elements with common properties.}
\item{contentEditable}{Character. Indicates whether the element's content is editable.}
\item{contextMenu}{Character. Defines the ID of a <menu> element which will serve as the element's context menu.}
\item{dir}{Character. Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)}
\item{draggable}{Character. Defines whether the element can be dragged.}
\item{hidden}{A value equal to: 'hidden', 'hidden' | logical. Prevents rendering of given element, while keeping child elements, e.g. script elements, active.}
\item{lang}{Character. Defines the language used in the element.}
\item{spellCheck}{Character. Indicates whether spell checking is allowed for the element.}
\item{style}{Named list. Defines CSS styles which will override styles previously set.}
\item{tabIndex}{Character. Overrides the browser's default tab order and follows the one specified instead.}
\item{title}{Character. Text to be displayed in a tooltip when hovering over the element.}
\item{loading_state}{Lists containing elements 'is_loading', 'prop_name', 'component_name'.
those elements have the following types:
- is_loading (logical; optional): determines if the component is loading or not
- prop_name (character; optional): holds which property is loading
- component_name (character; optional): holds the name of the component that is loading. Object that holds the loading state object coming from dash-renderer}
\item{...}{wildcards allowed have the form: `'data-*', 'aria-*'`}
}
\value{named list of JSON elements corresponding to React.js properties and their values}
\examples{
# The URL below has been chunked to comply with CRAN
# requirements; the use of file.path is optional and not required
# for this component.
if (interactive()) {
library(dash)
app$layout(
htmlDiv(list(
htmlImg(src = file.path('https://upload.wikimedia.org',
'wikipedia/commons/0/0c',
'PIA17351-ApparentSizes-MarsDeimosPhobos-EarthMoon.jpg',
fsep = '/'),
useMap = '#image-map'),
htmlMapEl(list(
htmlArea(target='_blank',
alt='Deimos',
title='Deimos',
href='https://en.wikipedia.org/wiki/Deimos_(moon)',
coords='5,114,32,147',
shape='rect'),
htmlArea(target='_blank',
alt='Phobos',
title='Phobos',
href='https://en.wikipedia.org/wiki/Phobos_(moon)',
coords='113,196,32,103',
shape='rect'),
htmlArea(target='_blank',
alt='Moon',
title='Moon',
href='https://en.wikipedia.org/wiki/Moon',
coords='127,285,294,1',
shape='rect')
),
name = 'image-map'
),
htmlDiv(children = 'Click on the image to visit a Wikipedia article',
id = 'object-name')
)
)
)
app$run_server()
}
}