@@ -48,30 +48,30 @@ def card(
48
48
"""
49
49
A Bootstrap card component
50
50
51
- A general purpose container for grouping related UI elements together with a border
52
- and optional padding. To learn more about `card()`s, see [this
51
+ A card is a general purpose container that groups related UI elements together with a border
52
+ and optional padding. To learn more about `card()`s, see [the bslib card
53
53
article](https://rstudio.github.io/bslib/articles/cards.html).
54
54
55
55
Parameters
56
56
----------
57
57
*args
58
- Unnamed arguments can be any valid child of an :class:`~htmltools.Tag` (which
59
- includes card items such as :func:`~shiny.experimental.ui.card_body`.
58
+ Unnamed arguments can be any valid child of an :class:`~htmltools.Tag` (This
59
+ includes card items such as :func:`~shiny.experimental.ui.card_body`) .
60
60
full_screen
61
- If `True`, an icon will appear when hovering over the card body. Clicking the
61
+ If `True`, an icon will appear when the user's pointer hovers over the card body. Clicking the
62
62
icon expands the card to fit viewport size.
63
- height,max_height,min_height
64
- Any valid CSS unit (e.g., `height="200px"`). Doesn't apply when a card is made
65
- `full_screen` (in this case, consider setting a `height` in
66
- :func:`~shiny.experimental.ui.card_body`) .
63
+ height, max_height, min_height
64
+ Any valid CSS unit (e.g., `height="200px"`). These will not apply when a card is made
65
+ `full_screen`. In this case, consider setting a `height` in
66
+ :func:`~shiny.experimental.ui.card_body`.
67
67
fill
68
68
Whether or not to allow the card to grow/shrink to fit a fillable container with
69
69
an opinionated height (e.g., :func:`~shiny.ui.page_fillable`).
70
70
class_
71
71
Additional CSS classes for the returned Tag.
72
72
wrapper
73
- A function (which returns a UI element) to call on unnamed arguments in `*args`
74
- which are not already card item(s) (like
73
+ A function that returns a UI element to call on any unnamed arguments in `*args`
74
+ that are not already card item(s) (like
75
75
:func:`~shiny.ui.card_header`,
76
76
:func:`~shiny.experimental.ui.card_body`, etc.). Note that non-card items are
77
77
grouped together into one `wrapper` call (e.g. given `card("a", "b",
@@ -83,17 +83,17 @@ def card(
83
83
Returns
84
84
-------
85
85
:
86
- An :func:`~shiny.ui.tags.div` tag.
86
+ A :func:`~shiny.ui.tags.div` tag.
87
87
88
88
See Also
89
89
--------
90
90
* :func:`~shiny.ui.layout_column_wrap` for laying out multiple cards
91
- ( or multiple columns inside a card) .
92
- * :func:`~shiny.ui.card_header` for creating a header within the card.
93
- * :func:`~shiny.experimental.ui.card_title` for creating a title within the card body.
94
- * :func:`~shiny.experimental.ui.card_body` for putting content inside the card.
95
- * :func:`~shiny.ui.card_footer` for creating a footer within the card.
96
- * :func:`~shiny.experimental.ui.card_image` for adding an image to the card.
91
+ or multiple columns inside a card.
92
+ * :func:`~shiny.ui.card_header` for creating a header within a card.
93
+ * :func:`~shiny.experimental.ui.card_title` for creating a title within a card body.
94
+ * :func:`~shiny.experimental.ui.card_body` for putting content inside a card.
95
+ * :func:`~shiny.ui.card_footer` for creating a footer within a card.
96
+ * :func:`~shiny.experimental.ui.card_image` for adding an image to a card.
97
97
"""
98
98
return _card_impl (
99
99
* args ,
@@ -118,33 +118,35 @@ def card_title(
118
118
** kwargs : TagAttrValue ,
119
119
) -> Tagifiable :
120
120
"""
121
- Card title container
121
+ A card title container
122
122
123
- A general container for the "title" of a :func:`~shiny.ui.card`. This component is designed
123
+ :func:`~shiny.experimental.ui.card_title` creates a general container for the "title" of
124
+ a :func:`~shiny.ui.card`. This component is designed
124
125
to be provided as a direct child to :func:`~shiny.ui.card`.
125
126
126
127
Parameters
127
128
----------
128
129
*args
129
- Contents to the card's title. Or tag attributes that are supplied to the
130
+ Contents to appear in the card's title, or tag attributes to pass to the
130
131
resolved :class:`~htmltools.Tag` object.
131
132
container
132
- Method for the returned Tag object. Defaults to :func:`shiny.ui.tags.h5`.
133
+ Method for the returned :class:`~htmltools.Tag` object. Defaults to
134
+ :func:`~shiny.ui.tags`.h5.
133
135
**kwargs
134
- Additional HTML attributes for the returned Tag.
136
+ Additional HTML attributes for the returned :class:`~htmltools. Tag` object .
135
137
136
138
Returns
137
139
-------
138
140
:
139
- A Tag object.
141
+ An :class:`~htmltools. Tag` object.
140
142
141
143
See Also
142
144
--------
143
145
* :func:`~shiny.ui.card` for creating a card component.
144
- * :func:`~shiny.ui.card_header` for creating a header within the card.
145
- * :func:`~shiny.experimental.ui.card_body` for putting content inside the card.
146
- * :func:`~shiny.ui.card_footer` for creating a footer within the card.
147
- * :func:`~shiny.experimental.ui.card_image` for adding an image to the card.
146
+ * :func:`~shiny.ui.card_header` for creating a header within a card.
147
+ * :func:`~shiny.experimental.ui.card_body` for putting content inside a card.
148
+ * :func:`~shiny.ui.card_footer` for creating a footer within a card.
149
+ * :func:`~shiny.experimental.ui.card_image` for adding an image to a card.
148
150
"""
149
151
return container (* args , ** kwargs )
150
152
@@ -188,21 +190,22 @@ def card_image(
188
190
** kwargs : TagAttrValue ,
189
191
) -> Tagifiable :
190
192
"""
191
- Card image container
193
+ A card image container
192
194
193
- A general container for an image within a :func:`~shiny.ui.card`. This component is designed to be
195
+ :func:`~shiny.experimental.ui.card_image` creates a general container for an image within a
196
+ :func:`~shiny.ui.card`. This component is designed to be
194
197
provided as a direct child to :func:`~shiny.ui.card`.
195
198
196
199
Parameters
197
200
----------
198
201
file
199
- A file path pointing an image. The image will be base64 encoded and provided to
200
- the `src` attribute of the `<img>`. Alternatively, you may set this value to
202
+ A file path pointing to an image. The image will be base64 encoded and provided to
203
+ the `src` attribute of the `<img>` tag . Alternatively, you may set this value to
201
204
`None` and provide the `src` yourself via `*args:TagAttrs` or
202
- `**kwargs:TagAttrValue` (e.g. `{"src": "HOSTED_PATH_TO_IMAGE"}` or
205
+ `**kwargs:TagAttrValue` (e.g., `{"src": "HOSTED_PATH_TO_IMAGE"}` or
203
206
`src="HOSTED_PATH_TO_IMAGE"`).
204
207
*args
205
- Dictionary of tag attributes that are supplied to the resolved
208
+ A dictionary of tag attributes that are supplied to the resolved
206
209
:class:`~htmltools.Tag` object.
207
210
href
208
211
An optional URL to link to.
@@ -211,23 +214,24 @@ def card_image(
211
214
mime_type
212
215
The mime type of the `file`.
213
216
class_
214
- Additional CSS classes for the resolved Tag.
217
+ Additional CSS classes for the resolved :class:`~htmltools. Tag` object .
215
218
height
216
- Any valid CSS unit (e.g., `height="200px"`). Doesn't apply when a card is made
217
- `full_screen` (in this case, consider setting a `height` in
218
- :func:`~shiny.experimental.ui.card_body`) .
219
+ Any valid CSS unit (e.g., `height="200px"`). `height` will not apply when a card is made
220
+ `full_screen`. In this case, consider setting a `height` in
221
+ :func:`~shiny.experimental.ui.card_body`.
219
222
fill
220
223
Whether to allow this element to grow/shrink to fit its `card` container.
221
224
width
222
225
Any valid CSS unit (e.g., `width="100%"`).
223
226
container
224
- Method to wrap the returned Tag object. Defaults to :func:`~shiny.experimental.ui.card_body`.
227
+ Method to wrap the returned :class:`~htmltools.Tag` object. Defaults to
228
+ :func:`~shiny.experimental.ui.card_body`.
225
229
If :func:`~shiny.experimental.ui.card_body` is used, each image will be in separate cards. If
226
230
the `container` method does not return a :class:`~shiny.ui.CardItem`, it
227
231
allows for consecutive non-`CardItem` objects to be bundled into a single
228
232
:func:`~shiny.experimental.ui.card_body` within :func:`~shiny.ui.card`.
229
233
**kwargs
230
- Additional HTML attributes for the resolved Tag.
234
+ Additional HTML attributes for the resolved :class:`~htmltools. Tag` .
231
235
"""
232
236
src = None
233
237
if file is not None :
0 commit comments