How To Access Custom Element Children?

i have this code
tag item <self> <p> #i want content here

i wanna use it like this

<item> "content"

Hei Ayub,

I am note quite sure I understand what you are trying todo. If you want to be able to set the content there as you are showing. You can use slots, see the example below taken from the Imba Changelog episode on the slot discussion.

Please note that I am assuming you are using Imba v2, let me know if that is not the case.

tag app-panel
	
	def render
		<self>
			<header>
			
				<slot name='header'> "Item header"
			<section.main>
				<slot>
					<h2> "Nothing to see here"
			<footer>
				<slot name='footer'>

tag app-root
	def render
		<self>
			<app-panel>
				<div slot='header'>
					<h1> "Title for header"

				<p> "A paragraph for the main content."
				<p> "And another one"

				<button slot='footer' :click.refresh> 'Refresh'
				<button slot='footer' :click.openInBrowser> 'Open in browser'


Thanks, that was what i was looking for

Cool, let us know if you get stuck.

Also worth checking out is the imba/test/apps https://github.com/imba/imba/tree/master/test/apps

There you can find some examples on slots among other things.