
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@mg901/react-slot-fill
Advanced tools

You can install this library via npm
or yarn
.
npm
npm i @mg901/react-slot-fill
yarn
yarn add @mg901/react-slot-fill
If you need to render a component from somepart of the DOM tree, but it needs to be visible in another part of the tree, this library solves it.
The usage is really simple:
toolbar.js
import React from 'react';
import { Slot, Fill } from '@mg901/react-slot-fill';
const Toolbar = (props) => (
<div>
<Slot name="Toolbar.Item" />
</div>
);
export default Toolbar;
// single Fill
Toolbar.Item = (props) => (
<Fill name="Toolbar.Item">
<button>{props.label}</button>
</Fill>
);
// or multiple Fill
Toolbar.Item = (props) => (
<>
<Fill name="Toolbar.Item">
<button>{props.label}</button>
</Fill>
<Fill name="Toolbar.Item">
<button>{props.label}</button>
</Fill>
<Fill name="Toolbar.Item">
<button>{props.label}</button>
</Fill>
</>
);
feature.js
import React from 'react';
import Toolbar from './Toolbar';
const Feature = () => <Toolbar.Item label="My Feature!" />;
app.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from '@mg901/react-slot-fill';
import Toolbar from './Toolbar';
import Feature from './Feature';
const App = () => (
<Provider>
<Toolbar />
<Feature />
</Provider>
);
ReactDOM.render(<App />, document.getElementById('root'));
Slot
and Fill
components use the same props, which are the following ones:
Properties | Types | Default Value | Description |
---|---|---|---|
name | string | none | Determines the name of the Slot/Fill. |
MIT License
Copyright (c) 2018-2019 Maxim Alyoshin.
This project is licensed under the MIT License - see the LICENSE.md file for details.
FAQs

The npm package @mg901/react-slot-fill receives a total of 0 weekly downloads. As such, @mg901/react-slot-fill popularity was classified as not popular.
We found that @mg901/react-slot-fill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.