ZoonkWeb.Components.Text (Zoonk v0.1.0-dev)
View SourceProvides the UI for rendering text.
Summary
Functions
Renders a text element.
Functions
Renders a text element.
Examples
<.text>Some text</.text>
<.text tag="h1">Some text</.text>
<.text size={:xl}>Some text</.text>
<.text variant={:secondary}>Some text</.text>
Attributes
tag
(:string
) - HTML tag to use for the text element. Defaults to"p"
.size
(:atom
) - Size of the text. Defaults to:md
. Must be one of:xxl
,:xl
,:lg
,:md
,:sm
, or:xs
.weight
(:atom
) - Font weight of the text. Defaults tonil
. Must be one of:bold
,:semibold
,:medium
,:normal
, ornil
.variant
(:atom
) - Color variant of the text. Defaults to:primary
. Must be one of:primary
,:secondary
,:destructive
, or:custom
.for
(:string
) - The for attribute for labels. Defaults tonil
.class
(:any
) - CSS class to apply to the text element. Defaults tonil
.id
(:string
) - ID of the text element. Defaults tonil
.- Global attributes are accepted. HTML attributes to apply to the text element.
Slots
inner_block
(required) - Content to render inside the text element.