Slots

WIP

This page describes how Hopper components include predefined layouts that you can insert elements into via slots. Slots are named areas in a component that receive children and provide style and layout for them.

This page will be inspired by https://react-spectrum.adobe.com/react-aria/advanced.html#slots but the focus of the page should be slots, not the context like this page.

Introduction

Contexts

Default slot

Consuming contexts

useContextProps

useSlottedContext

Creating Custom Components

using existing context

using new contexts