A component for prop composition.
Composable slot for merging props onto a child element. In Elixir/Phoenix, this is implemented as a
wrapper around dynamic_tag to allow for tag-based composition.
Examples
<.slot as="button" class="my-btn">
Click me
</.slot>
Summary
Functions
Renders a slot with the specified tag and merged props.
Functions
Renders a slot with the specified tag and merged props.
Props
as- The HTML tag to render (default: "div")class- Additional CSS classesstyle- Additional inline stylesrest- Additional HTML attributes
Attributes
as(:string) - Defaults to"div".class(:string) - Defaults tonil.style(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)