ZoonkWeb.Components.Divider (Zoonk v0.1.0-dev)

View Source

Provides the UI for rendering dividers with optional labels.

The divider creates a horizontal line with an optional centered text label to separate content sections.

Summary

Functions

Renders a horizontal divider with an optional label.

Functions

divider(assigns)

Renders a horizontal divider with an optional label.

Examples

<.divider label="Or continue with" />

<.divider label="Custom divider" class="my-8" />

<div class="bg-zk-card p-4">
  <div>Content above</div>
  <.divider label="Separator" background="bg-zk-card" />
  <div>Content below</div>
</div>

Attributes

  • label (:string) (required) - The text to display in the center of the divider.
  • class (:string) - Additional CSS classes to apply to the divider. Defaults to nil.
  • background (:atom) - Background color class for the label. Should match the parent container's background. Defaults to :default. Must be one of :default, or :bg.