module Kiso::ComponentHelper

def kui(component, part = nil, collection: nil, ui: nil, scope: nil, **kwargs, &block)

Other tags:
    Example: Render a collection -
    Example: Share domain locals with sub-parts via scope -
    Example: Pass HTML attributes through to the root element -
    Example: Override root element classes -
    Example: Render an alert with inner element overrides -
    Example: Render a card with per-slot overrides -
    Example: Render a card with composed sub-parts -
    Example: Render a simple badge -

Returns:
  • (ActiveSupport::SafeBuffer) - rendered HTML string

Other tags:
    Yield: - optional block for component content. When omitted, an empty

Parameters:
  • kwargs (Hash) -- locals forwarded to the partial (e.g. +color:+,
  • scope (Hash, nil) -- domain locals shared from parent to sub-parts
  • ui (Hash{Symbol => String}, nil) -- per-slot class overrides keyed
  • collection (Array, nil) -- when present, renders the partial once
  • part (Symbol, nil) -- optional sub-part name (e.g. +:header+,
  • component (Symbol) -- the component name (e.g. +:badge+, +:card+,
def kui(component, part = nil, collection: nil, ui: nil, scope: nil, **kwargs, &block)
  kiso_render_component(
    component, part,
    path_prefix: "kiso/components",
    collection: collection, ui: ui, scope: scope, merge_global_ui: true,
    **kwargs, &block
  )
end