#Compound Components
3 messages · Page 1 of 1 (latest)
Hi @raw dome. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Astro supports the concept of reusable and composable components. This means you can use components inside of other components to build more advanced UI. For example, a Button component could be used to create a ButtonGroup component:
---import Button from './Button.astro';---
<div>
<Button title="Button 1" />
<Button title="Button 2" />
<Button title="Button 3" />
</div>
(Source: Astro Documentation (https://docs.astro.build/en/core-concepts/astro-components/))
However, the extracts provided do not specifically mention the concept of "compound components" in the form of Component.Subcomponent. It's important to note that Astro's component model is a bit different from JavaScript frameworks like React. Astro components are more akin to HTML and don't inherently support the Component.Subcomponent syntax.