nette-componentslisted
Install: claude install-skill nette/agent-plugins
## Nette Components, Signals and Snippets
A component is a descendant of `Nette\Application\UI\Control`, and the presenter is itself a `Control`
(`ComponentModel\Component` -> `Container` -> `UI\Component` -> `UI\Control` -> `UI\Presenter`), so
everything below applies to both. Related skills: **nette-forms** (controls, validation, `onSuccess`),
**nette-architecture** (where components live), **latte-templates** (`{control}`/`{snippet}` syntax),
**nette-configuration** (generated factories), **frontend-development** (Naja on the JS side).
### Component Factories
Any container (presenter or control) creates children lazily through `createComponent<Name>()`:
```php
protected function createComponentPoll(): PollControl
{
return new PollControl($this->items);
}
```
The factory is never called directly. It fires on first access – `$this->getComponent('poll')` or the
equivalent `$this['poll']` (the `ComponentModel\ArrayAccess` trait), which is what `{control poll}` does.
An untouched component is never built.
- **The name starts with a lowercase letter.** `Container::createComponent()` requires
`ucfirst($name) !== $name`, so asking for `Poll` never reaches `createComponentPoll()`.
- The factory receives the name as its first argument, and may either return the component or add it
itself with `addComponent()`; doing neither throws `Nette\UnexpectedValueException`.
- Names match `#^[a-zA-Z0-9_]+$#D` – **no hyphen in a name**, `-` is the tree separator:
`$this['cart-form'