All Downloads are FREE. Search and download functionalities are using the official Maven repository.

split-layoutpackage.web-types.json Maven / Gradle / Ivy

The newest version!
{
  "$schema": "https://json.schemastore.org/web-types",
  "name": "@vaadin/split-layout",
  "version": "24.5.3",
  "description-markup": "markdown",
  "contributions": {
    "html": {
      "elements": [
        {
          "name": "vaadin-split-layout",
          "description": "`` is a Web Component implementing a split layout for two\ncontent elements with a draggable splitter between them.\n\n```html\n\n  
First content element
\n
Second content element
\n
\n```\n\n### Horizontal and Vertical Layouts\n\nBy default, the split's orientation is horizontal, meaning that the content elements are\npositioned side by side in a flex container with a horizontal layout.\n\nYou can change the split mode to vertical by setting the `orientation` attribute to `\"vertical\"`:\n\n```html\n\n
Content on the top
\n
Content on the bottom
\n
\n```\n\n### Layouts Combination\n\nFor the layout contents, we usually use `
` elements in the examples,\nalthough you can use any other elements as well.\n\nFor instance, in order to have a nested vertical split layout inside a\nhorizontal one, you can include `` as a content element\ninside another split layout:\n\n```html\n\n
First content element
\n \n
Second content element
\n
Third content element
\n
\n
\n```\n\nYou can also trigger the vertical mode in JavaScript by setting the property:\n`splitLayout.orientation = \"vertical\";`.\n\n### Split Layout Element Height\n\n`` element itself is a flex container. It does not inherit\nthe parent height by default, but rather sets its height depending on the\ncontent.\n\nYou can use CSS to set the fixed height for the split layout, as usual with any\nblock element:\n\n```html\n\n
First content element
\n
Second content element
\n
\n```\n\nIt is possible to define percentage height as well. Note that you have to set\nthe parent height in order to make percentages work correctly. In the following\nexample, the `` is resized to fill the entire viewport, and the\n`` element is set to take 100% height of the ``:\n\n```html\n\n \n
First
\n
Second
\n
\n\n```\n\nAlternatively, you can use a flexbox layout to make ``\nfill up the parent:\n\n```html\n\n \n
First
\n
Second
\n
\n\n```\n\n### Initial Splitter Position\n\nThe initial splitter position is determined from the sizes of the content elements\ninside the split layout. Therefore, changing `width` on the content elements\naffects the initial splitter position for the horizontal layouts, while `height`\naffects the vertical ones.\n\nNote that when the total size of the content elements does not fit the layout,\nthe content elements are scaled proportionally.\n\nWhen setting initial sizes with relative units, such as percentages, it is\nrecommended to assign the size for both content elements:\n\n```html\n\n
Three fourths
\n
One fourth
\n
\n```\n\n### Size Limits\n\nThe `min-width`/`min-height`, and `max-width`/`max-height` CSS size values\nfor the content elements are respected and used to limit the splitter position\nwhen it is dragged.\n\nIt is preferred to set the limits only for a single content element, in order\nto avoid size conflicts:\n\n```html\n\n
First
\n
Second
\n
\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description | Theme for Element\n----------------|----------------|----------------\n`splitter` | Split element | vaadin-split-layout\n`handle` | The handle of the splitter | vaadin-split-layout\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", "attributes": [ { "name": "orientation", "description": "The split layout's orientation. Possible values are: `horizontal|vertical`.", "value": { "type": [ "string" ] } }, { "name": "theme", "description": "The theme variants to apply to the component.", "value": { "type": [ "string", "null", "undefined" ] } } ], "js": { "properties": [ { "name": "orientation", "description": "The split layout's orientation. Possible values are: `horizontal|vertical`.", "value": { "type": [ "string" ] } } ], "events": [ { "name": "splitter-dragend", "description": "Fired after dragging the splitter have ended." } ] } } ] } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy