Smart Container
<p-smart-container> | PSmartContainer
This is a responsive container component that handles dynamic content overflow and provides an interactive dropdown menu for hidden items. It observes and manages content inside its slots, automatically adjusting the layout to handle overflow situations..
<p-smart-container> <p-button>Click</p-button> <p-button>Click</p-button> <p-button>Click</p-button> <p-button>Click</p-button> <p-button>Click</p-button> <p-button>Click</p-button> </p-smart-container>
Importing
If you’re using the autoloader or the traditional loader, you can ignore this section. Otherwise, feel free to use any of the following snippets to cherry pick this component.
To import this component from the CDN using a script tag:
<script type="module" src="https://cdn.jsdelivr.net/npm/pure-uikit@1.3.13/cdn/components/smart-container/smart-container.js"></script>
To import this component from the CDN using a JavaScript import:
import 'https://cdn.jsdelivr.net/npm/pure-uikit@1.3.13/cdn/components/smart-container/smart-container.js';
To import this component using a bundler:
import 'pure-uikit/dist/components/smart-container/smart-container.js';
To import this component as a React component:
import PSmartContainer from 'pure-uikit/dist/react/smart-container';
Slots
Name | Description |
---|---|
(default) | The default slot. |
icon
|
The icon slot. |
Learn more about using slots.
Properties
Name | Description | Reflects | Type | Default |
---|---|---|---|---|
attr
|
An example attribute. |
string
|
"example"
|
|
updateComplete |
A read-only promise that resolves when the component has finished updating. |
Learn more about attributes and properties.
Parts
Name | Description |
---|---|
base |
The component’s base wrapper. |
dropdown-menu |
The dropdown menu. |
Learn more about customizing CSS parts.
Dependencies
This component automatically imports the following dependencies.
<p-dropdown>
<p-popup>