Content Showcase

{
  "cccc": false,
  "stuff": [
    false,
    true,
    false
  ]
}

Example

Sveltekit-UI is a wonderful library!

There are so many great components including this content display, which encapsulates many components but we will need to create better documentation in the future when we get a chance and have a larger user base. testalongcontinuouspieceoftextletsseeifitwrapswhenscreengetsmobile

false
true
false

Component Documentation

Component Name

Content

Builder Function Name

create_content_manager

Description

manages a nested tree of typed components, allowing dynamic rendering based on type_ids and attributes

Use like example

Config

PropertyTypeDefaultDescription
valobject

the top-level content node containing { type_id, selector_id, attributes, children }

is_dark_themeboolean

false

if true, toggles usage of dark theme variants for certain components

storage_pathstring

/api/v1/storage/{storage_id}

template path for retrieving stored media, used by some child components (e.g. image, audio)

variablesany

external data object used by show_conditions or variable-based attributes

mapkit_js_tokenstring

token for mapkit if needed by location-based components

on_eventfunction

callback for setting or manipulating variables when certain components update

on_search_table_row_idsfunction

callback that returns table row ids for table-row-based inputs (like table_row_id_input)

table_optionsobject

an object of additional options passed along to table-based components if present

Methods

MethodDescriptionParametersReturns
init

initializes the manager, preparing the top-level content node and any children

config: object

void
prepare_component_and_children

recursively creates the required sub-managers for the given node, returning a structured object with type_id, manager, and children

val: object

object
pass_event_down

allows external events to propagate through children and possibly trigger state updates

input: object

void
set_variable_at_path

handles changes to variables via the on_event callback, adjusting stored data by array/object indexing

path: array

value: any

type: string (optional: 'insert', 'delete', 'set_key', or null)

any

Returned Properties

PropertyTypeDescription
val_preppedobject

the processed content node with type, manager, and possible children

definition_stackany

the definition_stack variables reference passed in config, potentially used by show_conditions

icon
Sponsored byContibase