Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nitro-ui"
version = "1.0.9"
version = "1.0.10"
description = "Build HTML with Python, not strings. Zero-dependency library with type-safe elements, method chaining, and JSON serialization."
readme = "README.md"
requires-python = ">=3.8"
Expand Down
13 changes: 10 additions & 3 deletions src/nitro_ui/core/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,17 @@ def _process_template(
return result

def template(self) -> List[Any]:
"""Override to define the component structure.
"""Override to define this component's structure.

The method's parameters become declared props: when a caller
instantiates the component, non-element positional arguments and
matching keyword arguments are routed here. ``Slot()`` markers in
the returned tree are replaced with child content; named slots
are filled from kwargs of the same name.

Returns:
List of HTMLElement instances and/or Slot markers.
Use Slot() for default slot, Slot("name") for named slots.
A list of ``HTMLElement`` instances and/or ``Slot`` markers
that describe the rendered output. Use ``Slot()`` for the
default slot and ``Slot("name")`` for named slots.
"""
return [Slot()]
Loading
Loading