Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
The InlineCluster
component is used to display a group of elements
in a row. When the group is too large to fit in a single row, the
elements will be displayed in a cluster based on the width of the
container and the justification of the cluster.
First, you must install @bedrock-layout/css
.
yarn add @bedrock-layout/css
Then, you can import the entire CSS or just the component's CSS in your project:
import "@bedrock-layout/css/lib/bedrock-layout.min.css"; // or import "@bedrock-layout/css/lib/components/inline-cluster.min.css";
Optionally, you can install the package for your framework of choice (React.js, Solid.js) using your favorite package manager CLI:
## For React.js yarn add @bedrock-layout/inline-cluster ## or yarn add @bedrock-layout/primitives ## For Solid.js yarn add @bedrock-layout/solid
Then import the component in your project:
// For React.js import { InlineCluster } from '@bedrock-layout/inline-cluster' // or import { InlineCluster } from '@bedrock-layout/primitives' // For Solid.js import { InlineCluster } from '@bedrock-layout/solid'
Name | Description | Default | Control |
---|---|---|---|
gap | string | - | |
as | unknown | "div" | |
style | unknown | {} | |
gutter | - | - | |
justify | - | - | |
align | - | - |
The gap
prop defines the gap size between elements.
Ultimately, the space is controlled by setting the --gap
CSS variable.
Bedrock has implemented a default spacing scheme,
but it can be overridden using the ThemeProvider provided by @bedrock-layout/spacing-constants
.
You can also use any valid CSSLength or positive integer.
// CSS // Using the predefined spacing constants <div data-br-inline-cluster='gap:size3'> <Component /> <Component /> </div> // Or you can use a custom value directly <div data-br-inline-cluster style={{ "--gap": "3ch" }}> <Component /> <Component /> </div> // React.js and Solid.js <InlineCluster gap="size3"> <Component /> <Component /> </InlineCluster> // Or you can use a css value directly <InlineCluster gap="3ch"> <Component /> <Component /> </InlineCluster> // or you can use a custom property <InlineCluster gap="--custom-size-4"> <Component /> <Component /> </InlineCluster>
Here are the possible values for gap
by default:
The justify
prop defines the inline justification of the
elements within the cluster. It accepts the following
values: start
, end
, center
.
// CSS <div data-br-inline-cluster='justify:end'> <Component /> <Component /> </div> // React.js and Solid.js <InlineCluster justify="end"> <Component /> <Component /> </InlineCluster>
The align
prop defines the vertical alignment of the
elements within the cluster. It accepts the following
values: start
, end
, center
, stretch
.
// CSS <div data-br-inline-cluster='align:end'> <Component /> <Component /> </div> // React.js and Solid.js <InlineCluster align="end"> <Component /> <Component /> </InlineCluster>