Tile
See: https://www.carbondesignsystem.com/components/tile/usage/
Tiles are a highly flexible component for displaying a wide variety of content, including information, getting started, how-to, next steps, and more.
Overview
Carbon ships a basic tile structure that responds to the grid. Based on the layout structure, tiles can contain type, images and/or a block of color. As tiles have no pre-set styles for the content within them, the tile component usage guidance is purposefully high-level. It focuses specifically on the tile itself, not the structure of the information or interactive elements that the tile contains—that type of information will be found in the card pattern.
- class carbondesign.tags.tile.Tile(*args, **kwargs)
Tile component.
- WANT_CHILDREN = True
Template Tag needs closing end tag.
- SLOTS = ('above', 'icon')
Named children.
- MODES = ('default', 'clickable', 'expandable')
Available variants.
- prepare(values, context)
Prepare values for rendering the templates.
- render_default(values, context)
Output html of the component.
- render_clickable(values, context)
Output html of the component.
- render_expandable(values, context)
Output html of the component.
- render_slot_above(values, context)
Render html of the slot.
- render_tmpl_icon(values, context)
Dynamically render a part of the component’s template.
- class carbondesign.tags.tile.TileSelectable(*args, **kwargs)
Tile selectable component.
- WANT_CHILDREN = True
Template Tag needs closing end tag.
- MODES = ('default', 'inside')
Available variants.
- prepare(values, context)
Prepare values for rendering the templates.
- prepare_element_props(props, context)
Prepare html attributes for rendering the form element.
- render_default(values, context)
Output html of the component.
- render_inside(values, context)
Output html of the component.