diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index fe46c4306c..5f4d222d7b 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -26,7 +26,7 @@ jobs: # See https://github.com/lerna/lerna/issues/2840 - name: Create Dev Hash run: | - echo "HASH=$(git log -1 --format=%H | cut -c 1-7)" >> $GITHUB_ENV + echo "HASH=1$(git log -1 --format=%H | cut -c 1-7)" >> $GITHUB_ENV echo "TIMESTAMP=1$(date +%s)" >> $GITHUB_ENV echo "CURRENT_VERSION=$(node ./.scripts/bump-version.js)" >> $GITHUB_ENV shell: bash diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..2db37f3ec1 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +core.d.ts +core.json diff --git a/docs/.npmignore b/docs/.npmignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/core.d.ts b/docs/core.d.ts deleted file mode 100644 index f15d232881..0000000000 --- a/docs/core.d.ts +++ /dev/null @@ -1,121 +0,0 @@ - -/** - * This is an autogenerated file created by the Stencil compiler. - * DO NOT MODIFY IT MANUALLY - */ -export interface JsonDocs { - components: JsonDocsComponent[]; - timestamp: string; - compiler: { - name: string; - version: string; - typescriptVersion: string; - }; -} -export interface JsonDocsComponent { - dirPath?: string; - fileName?: string; - filePath?: string; - readmePath?: string; - usagesDir?: string; - encapsulation: 'shadow' | 'scoped' | 'none'; - tag: string; - readme: string; - docs: string; - docsTags: JsonDocsTag[]; - usage: JsonDocsUsage; - props: JsonDocsProp[]; - methods: JsonDocsMethod[]; - events: JsonDocsEvent[]; - listeners: JsonDocsListener[]; - styles: JsonDocsStyle[]; - slots: JsonDocsSlot[]; - parts: JsonDocsPart[]; - dependents: string[]; - dependencies: string[]; - dependencyGraph: JsonDocsDependencyGraph; - deprecation?: string; -} -export interface JsonDocsDependencyGraph { - [tagName: string]: string[]; -} -export interface JsonDocsTag { - name: string; - text?: string; -} -export interface JsonDocsValue { - value?: string; - type: string; -} -export interface JsonDocsUsage { - [key: string]: string; -} -export interface JsonDocsProp { - name: string; - type: string; - mutable: boolean; - attr?: string; - reflectToAttr: boolean; - docs: string; - docsTags: JsonDocsTag[]; - default: string; - deprecation?: string; - values: JsonDocsValue[]; - optional: boolean; - required: boolean; -} -export interface JsonDocsMethod { - name: string; - docs: string; - docsTags: JsonDocsTag[]; - deprecation?: string; - signature: string; - returns: JsonDocsMethodReturn; - parameters: JsonDocMethodParameter[]; -} -export interface JsonDocsMethodReturn { - type: string; - docs: string; -} -export interface JsonDocMethodParameter { - name: string; - type: string; - docs: string; -} -export interface JsonDocsEvent { - event: string; - bubbles: boolean; - cancelable: boolean; - composed: boolean; - docs: string; - docsTags: JsonDocsTag[]; - deprecation?: string; - detail: string; -} -export interface JsonDocsStyle { - name: string; - docs: string; - annotation: string; -} -export interface JsonDocsListener { - event: string; - target?: string; - capture: boolean; - passive: boolean; -} -export interface JsonDocsSlot { - name: string; - docs: string; -} -export interface JsonDocsPart { - name: string; - docs: string; -} -export interface StyleDoc { - name: string; - docs: string; - annotation: 'prop'; -} - -declare const _default: JsonDocs; -export default _default; diff --git a/docs/core.json b/docs/core.json deleted file mode 100644 index 298925c883..0000000000 --- a/docs/core.json +++ /dev/null @@ -1,20204 +0,0 @@ -{ - "timestamp": "2022-03-08T15:06:29", - "compiler": { - "name": "@stencil/core", - "version": "2.14.1", - "typescriptVersion": "4.5.4" - }, - "components": [ - { - "filePath": "./src/components/accordion/accordion.tsx", - "encapsulation": "shadow", - "tag": "ion-accordion", - "readme": "# ion-accordion\n\nAccordions provide collapsible sections in your content to reduce vertical space while providing a way of organizing and grouping information. All `ion-accordion` components should be grouped inside `ion-accordion-group` components.\n\n## Anatomy\n\n### Header\n\nThe `header` slot is used as the toggle that will expand or collapse your accordion. We recommend you use an `ion-item` here to take advantage of the accessibility and theming functionalities.\n\nWhen using `ion-item` in the `header` slot, the `ion-item`'s `button` prop is set to `true` and the `detail` prop is set to `false`. In addition, we will also automatically add a toggle icon to the `ion-item`. This icon will automatically be rotated when you expand or collapse the accordion. See [Customizing Icons](#customizing-icons) for more information.\n\n### Content\n\nThe `content` slot is used as the part of the accordion that is revealed or hidden depending on the state of your accordion. You can place anything here except for another `ion-content` instance as only one instance of `ion-content` should be added per page.\n\n## Customizing Icons\n\nWhen using an `ion-item` in the `header` slot, we automatically add an `ion-icon`. The type of icon used can be controlled by the `toggleIcon` property, and the slot it is added to can be controlled with the `toggleIconSlot` property.\n\nIf you would like to manage the icon yourself or use an icon that is not an `ion-icon`, you can add the `ion-accordion-toggle-icon` class to the icon element.\n\nRegardless of which option you choose, the icon will automatically be rotated when you expand or collapse the accordion.\n\n## Expansion Styles\n\n### Built in Styles\n\nThere are two built in expansion styles: `compact` and `inset`. This expansion style is set via the `expand` property on `ion-accordion-group`. When `expand=\"inset\"`, the accordion group is given a border radius. On `md` mode, the entire accordion will shift down when it is opened.\n\n### Custom Styles\n\nYou can customize the expansion behavior by styling based on the accordion's state:\n\n```css\nion-accordion {\n margin: 0 auto;\n}\n\nion-accordion.accordion-expanding,\nion-accordion.accordion-expanded {\n width: calc(100% - 32px);\n margin: 16px auto;\n}\n```\n\nThis example will cause an accordion to have its width shrink when it is opened. You can also style the accordion differently when it is closing by targeting the `.accordion-collapsing` and `.accordion-collapsed` classes.\n\nIf you need to target specific pieces of the accordion, we recommend targeting the element directly. For example, if you want to customize the `ion-item` in your `header` slot when the accordion is expanded, you can use the following selector:\n\n```css\nion-accordion.accordion-expanding ion-item[slot=\"header\"],\nion-accordion.accordion-expanded ion-item[slot=\"header\"] {\n --color: red;\n}\n```\n\nThis example will set the text color of the header `ion-item` to red when the accordion is expanded.\n\n## Accessibility\n\n### Animations\n\nBy default, animations are enabled when expanding or collapsing an accordion item. Animations will be automatically disabled when the `prefers-reduced-motion` media query is supported and set to `reduce`. For browsers that do not support this, animations can be disabled by setting the `animated` config in your Ionic Framework app.\n\n### Keyboard Navigation\n\nWhen used inside an `ion-accordion-group`, `ion-accordion` has full keyboard support for interacting with the component. The following table details what each key does:\n\n| Key | Function |\n| ------------------ | ------------------------------------------------------------ |\n| `Space` or `Enter` | When focus is on the accordion header, the accordion will collapse or expand depending on the state of the component. |\n| `Tab` | Moves focus to the next focusable element. |\n| `Shift` + `Tab` | Moves focus to the previous focusable element. |\n| `Down Arrow` | - When focus is on an accordion header, moves focus to the next accordion header.
- When focus is on the last accordion header, moves focus to the first accordion header. |\n| `Up Arrow` | - When focus is on an accordion header, moves focus to the previous accordion header.
- When focus is on the first accordion header, moves focus to the last accordion header. |\n| `Home` | When focus is on an accordion header, moves focus to the first accordion header. |\n| `End` | When focus is on an accordion header, moves focus to the last accordion header. |\n", - "docs": "Accordions provide collapsible sections in your content to reduce vertical space while providing a way of organizing and grouping information. All `ion-accordion` components should be grouped inside `ion-accordion-group` components.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "header - Content is placed at the top and is used to\nexpand or collapse the accordion item." - }, - { - "name": "slot", - "text": "content - Content is placed below the header and is\nshown or hidden based on expanded state." - }, - { - "name": "part", - "text": "header - The wrapper element for the header slot." - }, - { - "name": "part", - "text": "content - The wrapper element for the content slot." - }, - { - "name": "part", - "text": "expanded - The expanded element. Can be used in combination\nwith the `header` and `content` parts (i.e. `::part(header expanded)`)." - } - ], - "usage": { - "angular": "```html\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n```\n\n**component.html**\n```html\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\nLog Value of Accordion Group\nClose All Accordions\n```\n\n**component.ts**\n```typescript\nimport { Component, ViewChild } from '@angular/core';\nimport { IonAccordionGroup } from '@ionic/angular';\n\n@Component({…})\nexport class MyComponent {\n @ViewChild(IonAccordionGroup, { static: true }) accordionGroup: IonAccordionGroup;\n constructor() {}\n \n logAccordionValue() {\n console.log(this.accordionGroup.value);\n }\n \n closeAccordion() {\n this.accordionGroup.value = undefined;\n } \n}\n```", - "javascript": "```html\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\n\n\n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n\n\nLog Value of Accordion Group\nClose All Accordions\n\n\n```\n", - "react": "```tsx\nimport React, { useRef } from 'react';\n\nimport { IonContent, IonAccordionGroup, IonAccordion, IonItem, IonLabel, IonList, IonPage } from '@ionic/react';\nimport { arrowDownCircle } from 'ionicons/icons';\n\nexport const AccordionExample: React.FC = () => {\n const accordionGroupRef = useRef(null);\n const logAccordionValue = () => {\n if (accordionGroupRef.current) {\n console.log(accordionGroupRef.current.value);\n }\n }\n const closeAccordion = () => {\n if (accordionGroupRef.current) {\n accordionGroupRef.current.value = undefined;\n }\n }\n \n return (\n \n \n {/*-- Basic --*/}\n \n \n \n Colors\n \n \n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n \n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n \n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n \n \n {/*-- Custom Icon --*/}\n \n \n \n Colors\n \n \n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n \n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n \n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n \n \n {/*-- Open Accordion --*/}\n \n \n \n Colors\n \n \n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n \n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n \n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n \n \n {/*-- Multiple Accordions --*/}\n \n \n \n Colors\n \n \n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n \n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n \n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n \n \n {/*-- Getting and setting the state of the accordion group --*/}\n \n \n \n Colors\n \n \n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n \n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n \n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n \n \n logAccordionValue()}>Log Value of Accordion Group\n closeAccordion()}>Close All Accordions\n \n \n )\n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'accordion-example',\n styleUrl: 'accordion-example.css'\n})\nexport const AccordionExample {\n private accordionGroupRef?: HTMLIonAccordionGroupEl;\n \n private logAccordionValue = () => {\n const { accordionGroupRef } = this;\n if (accordionGroupRef) {\n console.log(accordionGroupRef.value);\n }\n }\n \n private closeAccordion = () => {\n const { accordionGroupRef } = this;\n if (accordionGroupRef) {\n accordionGroupRef.value = undefined;\n }\n }\n \n render() {\n return [\n // Basic\n \n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n ,\n\n // Custom Icon\n \n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n ,\n\n // Open Accordion\n \n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n ,\n\n // Multiple Accordions\n \n \n \n Colors\n \n\n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n\n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n\n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n ,\n \n {/* Getting and setting the state of the accordion group */}\n this.accordionGroupRef = el}>\n \n \n Colors\n \n \n \n \n Red\n \n \n Green\n \n \n Blue\n \n \n \n \n \n Shapes\n \n \n \n \n Circle\n \n \n Triangle\n \n \n Square\n \n \n \n \n \n Numbers\n \n \n \n \n 1\n \n \n 2\n \n \n 3\n \n \n \n ,\n \n logAccordionValue()}>Log Value of Accordion Group,\n closeAccordion()}>Close All Accordions,\n ];\n }\n);\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the accordion cannot be interacted with.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "readonly", - "type": "boolean", - "mutable": false, - "attr": "readonly", - "reflectToAttr": false, - "docs": "If `true`, the accordion cannot be interacted with,\nbut does not alter the opacity.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "toggleIcon", - "type": "string", - "mutable": false, - "attr": "toggle-icon", - "reflectToAttr": false, - "docs": "The toggle icon to use. This icon will be\nrotated when the accordion is expanded\nor collapsed.", - "docsTags": [], - "default": "chevronDown", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "toggleIconSlot", - "type": "\"end\" | \"start\"", - "mutable": false, - "attr": "toggle-icon-slot", - "reflectToAttr": false, - "docs": "The slot inside of `ion-item` to\nplace the toggle icon. Defaults to `'end'`.", - "docsTags": [], - "default": "'end'", - "values": [ - { - "value": "end", - "type": "string" - }, - { - "value": "start", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "string", - "mutable": false, - "attr": "value", - "reflectToAttr": false, - "docs": "The value of the accordion. Defaults to an autogenerated\nvalue.", - "docsTags": [], - "default": "`ion-accordion-${accordionIds++}`", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [ - { - "name": "content", - "docs": "Content is placed below the header and is\nshown or hidden based on expanded state." - }, - { - "name": "header", - "docs": "Content is placed at the top and is used to\nexpand or collapse the accordion item." - } - ], - "parts": [ - { - "name": "content", - "docs": "The wrapper element for the content slot." - }, - { - "name": "expanded", - "docs": "The expanded element. Can be used in combination\nwith the `header` and `content` parts (i.e. `::part(header expanded)`)." - }, - { - "name": "header", - "docs": "The wrapper element for the header slot." - } - ], - "dependents": [], - "dependencies": [ - "ion-icon" - ], - "dependencyGraph": { - "ion-accordion": [ - "ion-icon" - ] - } - }, - { - "filePath": "./src/components/accordion-group/accordion-group.tsx", - "encapsulation": "shadow", - "tag": "ion-accordion-group", - "readme": "# ion-accordion-group\n\nAccordion group is a container for accordion instances. It manages the state of the accordions and provides keyboard navigation.\n\nFor more information as well as usage, see the [Accordion Documentation](./accordion)\n\n## Interfaces\n\n### AccordionGroupChangeEventDetail\n\n```typescript\ninterface AccordionGroupChangeEventDetail {\n value: T;\n}\n```\n\n### AccordionGroupCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface AccordionGroupCustomEvent extends CustomEvent {\n detail: AccordionGroupChangeEventDetail;\n target: HTMLIonAccordionGroupElement;\n}\n```\n", - "docs": "Accordion group is a container for accordion instances. It manages the state of the accordions and provides keyboard navigation.\n\nFor more information as well as usage, see the [Accordion Documentation](./accordion)", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": {}, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, all accordions inside of the\naccordion group will animate when expanding\nor collapsing.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the accordion group cannot be interacted with.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "expand", - "type": "\"compact\" | \"inset\"", - "mutable": false, - "attr": "expand", - "reflectToAttr": false, - "docs": "Describes the expansion behavior for each accordion.\nPossible values are `\"compact\"` and `\"inset\"`.\nDefaults to `\"compact\"`.", - "docsTags": [], - "default": "'compact'", - "values": [ - { - "value": "compact", - "type": "string" - }, - { - "value": "inset", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "multiple", - "type": "boolean | undefined", - "mutable": false, - "attr": "multiple", - "reflectToAttr": false, - "docs": "If `true`, the accordion group can have multiple\naccordion components expanded at the same time.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "readonly", - "type": "boolean", - "mutable": false, - "attr": "readonly", - "reflectToAttr": false, - "docs": "If `true`, the accordion group cannot be interacted with,\nbut does not alter the opacity.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "null | string | string[] | undefined", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "The value of the accordion group.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "string[]" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionChange", - "detail": "AccordionGroupChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value property has changed.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "keydown", - "capture": false, - "passive": false - } - ], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/action-sheet/action-sheet.tsx", - "encapsulation": "scoped", - "tag": "ion-action-sheet", - "readme": "# ion-action-sheet\n\nAn Action Sheet is a dialog that displays a set of options. It appears on top of the app's content, and must be manually dismissed by the user before they can resume interaction with the app. Destructive options are made obvious in `ios` mode. There are multiple ways to dismiss the action sheet, including tapping the backdrop or hitting the escape key on desktop.\n\n## Buttons\n\nA button's `role` property can either be `destructive` or `cancel`. Buttons without a role property will have the default look for the platform. Buttons with the `cancel` role will always load as the bottom button, no matter where they are in the array. All other buttons will be displayed in the order they have been added to the `buttons` array. Note: We recommend that `destructive` buttons are always the first button in the array, making them the top button. Additionally, if the action sheet is dismissed by tapping the backdrop, then it will fire the handler from the button with the cancel role.\n\nA button can also be passed data via the `data` property on `ActionSheetButton`. This will populate the `data` field in the return value of the `onDidDismiss` method.\n\n## Customization\n\nAction Sheet uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector.\n\nWe recommend passing a custom class to `cssClass` in the `create` method and using that to add custom styles to the host and inner elements. This property can also accept multiple classes separated by spaces. View the [Usage](#usage) section for an example of how to pass a class using `cssClass`.\n\n```css\n/* DOES NOT WORK - not specific enough */\n.action-sheet-group {\n background: #e5e5e5;\n}\n\n/* Works - pass \"my-custom-class\" in cssClass to increase specificity */\n.my-custom-class .action-sheet-group {\n background: #e5e5e5;\n}\n```\n\nAny of the defined [CSS Custom Properties](#css-custom-properties) can be used to style the Action Sheet without needing to target individual elements:\n\n```css\n.my-custom-class {\n --background: #e5e5e5;\n}\n```\n\n> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.\n\n## Interfaces\n\n### ActionSheetButton\n\n```typescript\ninterface ActionSheetButton {\n text?: string;\n role?: 'cancel' | 'destructive' | 'selected' | string;\n icon?: string;\n cssClass?: string | string[];\n handler?: () => boolean | void | Promise;\n data?: T;\n}\n```\n\n### ActionSheetOptions\n\n```typescript\ninterface ActionSheetOptions {\n header?: string;\n subHeader?: string;\n cssClass?: string | string[];\n buttons: (ActionSheetButton | string)[];\n backdropDismiss?: boolean;\n translucent?: boolean;\n animated?: boolean;\n mode?: Mode;\n keyboardClose?: boolean;\n id?: string;\n htmlAttributes?: ActionSheetAttributes;\n\n enterAnimation?: AnimationBuilder;\n leaveAnimation?: AnimationBuilder;\n}\n```\n\n### ActionSheetAttributes\n\n```typescript\ninterface ActionSheetAttributes extends JSXBase.HTMLAttributes {}\n```\n", - "docs": "An Action Sheet is a dialog that displays a set of options. It appears on top of the app's content, and must be manually dismissed by the user before they can resume interaction with the app. Destructive options are made obvious in `ios` mode. There are multiple ways to dismiss the action sheet, including tapping the backdrop or hitting the escape key on desktop.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```typescript\nimport { Component } from '@angular/core';\nimport { ActionSheetController } from '@ionic/angular';\n\n@Component({\n selector: 'action-sheet-example',\n templateUrl: 'action-sheet-example.html',\n styleUrls: ['./action-sheet-example.css'],\n})\nexport class ActionSheetExample {\n\n constructor(public actionSheetController: ActionSheetController) {}\n\n async presentActionSheet() {\n const actionSheet = await this.actionSheetController.create({\n header: 'Albums',\n cssClass: 'my-custom-class',\n buttons: [{\n text: 'Delete',\n role: 'destructive',\n icon: 'trash',\n id: 'delete-button',\n data: {\n type: 'delete'\n },\n handler: () => {\n console.log('Delete clicked');\n }\n }, {\n text: 'Share',\n icon: 'share',\n data: 10,\n handler: () => {\n console.log('Share clicked');\n }\n }, {\n text: 'Play (open modal)',\n icon: 'caret-forward-circle',\n data: 'Data value',\n handler: () => {\n console.log('Play clicked');\n }\n }, {\n text: 'Favorite',\n icon: 'heart',\n handler: () => {\n console.log('Favorite clicked');\n }\n }, {\n text: 'Cancel',\n icon: 'close',\n role: 'cancel',\n handler: () => {\n console.log('Cancel clicked');\n }\n }]\n });\n await actionSheet.present();\n\n const { role, data } = await actionSheet.onDidDismiss();\n console.log('onDidDismiss resolved with role and data', role, data);\n }\n\n}\n```\n\n\n### Style Placement\n\nIn Angular, the CSS of a specific page is scoped only to elements of that page. Even though the Action Sheet can be presented from within a page, the `ion-action-sheet` element is appended outside of the current page. This means that any custom styles need to go in a global stylesheet file. In an Ionic Angular starter this can be the `src/global.scss` file or you can register a new global style file by [adding to the `styles` build option in `angular.json`](https://angular.io/guide/workspace-config#style-script-config).\n", - "javascript": "```javascript\nasync function presentActionSheet() {\n const actionSheet = document.createElement('ion-action-sheet');\n\n actionSheet.header = 'Albums';\n actionSheet.cssClass = 'my-custom-class';\n actionSheet.buttons = [{\n text: 'Delete',\n role: 'destructive',\n icon: 'trash',\n id: 'delete-button',\n data: {\n type: 'delete'\n },\n handler: () => {\n console.log('Delete clicked');\n }\n }, {\n text: 'Share',\n icon: 'share',\n data: 10,\n handler: () => {\n console.log('Share clicked');\n }\n }, {\n text: 'Play (open modal)',\n icon: 'caret-forward-circle',\n data: 'Data value',\n handler: () => {\n console.log('Play clicked');\n }\n }, {\n text: 'Favorite',\n icon: 'heart',\n handler: () => {\n console.log('Favorite clicked');\n }\n }, {\n text: 'Cancel',\n icon: 'close',\n role: 'cancel',\n handler: () => {\n console.log('Cancel clicked');\n }\n }];\n document.body.appendChild(actionSheet);\n await actionSheet.present();\n\n const { role, data } = await actionSheet.onDidDismiss();\n console.log('onDidDismiss resolved with role and data', role, data);\n}\n```\n", - "react": "```tsx\n/* Using with useIonActionSheet Hook */\n\nimport React from 'react';\nimport {\n IonButton,\n IonContent,\n IonPage,\n useIonActionSheet,\n} from '@ionic/react';\n\nconst ActionSheetExample: React.FC = () => {\n const [present, dismiss] = useIonActionSheet();\n\n return (\n \n \n \n present({\n buttons: [{ text: 'Ok' }, { text: 'Cancel' }],\n header: 'Action Sheet'\n })\n }\n >\n Show ActionSheet\n \n \n present([{ text: 'Ok' }, { text: 'Cancel' }], 'Action Sheet')\n }\n >\n Show ActionSheet using params\n \n {\n present([{ text: 'Ok' }, { text: 'Cancel' }], 'Action Sheet');\n setTimeout(dismiss, 3000);\n }}\n >\n Show ActionSheet, hide after 3 seconds\n \n \n \n );\n};\n```\n\n```tsx\n/* Using with IonActionSheet Component */\n\nimport React, { useState } from 'react';\nimport { IonActionSheet, IonContent, IonButton } from '@ionic/react';\nimport { trash, share, caretForwardCircle, heart, close } from 'ionicons/icons';\n\nexport const ActionSheetExample: React.FC = () => {\n const [showActionSheet, setShowActionSheet] = useState(false);\n\n return (\n \n setShowActionSheet(true)} expand=\"block\">\n Show Action Sheet\n \n setShowActionSheet(false)}\n cssClass='my-custom-class'\n buttons={[{\n text: 'Delete',\n role: 'destructive',\n icon: trash,\n id: 'delete-button',\n data: {\n type: 'delete'\n },\n handler: () => {\n console.log('Delete clicked');\n }\n }, {\n text: 'Share',\n icon: share,\n data: 10,\n handler: () => {\n console.log('Share clicked');\n }\n }, {\n text: 'Play (open modal)',\n icon: caretForwardCircle,\n data: 'Data value',\n handler: () => {\n console.log('Play clicked');\n }\n }, {\n text: 'Favorite',\n icon: heart,\n handler: () => {\n console.log('Favorite clicked');\n }\n }, {\n text: 'Cancel',\n icon: close,\n role: 'cancel',\n handler: () => {\n console.log('Cancel clicked');\n }\n }]}\n >\n \n \n );\n}\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\nimport { actionSheetController } from '@ionic/core';\n\n@Component({\n tag: 'action-sheet-example',\n styleUrl: 'action-sheet-example.css'\n})\nexport class ActionSheetExample {\n async presentActionSheet() {\n const actionSheet = await actionSheetController.create({\n header: 'Albums',\n cssClass: 'my-custom-class',\n buttons: [{\n text: 'Delete',\n role: 'destructive',\n icon: 'trash',\n id: 'delete-button',\n data: {\n type: 'delete'\n },\n handler: () => {\n console.log('Delete clicked');\n }\n }, {\n text: 'Share',\n icon: 'share',\n data: 10,\n handler: () => {\n console.log('Share clicked');\n }\n }, {\n text: 'Play (open modal)',\n icon: 'caret-forward-circle',\n data: 'Data value',\n handler: () => {\n console.log('Play clicked');\n }\n }, {\n text: 'Favorite',\n icon: 'heart',\n handler: () => {\n console.log('Favorite clicked');\n }\n }, {\n text: 'Cancel',\n icon: 'close',\n role: 'cancel',\n handler: () => {\n console.log('Cancel clicked');\n }\n }]\n });\n await actionSheet.present();\n\n const { role, data } = await actionSheet.onDidDismiss();\n console.log('onDidDismiss resolved with role and data', role, data);\n }\n\n render() {\n return [\n \n this.presentActionSheet()}>Present Action Sheet\n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n\nDevelopers can also use this component directly in their template:\n\n```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the action sheet will animate.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "backdropDismiss", - "type": "boolean", - "mutable": false, - "attr": "backdrop-dismiss", - "reflectToAttr": false, - "docs": "If `true`, the action sheet will be dismissed when the backdrop is clicked.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "buttons", - "type": "(string | ActionSheetButton)[]", - "mutable": false, - "reflectToAttr": false, - "docs": "An array of buttons for the action sheet.", - "docsTags": [], - "default": "[]", - "values": [ - { - "type": "(string" - }, - { - "type": "ActionSheetButton)[]" - } - ], - "optional": false, - "required": false - }, - { - "name": "cssClass", - "type": "string | string[] | undefined", - "mutable": false, - "attr": "css-class", - "reflectToAttr": false, - "docs": "Additional classes to apply for custom CSS. If multiple classes are\nprovided they should be separated by spaces.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "string[]" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "enterAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the action sheet is presented.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "header", - "type": "string | undefined", - "mutable": false, - "attr": "header", - "reflectToAttr": false, - "docs": "Title for the action sheet.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "htmlAttributes", - "type": "ActionSheetAttributes | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Additional attributes to pass to the action sheet.", - "docsTags": [], - "values": [ - { - "type": "ActionSheetAttributes" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "keyboardClose", - "type": "boolean", - "mutable": false, - "attr": "keyboard-close", - "reflectToAttr": false, - "docs": "If `true`, the keyboard will be automatically dismissed when the overlay is presented.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "leaveAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the action sheet is dismissed.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "subHeader", - "type": "string | undefined", - "mutable": false, - "attr": "sub-header", - "reflectToAttr": false, - "docs": "Subtitle for the action sheet.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the action sheet will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "dismiss", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "dismiss(data?: any, role?: string | undefined) => Promise", - "parameters": [], - "docs": "Dismiss the action sheet overlay after it has been presented.", - "docsTags": [ - { - "name": "param", - "text": "data Any data to emit in the dismiss events." - }, - { - "name": "param", - "text": "role The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`." - } - ] - }, - { - "name": "onDidDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onDidDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the action sheet did dismiss.", - "docsTags": [] - }, - { - "name": "onWillDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onWillDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the action sheet will dismiss.", - "docsTags": [] - }, - { - "name": "present", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "present() => Promise", - "parameters": [], - "docs": "Present the action sheet overlay after it has been created.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionActionSheetDidDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the alert has dismissed.", - "docsTags": [] - }, - { - "event": "ionActionSheetDidPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the alert has presented.", - "docsTags": [] - }, - { - "event": "ionActionSheetWillDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the alert has dismissed.", - "docsTags": [] - }, - { - "event": "ionActionSheetWillPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the alert has presented.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--backdrop-opacity", - "annotation": "prop", - "docs": "Opacity of the backdrop" - }, - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the action sheet group" - }, - { - "name": "--button-background", - "annotation": "prop", - "docs": "Background of the action sheet button" - }, - { - "name": "--button-background-activated", - "annotation": "prop", - "docs": "Background of the action sheet button when pressed. Note: setting this will interfere with the Material Design ripple." - }, - { - "name": "--button-background-activated-opacity", - "annotation": "prop", - "docs": "Opacity of the action sheet button background when pressed" - }, - { - "name": "--button-background-focused", - "annotation": "prop", - "docs": "Background of the action sheet button when tabbed to" - }, - { - "name": "--button-background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the action sheet button background when tabbed to" - }, - { - "name": "--button-background-hover", - "annotation": "prop", - "docs": "Background of the action sheet button on hover" - }, - { - "name": "--button-background-hover-opacity", - "annotation": "prop", - "docs": "Opacity of the action sheet button background on hover" - }, - { - "name": "--button-background-selected", - "annotation": "prop", - "docs": "Background of the selected action sheet button" - }, - { - "name": "--button-background-selected-opacity", - "annotation": "prop", - "docs": "Opacity of the selected action sheet button background" - }, - { - "name": "--button-color", - "annotation": "prop", - "docs": "Color of the action sheet button" - }, - { - "name": "--button-color-activated", - "annotation": "prop", - "docs": "Color of the action sheet button when pressed" - }, - { - "name": "--button-color-focused", - "annotation": "prop", - "docs": "Color of the action sheet button when tabbed to" - }, - { - "name": "--button-color-hover", - "annotation": "prop", - "docs": "Color of the action sheet button on hover" - }, - { - "name": "--button-color-selected", - "annotation": "prop", - "docs": "Color of the selected action sheet button" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the action sheet text" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "height of the action sheet" - }, - { - "name": "--max-height", - "annotation": "prop", - "docs": "Maximum height of the action sheet" - }, - { - "name": "--max-width", - "annotation": "prop", - "docs": "Maximum width of the action sheet" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the action sheet" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the action sheet" - }, - { - "name": "--width", - "annotation": "prop", - "docs": "Width of the action sheet" - } - ], - "slots": [], - "parts": [], - "dependents": [ - "ion-select" - ], - "dependencies": [ - "ion-backdrop", - "ion-icon", - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-action-sheet": [ - "ion-backdrop", - "ion-icon", - "ion-ripple-effect" - ], - "ion-select": [ - "ion-action-sheet" - ] - } - }, - { - "filePath": "./src/components/alert/alert.tsx", - "encapsulation": "scoped", - "tag": "ion-alert", - "readme": "# ion-alert\n\nAn Alert is a dialog that presents users with information or collects information from the user using inputs. An alert appears on top of the app's content, and must be manually dismissed by the user before they can resume interaction with the app. It can also optionally have a `header`, `subHeader` and `message`.\n\n## Buttons\n\nIn the array of `buttons`, each button includes properties for its `text`, and optionally a `handler`. If a handler returns `false` then the alert will not automatically be dismissed when the button is clicked. All buttons will show up in the order they have been added to the `buttons` array from left to right. Note: The right most button (the last one in the array) is the main button.\n\nOptionally, a `role` property can be added to a button, such as `cancel`. If a `cancel` role is on one of the buttons, then if the alert is dismissed by tapping the backdrop, then it will fire the handler from the button with a cancel role.\n\n\n## Inputs\n\nAlerts can also include several different inputs whose data can be passed back to the app. Inputs can be used as a simple way to prompt users for information. Radios, checkboxes and text inputs are all accepted, but they cannot be mixed. For example, an alert could have all radio button inputs, or all checkbox inputs, but the same alert cannot mix radio and checkbox inputs. Do note however, different types of \"text\" inputs can be mixed, such as `url`, `email`, `text`, `textarea` etc. If you require a complex form UI which doesn't fit within the guidelines of an alert then we recommend building the form within a modal instead.\n\n## Customization\n\nAlert uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector.\n\nWe recommend passing a custom class to `cssClass` in the `create` method and using that to add custom styles to the host and inner elements. This property can also accept multiple classes separated by spaces. View the [Usage](#usage) section for an example of how to pass a class using `cssClass`.\n\n```css\n/* DOES NOT WORK - not specific enough */\n.alert-wrapper {\n background: #e5e5e5;\n}\n\n/* Works - pass \"my-custom-class\" in cssClass to increase specificity */\n.my-custom-class .alert-wrapper {\n background: #e5e5e5;\n}\n```\n\nAny of the defined [CSS Custom Properties](#css-custom-properties) can be used to style the Alert without needing to target individual elements:\n\n```css\n.my-custom-class {\n --background: #e5e5e5;\n}\n```\n\n> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.\n\n## Interfaces\n\n### AlertButton\n\n```typescript\ninterface AlertButton {\n text: string;\n role?: 'cancel' | 'destructive' | string;\n cssClass?: string | string[];\n handler?: (value: any) => boolean | void | {[key: string]: any};\n}\n```\n\n\n### AlertInput\n\n```typescript\ninterface AlertInput {\n type?: TextFieldTypes | 'checkbox' | 'radio' | 'textarea';\n name?: string;\n placeholder?: string;\n value?: any;\n label?: string;\n checked?: boolean;\n disabled?: boolean;\n id?: string;\n handler?: (input: AlertInput) => void;\n min?: string | number;\n max?: string | number;\n cssClass?: string | string[];\n attributes?: AlertInputAttributes | AlertTextareaAttributes;\n tabindex?: number;\n}\n```\n\n### AlertInputAttributes\n\n```typescript\ninterface AlertInputAttributes extends JSXBase.InputHTMLAttributes {}\n```\n\n### AlertOptions\n\n```typescript\ninterface AlertOptions {\n header?: string;\n subHeader?: string;\n message?: string | IonicSafeString;\n cssClass?: string | string[];\n inputs?: AlertInput[];\n buttons?: (AlertButton | string)[];\n backdropDismiss?: boolean;\n translucent?: boolean;\n animated?: boolean;\n htmlAttributes?: AlertAttributes;\n\n mode?: Mode;\n keyboardClose?: boolean;\n id?: string;\n\n enterAnimation?: AnimationBuilder;\n leaveAnimation?: AnimationBuilder;\n}\n```\n\n### AlertAttributes\n```typescript\ninterface AlertAttributes extends JSXBase.HTMLAttributes {}\n```\n\n### AlertTextareaAttributes\n```typescript\ninterface AlertTextareaAttributes extends JSXBase.TextareaHTMLAttributes {}\n```\n\n\n", - "docs": "An Alert is a dialog that presents users with information or collects information from the user using inputs. An alert appears on top of the app's content, and must be manually dismissed by the user before they can resume interaction with the app. It can also optionally have a `header`, `subHeader` and `message`.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```typescript\nimport { Component } from '@angular/core';\nimport { AlertController } from '@ionic/angular';\n\n@Component({\n selector: 'alert-example',\n templateUrl: 'alert-example.html',\n styleUrls: ['./alert-example.css'],\n})\nexport class AlertExample {\n\n constructor(public alertController: AlertController) {}\n\n async presentAlert() {\n const alert = await this.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Alert',\n subHeader: 'Subtitle',\n message: 'This is an alert message.',\n buttons: ['OK']\n });\n\n await alert.present();\n\n const { role } = await alert.onDidDismiss();\n console.log('onDidDismiss resolved with role', role);\n }\n\n async presentAlertMultipleButtons() {\n const alert = await this.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Alert',\n subHeader: 'Subtitle',\n message: 'This is an alert message.',\n buttons: ['Cancel', 'Open Modal', 'Delete']\n });\n\n await alert.present();\n }\n\n async presentAlertConfirm() {\n const alert = await this.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Confirm!',\n message: 'Message text!!!',\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n id: 'cancel-button',\n handler: (blah) => {\n console.log('Confirm Cancel: blah');\n }\n }, {\n text: 'Okay',\n id: 'confirm-button',\n handler: () => {\n console.log('Confirm Okay');\n }\n }\n ]\n });\n\n await alert.present();\n }\n\n async presentAlertPrompt() {\n const alert = await this.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Prompt!',\n inputs: [\n {\n name: 'name1',\n type: 'text',\n placeholder: 'Placeholder 1'\n },\n {\n name: 'name2',\n type: 'text',\n id: 'name2-id',\n value: 'hello',\n placeholder: 'Placeholder 2'\n },\n // multiline input.\n {\n name: 'paragraph',\n id: 'paragraph',\n type: 'textarea',\n placeholder: 'Placeholder 3'\n },\n {\n name: 'name3',\n value: 'http://ionicframework.com',\n type: 'url',\n placeholder: 'Favorite site ever'\n },\n // input date with min & max\n {\n name: 'name4',\n type: 'date',\n min: '2017-03-01',\n max: '2018-01-12'\n },\n // input date without min nor max\n {\n name: 'name5',\n type: 'date'\n },\n {\n name: 'name6',\n type: 'number',\n min: -5,\n max: 10\n },\n {\n name: 'name7',\n type: 'number'\n },\n {\n name: 'name8',\n type: 'password',\n placeholder: 'Advanced Attributes',\n cssClass: 'specialClass',\n attributes: {\n maxlength: 4,\n inputmode: 'decimal'\n }\n }\n ],\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]\n });\n\n await alert.present();\n }\n\n async presentAlertRadio() {\n const alert = await this.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Radio',\n inputs: [\n {\n name: 'radio1',\n type: 'radio',\n label: 'Radio 1',\n value: 'value1',\n handler: () => {\n console.log('Radio 1 selected');\n },\n checked: true\n },\n {\n name: 'radio2',\n type: 'radio',\n label: 'Radio 2',\n value: 'value2',\n handler: () => {\n console.log('Radio 2 selected');\n }\n },\n {\n name: 'radio3',\n type: 'radio',\n label: 'Radio 3',\n value: 'value3',\n handler: () => {\n console.log('Radio 3 selected');\n }\n },\n {\n name: 'radio4',\n type: 'radio',\n label: 'Radio 4',\n value: 'value4',\n handler: () => {\n console.log('Radio 4 selected');\n }\n },\n {\n name: 'radio5',\n type: 'radio',\n label: 'Radio 5',\n value: 'value5',\n handler: () => {\n console.log('Radio 5 selected');\n }\n },\n {\n name: 'radio6',\n type: 'radio',\n label: 'Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 ',\n value: 'value6',\n handler: () => {\n console.log('Radio 6 selected');\n }\n }\n ],\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]\n });\n\n await alert.present();\n }\n\n async presentAlertCheckbox() {\n const alert = await this.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Checkbox',\n inputs: [\n {\n name: 'checkbox1',\n type: 'checkbox',\n label: 'Checkbox 1',\n value: 'value1',\n handler: () => {\n console.log('Checkbox 1 selected');\n },\n checked: true\n },\n\n {\n name: 'checkbox2',\n type: 'checkbox',\n label: 'Checkbox 2',\n value: 'value2',\n handler: () => {\n console.log('Checkbox 2 selected');\n }\n },\n\n {\n name: 'checkbox3',\n type: 'checkbox',\n label: 'Checkbox 3',\n value: 'value3',\n handler: () => {\n console.log('Checkbox 3 selected');\n }\n },\n\n {\n name: 'checkbox4',\n type: 'checkbox',\n label: 'Checkbox 4',\n value: 'value4',\n handler: () => {\n console.log('Checkbox 4 selected');\n }\n },\n\n {\n name: 'checkbox5',\n type: 'checkbox',\n label: 'Checkbox 5',\n value: 'value5',\n handler: () => {\n console.log('Checkbox 5 selected');\n }\n },\n\n {\n name: 'checkbox6',\n type: 'checkbox',\n label: 'Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6',\n value: 'value6',\n handler: () => {\n console.log('Checkbox 6 selected');\n }\n }\n ],\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]\n });\n\n await alert.present();\n }\n}\n```\n\n\n### Style Placement\n\nIn Angular, the CSS of a specific page is scoped only to elements of that page. Even though the Alert can be presented from within a page, the `ion-alert` element is appended outside of the current page. This means that any custom styles need to go in a global stylesheet file. In an Ionic Angular starter this can be the `src/global.scss` file or you can register a new global style file by [adding to the `styles` build option in `angular.json`](https://angular.io/guide/workspace-config#style-script-config).", - "javascript": "```javascript\nfunction presentAlert() {\n const alert = document.createElement('ion-alert');\n alert.cssClass = 'my-custom-class';\n alert.header = 'Alert';\n alert.subHeader = 'Subtitle';\n alert.message = 'This is an alert message.';\n alert.buttons = ['OK'];\n\n document.body.appendChild(alert);\n await alert.present();\n\n const { role } = await alert.onDidDismiss();\n console.log('onDidDismiss resolved with role', role);\n}\n\nfunction presentAlertMultipleButtons() {\n const alert = document.createElement('ion-alert');\n alert.cssClass = 'my-custom-class';\n alert.header = 'Alert';\n alert.subHeader = 'Subtitle';\n alert.message = 'This is an alert message.';\n alert.buttons = ['Cancel', 'Open Modal', 'Delete'];\n\n document.body.appendChild(alert);\n return alert.present();\n}\n\nfunction presentAlertConfirm() {\n const alert = document.createElement('ion-alert');\n alert.cssClass = 'my-custom-class';\n alert.header = 'Confirm!';\n alert.message = 'Message text!!!';\n alert.buttons = [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n id: 'cancel-button',\n handler: (blah) => {\n console.log('Confirm Cancel: blah');\n }\n }, {\n text: 'Okay',\n id: 'confirm-button',\n handler: () => {\n console.log('Confirm Okay')\n }\n }\n ];\n\n document.body.appendChild(alert);\n return alert.present();\n}\n\nfunction presentAlertPrompt() {\n const alert = document.createElement('ion-alert');\n alert.cssClass = 'my-custom-class';\n alert.header = 'Prompt!';\n alert.inputs = [\n {\n placeholder: 'Placeholder 1'\n },\n {\n name: 'name2',\n id: 'name2-id',\n value: 'hello',\n placeholder: 'Placeholder 2'\n },\n // multiline input.\n {\n name: 'paragraph',\n id: 'paragraph',\n type: 'textarea',\n placeholder: 'Placeholder 3'\n },\n {\n name: 'name3',\n value: 'http://ionicframework.com',\n type: 'url',\n placeholder: 'Favorite site ever'\n },\n // input date with min & max\n {\n name: 'name4',\n type: 'date',\n min: '2017-03-01',\n max: '2018-01-12'\n },\n // input date without min nor max\n {\n name: 'name5',\n type: 'date'\n },\n {\n name: 'name6',\n type: 'number',\n min: -5,\n max: 10\n },\n {\n name: 'name7',\n type: 'number'\n },\n {\n name: 'name8',\n type: 'password',\n placeholder: 'Advanced Attributes',\n cssClass: 'specialClass',\n attributes: {\n maxlength: 4,\n inputmode: 'decimal'\n }\n }\n ];\n alert.buttons = [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel')\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok')\n }\n }\n ];\n\n document.body.appendChild(alert);\n return alert.present();\n}\n\nfunction presentAlertRadio() {\n const alert = document.createElement('ion-alert');\n alert.cssClass = 'my-custom-class';\n alert.header = 'Radio';\n alert.inputs = [\n {\n type: 'radio',\n label: 'Radio 1',\n value: 'value1',\n handler: () => {\n console.log('Radio 1 selected');\n },\n checked: true\n },\n {\n type: 'radio',\n label: 'Radio 2',\n value: 'value2',\n handler: () => {\n console.log('Radio 2 selected');\n }\n },\n {\n type: 'radio',\n label: 'Radio 3',\n value: 'value3',\n handler: () => {\n console.log('Radio 3 selected');\n }\n },\n {\n type: 'radio',\n label: 'Radio 4',\n value: 'value4',\n handler: () => {\n console.log('Radio 4 selected');\n }\n },\n {\n type: 'radio',\n label: 'Radio 5',\n value: 'value5',\n handler: () => {\n console.log('Radio 5 selected');\n }\n },\n {\n type: 'radio',\n label: 'Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 ',\n value: 'value6',\n handler: () => {\n console.log('Radio 6 selected');\n }\n }\n ];\n alert.buttons = [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel')\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok')\n }\n }\n ];\n document.body.appendChild(alert);\n return alert.present();\n}\n\nfunction presentAlertCheckbox() {\n const alert = document.createElement('ion-alert');\n alert.cssClass = 'my-custom-class';\n alert.header = 'Checkbox';\n alert.inputs = [\n {\n type: 'checkbox',\n label: 'Checkbox 1',\n value: 'value1',\n handler: () => {\n console.log('Checkbox 1 selected');\n },\n checked: true\n },\n\n {\n type: 'checkbox',\n label: 'Checkbox 2',\n value: 'value2',\n handler: () => {\n console.log('Checkbox 2 selected');\n }\n },\n\n {\n type: 'checkbox',\n label: 'Checkbox 3',\n value: 'value3',\n handler: () => {\n console.log('Checkbox 3 selected');\n }\n },\n\n {\n type: 'checkbox',\n label: 'Checkbox 4',\n value: 'value4',\n handler: () => {\n console.log('Checkbox 4 selected');\n }\n },\n\n {\n type: 'checkbox',\n label: 'Checkbox 5',\n value: 'value5',\n handler: () => {\n console.log('Checkbox 5 selected');\n }\n },\n\n {\n type: 'checkbox',\n label: 'Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6',\n value: 'value6',\n handler: () => {\n console.log('Checkbox 6 selected');\n }\n }\n ];\n alert.buttons = [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel')\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok')\n }\n }\n ];\n\n document.body.appendChild(alert);\n return alert.present();\n}\n```\n", - "react": "```tsx\n/* Using with useIonAlert Hook */\n\nimport React from 'react';\nimport { IonButton, IonContent, IonPage, useIonAlert } from '@ionic/react';\n\nconst AlertExample: React.FC = () => {\n const [present] = useIonAlert();\n return (\n \n \n \n present({\n cssClass: 'my-css',\n header: 'Alert',\n message: 'alert from hook',\n buttons: [\n 'Cancel',\n { text: 'Ok', handler: (d) => console.log('ok pressed') },\n ],\n onDidDismiss: (e) => console.log('did dismiss'),\n })\n }\n >\n Show Alert\n \n present('hello with params', [{ text: 'Ok' }])}\n >\n Show Alert using params\n \n \n \n );\n};\n```\n\n```tsx\n/* Using with IonAlert Component */\n\nimport React, { useState } from 'react';\nimport { IonAlert, IonButton, IonContent } from '@ionic/react';\n\nexport const AlertExample: React.FC = () => {\n\n const [showAlert1, setShowAlert1] = useState(false);\n const [showAlert2, setShowAlert2] = useState(false);\n const [showAlert3, setShowAlert3] = useState(false);\n const [showAlert4, setShowAlert4] = useState(false);\n const [showAlert5, setShowAlert5] = useState(false);\n const [showAlert6, setShowAlert6] = useState(false);\n\n return (\n \n setShowAlert1(true)} expand=\"block\">Show Alert 1\n setShowAlert2(true)} expand=\"block\">Show Alert 2\n setShowAlert3(true)} expand=\"block\">Show Alert 3\n setShowAlert4(true)} expand=\"block\">Show Alert 4\n setShowAlert5(true)} expand=\"block\">Show Alert 5\n setShowAlert6(true)} expand=\"block\">Show Alert 6\n setShowAlert1(false)}\n cssClass='my-custom-class'\n header={'Alert'}\n subHeader={'Subtitle'}\n message={'This is an alert message.'}\n buttons={['OK']}\n />\n\n setShowAlert2(false)}\n cssClass='my-custom-class'\n header={'Alert'}\n subHeader={'Subtitle'}\n message={'This is an alert message.'}\n buttons={['Cancel', 'Open Modal', 'Delete']}\n />\n\n setShowAlert3(false)}\n cssClass='my-custom-class'\n header={'Confirm!'}\n message={'Message text!!!'}\n buttons={[\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n id: 'cancel-button',\n handler: blah => {\n console.log('Confirm Cancel: blah');\n }\n },\n {\n text: 'Okay',\n id: 'confirm-button',\n handler: () => {\n console.log('Confirm Okay');\n }\n }\n ]}\n />\n\n setShowAlert4(false)}\n cssClass='my-custom-class'\n header={'Prompt!'}\n inputs={[\n {\n name: 'name1',\n type: 'text',\n placeholder: 'Placeholder 1'\n },\n {\n name: 'name2',\n type: 'text',\n id: 'name2-id',\n value: 'hello',\n placeholder: 'Placeholder 2'\n },\n {\n name: 'name3',\n value: 'http://ionicframework.com',\n type: 'url',\n placeholder: 'Favorite site ever'\n },\n // input date with min & max\n {\n name: 'name4',\n type: 'date',\n min: '2017-03-01',\n max: '2018-01-12'\n },\n // input date without min nor max\n {\n name: 'name5',\n type: 'date'\n },\n {\n name: 'name6',\n type: 'number',\n min: -5,\n max: 10\n },\n {\n name: 'name7',\n type: 'number'\n },\n {\n name: 'name8',\n type: 'password',\n placeholder: 'Advanced Attributes',\n cssClass: 'specialClass',\n attributes: {\n maxlength: 4,\n inputmode: 'decimal'\n }\n }\n ]}\n buttons={[\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n },\n {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]}\n />\n\n setShowAlert5(false)}\n cssClass='my-custom-class'\n header={'Radio'}\n inputs={[\n {\n name: 'radio1',\n type: 'radio',\n label: 'Radio 1',\n value: 'value1',\n handler: () => {\n console.log('Radio 1 selected');\n },\n checked: true\n },\n {\n name: 'radio2',\n type: 'radio',\n label: 'Radio 2',\n value: 'value2',\n handler: () => {\n console.log('Radio 2 selected');\n }\n },\n {\n name: 'radio3',\n type: 'radio',\n label: 'Radio 3',\n value: 'value3',\n handler: () => {\n console.log('Radio 3 selected');\n }\n },\n {\n name: 'radio4',\n type: 'radio',\n label: 'Radio 4',\n value: 'value4',\n handler: () => {\n console.log('Radio 4 selected');\n }\n },\n {\n name: 'radio5',\n type: 'radio',\n label: 'Radio 5',\n value: 'value5',\n handler: () => {\n console.log('Radio 5 selected');\n }\n },\n {\n name: 'radio6',\n type: 'radio',\n label: 'Radio 6',\n value: 'value6',\n handler: () => {\n console.log('Radio 6 selected');\n }\n }\n ]}\n buttons={[\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n },\n {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]}\n />\n\n setShowAlert6(false)}\n cssClass='my-custom-class'\n header={'Checkbox'}\n inputs={[\n {\n name: 'checkbox1',\n type: 'checkbox',\n label: 'Checkbox 1',\n value: 'value1',\n handler: () => {\n console.log('Checkbox 1 selected');\n },\n checked: true\n },\n {\n name: 'checkbox2',\n type: 'checkbox',\n label: 'Checkbox 2',\n value: 'value2',\n handler: () => {\n console.log('Checkbox 2 selected');\n }\n },\n {\n name: 'checkbox3',\n type: 'checkbox',\n label: 'Checkbox 3',\n value: 'value3',\n handler: () => {\n console.log('Checkbox 3 selected');\n }\n },\n {\n name: 'checkbox4',\n type: 'checkbox',\n label: 'Checkbox 4',\n value: 'value4',\n handler: () => {\n console.log('Checkbox 4 selected');\n }\n },\n {\n name: 'checkbox5',\n type: 'checkbox',\n label: 'Checkbox 5',\n value: 'value5',\n handler: () => {\n console.log('Checkbox 5 selected');\n }\n },\n {\n name: 'checkbox6',\n type: 'checkbox',\n label: 'Checkbox 6',\n value: 'value6',\n handler: () => {\n console.log('Checkbox 6 selected');\n }\n }\n ]}\n buttons={[\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n },\n {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]}\n />\n \n );\n}\n\nexport default AlertExample;\n\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\nimport { alertController } from '@ionic/core';\n\n@Component({\n tag: 'alert-example',\n styleUrl: 'alert-example.css'\n})\nexport class AlertExample {\n async presentAlert() {\n const alert = await alertController.create({\n cssClass: 'my-custom-class',\n header: 'Alert',\n subHeader: 'Subtitle',\n message: 'This is an alert message.',\n buttons: ['OK']\n });\n\n await alert.present();\n\n const { role } = await alert.onDidDismiss();\n console.log('onDidDismiss resolved with role', role);\n }\n\n async presentAlertMultipleButtons() {\n const alert = await alertController.create({\n cssClass: 'my-custom-class',\n header: 'Alert',\n subHeader: 'Subtitle',\n message: 'This is an alert message.',\n buttons: ['Cancel', 'Open Modal', 'Delete']\n });\n\n await alert.present();\n }\n\n async presentAlertConfirm() {\n const alert = await alertController.create({\n cssClass: 'my-custom-class',\n header: 'Confirm!',\n message: 'Message text!!!',\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n id: 'cancel-button',\n handler: (blah) => {\n console.log('Confirm Cancel: blah');\n }\n }, {\n text: 'Okay',\n id: 'confirm-button',\n handler: () => {\n console.log('Confirm Okay');\n }\n }\n ]\n });\n\n await alert.present();\n }\n\n async presentAlertPrompt() {\n const alert = await alertController.create({\n cssClass: 'my-custom-class',\n header: 'Prompt!',\n inputs: [\n {\n name: 'name1',\n type: 'text',\n placeholder: 'Placeholder 1'\n },\n {\n name: 'name2',\n type: 'text',\n id: 'name2-id',\n value: 'hello',\n placeholder: 'Placeholder 2'\n },\n // multiline input.\n {\n name: 'paragraph',\n id: 'paragraph',\n type: 'textarea',\n placeholder: 'Placeholder 3'\n },\n {\n name: 'name3',\n value: 'http://ionicframework.com',\n type: 'url',\n placeholder: 'Favorite site ever'\n },\n // input date with min & max\n {\n name: 'name4',\n type: 'date',\n min: '2017-03-01',\n max: '2018-01-12'\n },\n // input date without min nor max\n {\n name: 'name5',\n type: 'date'\n },\n {\n name: 'name6',\n type: 'number',\n min: -5,\n max: 10\n },\n {\n name: 'name7',\n type: 'number'\n },\n {\n name: 'name8',\n type: 'password',\n placeholder: 'Advanced Attributes',\n cssClass: 'specialClass',\n attributes: {\n maxlength: 4,\n inputmode: 'decimal'\n }\n }\n ],\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]\n });\n\n await alert.present();\n }\n\n async presentAlertRadio() {\n const alert = await alertController.create({\n cssClass: 'my-custom-class',\n header: 'Radio',\n inputs: [\n {\n name: 'radio1',\n type: 'radio',\n label: 'Radio 1',\n value: 'value1',\n handler: () => {\n console.log('Radio 1 selected');\n },\n checked: true\n },\n {\n name: 'radio2',\n type: 'radio',\n label: 'Radio 2',\n value: 'value2',\n handler: () => {\n console.log('Radio 2 selected');\n }\n },\n {\n name: 'radio3',\n type: 'radio',\n label: 'Radio 3',\n value: 'value3',\n handler: () => {\n console.log('Radio 3 selected');\n }\n },\n {\n name: 'radio4',\n type: 'radio',\n label: 'Radio 4',\n value: 'value4',\n handler: () => {\n console.log('Radio 4 selected');\n }\n },\n {\n name: 'radio5',\n type: 'radio',\n label: 'Radio 5',\n value: 'value5',\n handler: () => {\n console.log('Radio 5 selected');\n }\n },\n {\n name: 'radio6',\n type: 'radio',\n label: 'Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 Radio 6 ',\n value: 'value6',\n handler: () => {\n console.log('Radio 6 selected');\n }\n }\n ],\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]\n });\n\n await alert.present();\n }\n\n async presentAlertCheckbox() {\n const alert = await alertController.create({\n cssClass: 'my-custom-class',\n header: 'Checkbox',\n inputs: [\n {\n name: 'checkbox1',\n type: 'checkbox',\n label: 'Checkbox 1',\n value: 'value1',\n handler: () => {\n console.log('Checkbox 1 selected');\n },\n checked: true\n },\n {\n name: 'checkbox2',\n type: 'checkbox',\n label: 'Checkbox 2',\n value: 'value2',\n handler: () => {\n console.log('Checkbox 2 selected');\n }\n },\n\n {\n name: 'checkbox3',\n type: 'checkbox',\n label: 'Checkbox 3',\n value: 'value3',\n handler: () => {\n console.log('Checkbox 3 selected');\n }\n },\n\n {\n name: 'checkbox4',\n type: 'checkbox',\n label: 'Checkbox 4',\n value: 'value4',\n handler: () => {\n console.log('Checkbox 4 selected');\n }\n },\n\n {\n name: 'checkbox5',\n type: 'checkbox',\n label: 'Checkbox 5',\n value: 'value5',\n handler: () => {\n console.log('Checkbox 5 selected');\n }\n },\n\n {\n name: 'checkbox6',\n type: 'checkbox',\n label: 'Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6 Checkbox 6',\n value: 'value6',\n handler: () => {\n console.log('Checkbox 6 selected');\n }\n }\n ],\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n console.log('Confirm Cancel');\n }\n }, {\n text: 'Ok',\n handler: () => {\n console.log('Confirm Ok');\n }\n }\n ]\n });\n\n await alert.present();\n }\n\n\n render() {\n return [\n \n this.presentAlert()}>Present Alert\n this.presentAlertMultipleButtons()}>Present Alert: Multiple Buttons\n this.presentAlertConfirm()}>Present Alert: Confirm\n this.presentAlertPrompt()}>Present Alert: Prompt\n this.presentAlertRadio()}>Present Alert: Radio\n this.presentAlertCheckbox()}>Present Alert: Checkbox\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n\nDevelopers can also use this component directly in their template:\n\n```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the alert will animate.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "backdropDismiss", - "type": "boolean", - "mutable": false, - "attr": "backdrop-dismiss", - "reflectToAttr": false, - "docs": "If `true`, the alert will be dismissed when the backdrop is clicked.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "buttons", - "type": "(string | AlertButton)[]", - "mutable": false, - "reflectToAttr": false, - "docs": "Array of buttons to be added to the alert.", - "docsTags": [], - "default": "[]", - "values": [ - { - "type": "(string" - }, - { - "type": "AlertButton)[]" - } - ], - "optional": false, - "required": false - }, - { - "name": "cssClass", - "type": "string | string[] | undefined", - "mutable": false, - "attr": "css-class", - "reflectToAttr": false, - "docs": "Additional classes to apply for custom CSS. If multiple classes are\nprovided they should be separated by spaces.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "string[]" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "enterAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the alert is presented.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "header", - "type": "string | undefined", - "mutable": false, - "attr": "header", - "reflectToAttr": false, - "docs": "The main title in the heading of the alert.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "htmlAttributes", - "type": "AlertAttributes | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Additional attributes to pass to the alert.", - "docsTags": [], - "values": [ - { - "type": "AlertAttributes" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "inputs", - "type": "AlertInput[]", - "mutable": true, - "reflectToAttr": false, - "docs": "Array of input to show in the alert.", - "docsTags": [], - "default": "[]", - "values": [ - { - "type": "AlertInput[]" - } - ], - "optional": false, - "required": false - }, - { - "name": "keyboardClose", - "type": "boolean", - "mutable": false, - "attr": "keyboard-close", - "reflectToAttr": false, - "docs": "If `true`, the keyboard will be automatically dismissed when the overlay is presented.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "leaveAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the alert is dismissed.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "message", - "type": "IonicSafeString | string | undefined", - "mutable": false, - "attr": "message", - "reflectToAttr": false, - "docs": "The main message to be displayed in the alert.\n`message` can accept either plaintext or HTML as a string.\nTo display characters normally reserved for HTML, they\nmust be escaped. For example `` would become\n`<Ionic>`\n\nFor more information: [Security Documentation](https://ionicframework.com/docs/faq/security)", - "docsTags": [], - "values": [ - { - "type": "IonicSafeString" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "subHeader", - "type": "string | undefined", - "mutable": false, - "attr": "sub-header", - "reflectToAttr": false, - "docs": "The subtitle in the heading of the alert. Displayed under the title.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the alert will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "dismiss", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "dismiss(data?: any, role?: string | undefined) => Promise", - "parameters": [], - "docs": "Dismiss the alert overlay after it has been presented.", - "docsTags": [ - { - "name": "param", - "text": "data Any data to emit in the dismiss events." - }, - { - "name": "param", - "text": "role The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`." - } - ] - }, - { - "name": "onDidDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onDidDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the alert did dismiss.", - "docsTags": [] - }, - { - "name": "onWillDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onWillDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the alert will dismiss.", - "docsTags": [] - }, - { - "name": "present", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "present() => Promise", - "parameters": [], - "docs": "Present the alert overlay after it has been created.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionAlertDidDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the alert has dismissed.", - "docsTags": [] - }, - { - "event": "ionAlertDidPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the alert has presented.", - "docsTags": [] - }, - { - "event": "ionAlertWillDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the alert has dismissed.", - "docsTags": [] - }, - { - "event": "ionAlertWillPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the alert has presented.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "keydown", - "target": "document", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--backdrop-opacity", - "annotation": "prop", - "docs": "Opacity of the backdrop" - }, - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the alert" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "Height of the alert" - }, - { - "name": "--max-height", - "annotation": "prop", - "docs": "Maximum height of the alert" - }, - { - "name": "--max-width", - "annotation": "prop", - "docs": "Maximum width of the alert" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the alert" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the alert" - }, - { - "name": "--width", - "annotation": "prop", - "docs": "Width of the alert" - } - ], - "slots": [], - "parts": [], - "dependents": [ - "ion-select" - ], - "dependencies": [ - "ion-ripple-effect", - "ion-backdrop" - ], - "dependencyGraph": { - "ion-alert": [ - "ion-ripple-effect", - "ion-backdrop" - ], - "ion-select": [ - "ion-alert" - ] - } - }, - { - "filePath": "./src/components/app/app.tsx", - "encapsulation": "none", - "tag": "ion-app", - "readme": "# ion-app\n\nApp is a container element for an Ionic application. There should only be one `` element per project. An app can have many Ionic components including menus, headers, content, and footers. The overlay components get appended to the `` when they are presented.\n", - "docs": "App is a container element for an Ionic application. There should only be one `` element per project. An app can have many Ionic components including menus, headers, content, and footers. The overlay components get appended to the `` when they are presented.", - "docsTags": [], - "usage": {}, - "props": [], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/avatar/avatar.tsx", - "encapsulation": "shadow", - "tag": "ion-avatar", - "readme": "# ion-avatar\n\nAvatars are circular components that usually wrap an image or icon. They can be used to represent a person or an object.\n\nAvatars can be used by themselves or inside of any element. If placed inside of an `ion-chip` or `ion-item`, the avatar will resize to fit the parent component. To position an avatar on the left or right side of an item, set the slot to `start` or `end`, respectively.\n\n", - "docs": "Avatars are circular components that usually wrap an image or icon. They can be used to represent a person or an object.\n\nAvatars can be used by themselves or inside of any element. If placed inside of an `ion-chip` or `ion-item`, the avatar will resize to fit the parent component. To position an avatar on the left or right side of an item, set the slot to `start` or `end`, respectively.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n\n\n\n \n \n \n Chip Avatar\n\n\n\n \n \n \n Item Avatar\n\n```", - "javascript": "```html\n\n \n\n\n\n \n \n \n Chip Avatar\n\n\n\n \n \n \n Item Avatar\n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonAvatar, IonChip, IonItem, IonLabel, IonContent } from '@ionic/react';\n\nexport const AvatarExample: React.FC = () => (\n \n \n \n \n\n \n \n \n \n Chip Avatar\n \n\n \n \n \n \n Item Avatar\n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'avatar-example',\n styleUrl: 'avatar-example.css'\n})\nexport class AvatarExample {\n render() {\n return [\n \n \n ,\n\n \n \n \n \n Chip Avatar\n ,\n\n \n \n \n \n Item Avatar\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the avatar and inner image" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/back-button/back-button.tsx", - "encapsulation": "shadow", - "tag": "ion-back-button", - "readme": "# ion-back-button\n\nThe back button navigates back in the app's history upon click. It is smart enough to know what to render based on the mode and when to show based on the navigation stack.\n\nTo change what is displayed in the back button, use the `text` and `icon` properties.\n\n", - "docs": "The back button navigates back in the app's history upon click. It is smart enough to know what to render based on the mode and when to show based on the navigation stack.\n\nTo change what is displayed in the back button, use the `text` and `icon` properties.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "native - The native HTML button element that wraps all child elements." - }, - { - "name": "part", - "text": "icon - The back button icon (uses ion-icon)." - }, - { - "name": "part", - "text": "text - The back button text." - } - ], - "usage": { - "angular": "```html\n\n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n\n\n\n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n\n```", - "javascript": "```html\n\n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonBackButton, IonHeader, IonToolbar, IonButtons, IonMenuButton, IonContent } from '@ionic/react';\n\nexport const BackButtonExample: React.FC = () => (\n \n {/*-- Default back button --*/}\n \n \n \n \n \n \n \n\n {/*-- Back button with a default href --*/}\n \n \n \n \n \n \n \n\n {/*-- Back button with custom text and icon --*/}\n \n \n \n \n \n \n \n\n {/*-- Back button with no text and custom icon --*/}\n \n \n \n \n \n \n \n\n {/*-- Danger back button next to a menu button --*/}\n \n \n \n \n \n \n \n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'back-button-example',\n styleUrl: 'back-button-example.css'\n})\nexport class BackButtonExample {\n render() {\n const buttonText = \"Custom\";\n const buttonIcon = \"add\";\n\n return [\n // Default back button\n \n \n \n \n \n \n ,\n\n // Back button with a default href\n \n \n \n \n \n \n ,\n\n // Back button with custom text and icon\n \n \n \n \n \n \n \n ,\n\n // Back button with no text and custom icon\n \n \n \n \n \n \n ,\n\n // Danger back button next to a menu button\n \n \n \n \n \n \n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "defaultHref", - "type": "string | undefined", - "mutable": true, - "attr": "default-href", - "reflectToAttr": false, - "docs": "The url to navigate back to by default when there is no history.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": true, - "docs": "If `true`, the user cannot interact with the button.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "icon", - "type": "null | string | undefined", - "mutable": false, - "attr": "icon", - "reflectToAttr": false, - "docs": "The built-in named SVG icon name or the exact `src` of an SVG file\nto use for the back button.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition animation when navigating to\nanother page.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "text", - "type": "null | string | undefined", - "mutable": false, - "attr": "text", - "reflectToAttr": false, - "docs": "The text to display in the back button.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the button" - }, - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background of the button when focused with the tab key" - }, - { - "name": "--background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the button background when focused with the tab key" - }, - { - "name": "--background-hover", - "annotation": "prop", - "docs": "Background of the button on hover" - }, - { - "name": "--background-hover-opacity", - "annotation": "prop", - "docs": "Opacity of the background on hover" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the button" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Text color of the button" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Text color of the button when focused with the tab key" - }, - { - "name": "--color-hover", - "annotation": "prop", - "docs": "Text color of the button on hover" - }, - { - "name": "--icon-font-size", - "annotation": "prop", - "docs": "Font size of the button icon" - }, - { - "name": "--icon-font-weight", - "annotation": "prop", - "docs": "Font weight of the button icon" - }, - { - "name": "--icon-margin-bottom", - "annotation": "prop", - "docs": "Bottom margin of the button icon" - }, - { - "name": "--icon-margin-end", - "annotation": "prop", - "docs": "Right margin if direction is left-to-right, and left margin if direction is right-to-left of the button icon" - }, - { - "name": "--icon-margin-start", - "annotation": "prop", - "docs": "Left margin if direction is left-to-right, and right margin if direction is right-to-left of the button icon" - }, - { - "name": "--icon-margin-top", - "annotation": "prop", - "docs": "Top margin of the button icon" - }, - { - "name": "--icon-padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the button icon" - }, - { - "name": "--icon-padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button icon" - }, - { - "name": "--icon-padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button icon" - }, - { - "name": "--icon-padding-top", - "annotation": "prop", - "docs": "Top padding of the button icon" - }, - { - "name": "--margin-bottom", - "annotation": "prop", - "docs": "Bottom margin of the button" - }, - { - "name": "--margin-end", - "annotation": "prop", - "docs": "Right margin if direction is left-to-right, and left margin if direction is right-to-left of the button" - }, - { - "name": "--margin-start", - "annotation": "prop", - "docs": "Left margin if direction is left-to-right, and right margin if direction is right-to-left of the button" - }, - { - "name": "--margin-top", - "annotation": "prop", - "docs": "Top margin of the button" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the button" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the button" - }, - { - "name": "--opacity", - "annotation": "prop", - "docs": "Opacity of the button" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the button" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the button" - }, - { - "name": "--ripple-color", - "annotation": "prop", - "docs": "Color of the button ripple effect" - }, - { - "name": "--transition", - "annotation": "prop", - "docs": "Transition of the button" - } - ], - "slots": [], - "parts": [ - { - "name": "icon", - "docs": "The back button icon (uses ion-icon)." - }, - { - "name": "native", - "docs": "The native HTML button element that wraps all child elements." - }, - { - "name": "text", - "docs": "The back button text." - } - ], - "dependents": [], - "dependencies": [ - "ion-icon", - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-back-button": [ - "ion-icon", - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/backdrop/backdrop.tsx", - "encapsulation": "shadow", - "tag": "ion-backdrop", - "readme": "# ion-backdrop\n\nBackdrops are full screen components that overlay other components. They are useful behind components that transition in on top of other content and can be used to dismiss that component.\n\n", - "docs": "Backdrops are full screen components that overlay other components. They are useful behind components that transition in on top of other content and can be used to dismiss that component.", - "docsTags": [], - "usage": { - "angular": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'backdrop-example',\n templateUrl: 'backdrop-example.html',\n styleUrls: ['./backdrop-example.css'],\n})\nexport class BackdropExample {\n enableBackdropDismiss = false;\n showBackdrop = false;\n shouldPropagate = false;\n}\n```\n", - "javascript": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n```\n\n```javascript\nvar backdrop = document.getElementById('customBackdrop');\nbackdrop.visible = false;\nbackdrop.tappable = false;\nbackdrop.stopPropagation = false;\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonBackdrop, IonContent } from '@ionic/react';\n\nexport const BackdropExample: React.FC = () => (\n \n {/*-- Default backdrop --*/}\n \n\n {/*-- Backdrop that is not tappable --*/}\n \n\n {/*-- Backdrop that is not visible --*/}\n \n\n {/*-- Backdrop with propagation --*/}\n \n\n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'backdrop-example',\n styleUrl: 'backdrop-example.css'\n})\nexport class BackdropExample {\n render() {\n const enableBackdropDismiss = false;\n const showBackdrop = false;\n const shouldPropagate = false;\n\n return [\n // Default backdrop\n ,\n\n // Backdrop that is not tappable\n ,\n\n // Backdrop that is not visible\n ,\n\n // Backdrop with propagation\n ,\n\n // Backdrop that sets dynamic properties\n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "stopPropagation", - "type": "boolean", - "mutable": false, - "attr": "stop-propagation", - "reflectToAttr": false, - "docs": "If `true`, the backdrop will stop propagation on tap.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "tappable", - "type": "boolean", - "mutable": false, - "attr": "tappable", - "reflectToAttr": false, - "docs": "If `true`, the backdrop will can be clicked and will emit the `ionBackdropTap` event.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "visible", - "type": "boolean", - "mutable": false, - "attr": "visible", - "reflectToAttr": false, - "docs": "If `true`, the backdrop will be visible.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionBackdropTap", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the backdrop is tapped.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "click", - "capture": true, - "passive": false - } - ], - "styles": [], - "slots": [], - "parts": [], - "dependents": [ - "ion-action-sheet", - "ion-alert", - "ion-loading", - "ion-menu", - "ion-modal", - "ion-picker", - "ion-popover" - ], - "dependencies": [], - "dependencyGraph": { - "ion-action-sheet": [ - "ion-backdrop" - ], - "ion-alert": [ - "ion-backdrop" - ], - "ion-loading": [ - "ion-backdrop" - ], - "ion-menu": [ - "ion-backdrop" - ], - "ion-modal": [ - "ion-backdrop" - ], - "ion-picker": [ - "ion-backdrop" - ], - "ion-popover": [ - "ion-backdrop" - ] - } - }, - { - "filePath": "./src/components/badge/badge.tsx", - "encapsulation": "shadow", - "tag": "ion-badge", - "readme": "# ion-badge\n\nBadges are inline block elements that usually appear near another element. Typically they contain a number or other characters. They can be used as a notification that there are additional items associated with an element and indicate how many items there are.\n\n", - "docs": "Badges are inline block elements that usually appear near another element. Typically they contain a number or other characters. They can be used as a notification that there are additional items associated with an element and indicate how many items there are.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n99\n\n\n11\n22\n33\n44\n55\n66\n77\n88\n99\n\n\n\n 11\n My Item\n 22\n\n```", - "javascript": "```html\n\n99\n\n\n11\n22\n33\n44\n55\n66\n77\n88\n99\n\n\n\n 11\n My Item\n 22\n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonBadge, IonItem, IonLabel, IonContent } from '@ionic/react';\n\nexport const BadgeExample: React.FC = () => (\n \n {/*-- Default --*/}\n 99\n\n {/*-- Colors --*/}\n 11\n 22\n 33\n 44\n 55\n 66\n 77\n 88\n 99\n\n {/*-- Item with badge on left and right --*/}\n \n 11\n My Item\n 22\n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'badge-example',\n styleUrl: 'badge-example.css'\n})\nexport class BadgeExample {\n render() {\n return [\n // Default\n 99,\n\n // Colors\n 11,\n 22,\n 33,\n 44,\n 55,\n 66,\n 77,\n 88,\n 99,\n\n // Item with badge on left and right\n \n 11\n My Item\n 22\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the badge" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Text color of the badge" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the badge" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the badge" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the badge" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the badge" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/breadcrumb/breadcrumb.tsx", - "encapsulation": "shadow", - "tag": "ion-breadcrumb", - "readme": "# ion-breadcrumb\n\nA Breadcrumb is a single navigation item that is a child of the Breadcrumbs component. A breadcrumb can link elsewhere in an app or it can be plain text. Each breadcrumb has a separator between it and the next breadcrumb and can optionally contain an icon.\n\n## Interfaces\n\n### BreadcrumbCollapsedClickEventDetail\n\n```typescript\ninterface BreadcrumbCollapsedClickEventDetail {\n collapsedBreadcrumbs?: HTMLIonBreadcrumbElement[];\n}\n```\n\n### BreadcrumbCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing .\n\n```typescript\ninterface BreadcrumbCustomEvent extends CustomEvent {\n detail: BreadcrumbCollapsedClickEventDetail;\n target: HTMLIonBreadcrumbElement;\n}\n```\n\n", - "docs": "A Breadcrumb is a single navigation item that is a child of the Breadcrumbs component. A breadcrumb can link elsewhere in an app or it can be plain text. Each breadcrumb has a separator between it and the next breadcrumb and can optionally contain an icon.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "native - The native HTML anchor or div element that wraps all child elements." - }, - { - "name": "part", - "text": "separator - The separator element between each breadcrumb." - }, - { - "name": "part", - "text": "collapsed-indicator - The indicator element that shows the breadcrumbs are collapsed." - } - ], - "usage": {}, - "props": [ - { - "name": "active", - "type": "boolean", - "mutable": false, - "attr": "active", - "reflectToAttr": false, - "docs": "If `true`, the breadcrumb will take on a different look to show that\nit is the currently active breadcrumb. Defaults to `true` for the\nlast breadcrumb if it is not set on any.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": false, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the breadcrumb.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "download", - "type": "string | undefined", - "mutable": false, - "attr": "download", - "reflectToAttr": false, - "docs": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition animation when navigating to\nanother page using `href`.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerDirection", - "type": "\"back\" | \"forward\" | \"root\"", - "mutable": false, - "attr": "router-direction", - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition direction when navigating to\nanother page using `href`.", - "docsTags": [], - "default": "'forward'", - "values": [ - { - "value": "back", - "type": "string" - }, - { - "value": "forward", - "type": "string" - }, - { - "value": "root", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "separator", - "type": "boolean | undefined", - "mutable": false, - "attr": "separator", - "reflectToAttr": false, - "docs": "If true, show a separator between this breadcrumb and the next.\nDefaults to `true` for all breadcrumbs except the last.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the breadcrumb loses focus.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the breadcrumb has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background color of the breadcrumb when focused" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Text color of the breadcrumb" - }, - { - "name": "--color-active", - "annotation": "prop", - "docs": "Text color of the active breadcrumb" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Text color of the breadcrumb when focused" - }, - { - "name": "--color-hover", - "annotation": "prop", - "docs": "Text color of the breadcrumb on hover" - } - ], - "slots": [], - "parts": [ - { - "name": "collapsed-indicator", - "docs": "The indicator element that shows the breadcrumbs are collapsed." - }, - { - "name": "native", - "docs": "The native HTML anchor or div element that wraps all child elements." - }, - { - "name": "separator", - "docs": "The separator element between each breadcrumb." - } - ], - "dependents": [], - "dependencies": [ - "ion-icon" - ], - "dependencyGraph": { - "ion-breadcrumb": [ - "ion-icon" - ] - } - }, - { - "filePath": "./src/components/breadcrumbs/breadcrumbs.tsx", - "encapsulation": "shadow", - "tag": "ion-breadcrumbs", - "readme": "# ion-breadcrumbs\n\nBreadcrumbs are navigation items that are used to indicate where a user is on an app or site. They should be used for large sites and apps with hierarchically arranged pages. Breadcrumbs can be collapsed based on the maximum number that can show, and the collapsed indicator can be clicked on to present a popover with more information or expand the collapsed breadcrumbs.\n\n", - "docs": "Breadcrumbs are navigation items that are used to indicate where a user is on an app or site. They should be used for large sites and apps with hierarchically arranged pages. Breadcrumbs can be collapsed based on the maximum number that can show, and the collapsed indicator can be clicked on to present a popover with more information or expand the collapsed breadcrumbs.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "### Default\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Colors\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Breadcrumbs with Icon\n\n```html\n\n\n \n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n\n\n\n\n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n \n\n```\n\n### Custom Separator\n\n```html\n\n\n \n Home\n |\n \n \n Electronics\n |\n \n \n Photography\n |\n \n \n Cameras\n |\n \n \n Film\n |\n \n \n 35 mm\n \n\n\n\n\n \n Home\n \n \n \n Electronics\n \n \n \n Photography\n \n \n \n Cameras\n \n \n \n Film\n \n \n \n 35 mm\n \n\n```\n\n### Max Items\n\n```html\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Items Before or After Collapse\n\n```html\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Expand on Collapsed Indicator Click\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'breadcrumbs-example',\n templateUrl: 'breadcrumbs-example.html',\n styleUrls: ['./breadcrumbs-example.css'],\n})\nexport class BreadcrumbsExample {\n maxBreadcrumbs = 4;\n\n expandBreadcrumbs() {\n this.maxBreadcrumbs = undefined;\n }\n}\n```\n\n### Popover on Collapsed Indicator Click\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\nimport { PopoverController } from '@ionic/angular';\nimport { PopoverComponent } from '../popover/popover.component';\n\n@Component({\n selector: 'breadcrumbs-example',\n templateUrl: 'breadcrumbs-example.html',\n styleUrls: ['./breadcrumbs-example.css']\n})\nexport class BreadcrumbsExample {\n constructor(public popoverController: PopoverController) {}\n\n async presentPopover(ev: any) {\n const popover = await this.popoverController.create({\n component: PopoverComponent,\n componentProps: {\n collapsedBreadcrumbs: ev.detail.collapsedBreadcrumbs\n },\n event: ev\n });\n await popover.present();\n }\n}\n```\n\n```html\n\n \n \n {{ breadcrumb.textContent }}\n \n \n\n```\n```typescript\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'popover-component',\n})\nexport class PopoverComponent {\n @Input() collapsedBreadcrumbs: HTMLElement[] = [];\n\n constructor() {}\n\n}\n```\n", - "javascript": "### Default\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Colors\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Breadcrumbs with Icon\n\n```html\n\n\n \n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n\n\n\n\n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n \n\n```\n\n### Custom Separator\n\n```html\n\n\n \n Home\n |\n \n \n Electronics\n |\n \n \n Photography\n |\n \n \n Cameras\n |\n \n \n Film\n |\n \n \n 35 mm\n \n\n\n\n\n \n Home\n \n \n \n Electronics\n \n \n \n Photography\n \n \n \n Cameras\n \n \n \n Film\n \n \n \n 35 mm\n \n\n```\n\n### Max Items\n\n```html\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Items Before or After Collapse\n\n```html\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n\n\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n### Expand on Collapsed Indicator Click\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n```javascript\nconst breadcrumbs = document.querySelector('ion-breadcrumbs');\n\nbreadcrumbs.addEventListener('ionCollapsedClick', () => expandBreadcrumbs());\n\nfunction expandBreadcrumbs() {\n breadcrumbs.maxItems = undefined;\n}\n```\n\n### Popover on Collapsed Indicator Click\n\n```html\n\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n\n```\n\n```javascript\nconst breadcrumbs = document.querySelector('ion-breadcrumbs');\n\nbreadcrumbs.addEventListener('ionCollapsedClick', (ev) => presentPopover(ev));\n\nclass ListPopover extends HTMLElement {\n constructor() {\n super();\n }\n\n connectedCallback() {\n let breadcrumbTemplate = ``;\n this.collapsedBreadcrumbs.forEach(breadcrumb => {\n breadcrumbTemplate += `\n \n ${breadcrumb.textContent}\n \n `;\n })\n this.innerHTML = `\n \n \n ${breadcrumbTemplate}\n \n \n `;\n }\n}\n\ncustomElements.define('list-popover', ListPopover);\n\nasync function presentPopover(ev) {\n const popover = Object.assign(document.createElement('ion-popover'), {\n component: 'list-popover',\n componentProps: {\n collapsedBreadcrumbs: ev.detail.collapsedBreadcrumbs\n },\n event: ev\n });\n document.body.appendChild(popover);\n\n await popover.present();\n}\n```\n", - "react": "### Default\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs } from '@ionic/react';\n\nexport const BreadcrumbsExample: React.FC = () => (\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n);\n```\n\n### Colors\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs } from '@ionic/react';\n\nexport const BreadcrumbsExample: React.FC = () => (\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n);\n```\n\n### Breadcrumbs with Icon\n\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs, IonIcon } from '@ionic/react';\nimport { document, folder, home } from 'ionicons/icons';\n\nexport const BreadcrumbsExample: React.FC = () => (\n {/*-- Icon start --*/}\n \n \n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n ,\n\n {/*-- Icon end --*/}\n \n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n \n \n);\n```\n\n### Custom Separator\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs, IonIcon } from '@ionic/react';\nimport { arrowForward } from 'ionicons/icons';\n\nexport const BreadcrumbsExample: React.FC = () => (\n {/*-- Custom separator text --*/}\n \n \n Home\n |\n \n \n Electronics\n |\n \n \n Photography\n |\n \n \n Cameras\n |\n \n \n Film\n |\n \n \n 35 mm\n \n ,\n\n {/*-- Custom separator icon --*/}\n \n \n Home\n \n \n \n Electronics\n \n \n \n Photography\n \n \n \n Cameras\n \n \n \n Film\n \n \n \n 35 mm\n \n \n);\n```\n\n### Max Items\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs } from '@ionic/react';\n\nexport const BreadcrumbsExample: React.FC = () => (\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n);\n```\n\n\n### Items Before or After Collapse\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs } from '@ionic/react';\n\nexport const BreadcrumbsExample: React.FC = () => (\n {/*-- Items before collapse --*/}\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n ,\n\n {/*-- Items after collapse --*/}\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n ,\n\n {/*-- Items before and after collapse --*/}\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n);\n```\n\n### Expand on Collapsed Indicator Click\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs } from '@ionic/react';\n\nexport const BreadcrumbsExample: React.FC = () => {\n const [maxBreadcrumbs, setMaxBreadcrumbs] = useState(4);\n\n const expandBreadcrumbs = () => {\n setMaxBreadcrumbs(undefined);\n }\n\n return (\n expandBreadcrumbs()}>\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n );\n};\n```\n\n### Popover on Collapsed Indicator Click\n\n```tsx\nimport React from 'react';\nimport { IonBreadcrumb, IonBreadcrumbs, IonContent, IonItem, IonLabel, IonList, useIonPopover } from '@ionic/react';\n\nconst PopoverList: React.FC<{\n onHide: () => void;\n collapsedBreadcrumbs: HTMLElement[]\n}> = ({ onHide, collapsedBreadcrumbs }) => (\n \n \n {collapsedBreadcrumbs.map(breadcrumb => (\n \n {breadcrumb.textContent}\n \n ))}\n \n \n);\n\nexport const BreadcrumbsExample: React.FC = () => {\n const [present, dismiss] = useIonPopover(PopoverList, { onHide: () => dismiss() });\n\n return (\n present({ event: e.nativeEvent })}>\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n );\n};\n```\n", - "stencil": "### Default\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n render() {\n return [\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n ];\n }\n}\n```\n\n### Colors\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n render() {\n return [\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n ];\n }\n}\n```\n\n### Breadcrumbs with Icon\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n render() {\n return [\n // Icon start\n \n \n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n ,\n\n // Icon end\n \n \n Home\n \n \n \n Files\n \n \n \n Projects\n \n \n \n User Research\n \n \n \n Survey.txt\n \n \n \n ];\n }\n}\n```\n\n### Custom Separator\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n render() {\n return [\n // Custom separator text\n \n \n Home\n |\n \n \n Electronics\n |\n \n \n Photography\n |\n \n \n Cameras\n |\n \n \n Film\n |\n \n \n 35 mm\n \n ,\n\n // Custom separator icon\n \n \n Home\n \n \n \n Electronics\n \n \n \n Photography\n \n \n \n Cameras\n \n \n \n Film\n \n \n \n 35 mm\n \n \n ];\n }\n}\n```\n\n### Max Items\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n render() {\n return [\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n ];\n }\n}\n```\n\n\n\n### Items Before or After Collapse\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n render() {\n return [\n // Items before collapse\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n ,\n\n // Items after collapse\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n ,\n\n // Items before and after collapse\n \n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n ];\n }\n}\n```\n\n### Expand on Collapsed Indicator Click\n\n```tsx\nimport { Component, State, h } from '@stencil/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n @State() maxBreadcrumbs = 4;\n\n expandBreadcrumbs() {\n maxBreadcrumbs = undefined;\n }\n\n render() {\n const { maxBreadcrumbs } = this;\n\n return [\n this.expandBreadcrumbs()}>\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n ];\n }\n}\n```\n\n### Popover on Collapsed Indicator Click\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\nimport { popoverController } from '@ionic/core';\n\n@Component({\n tag: 'breadcrumbs-example',\n styleUrl: 'breadcrumbs-example.css'\n})\nexport class BreadcrumbsExample {\n async presentPopover(ev: any) {\n const popover = await popoverController.create({\n component: 'list-popover',\n componentProps: {\n collapsedBreadcrumbs: ev.detail.collapsedBreadcrumbs\n },\n event: ev\n });\n await popover.present();\n }\n\n render() {\n return [\n this.presentPopover(ev)}>\n \n Home\n \n \n Electronics\n \n \n Photography\n \n \n Cameras\n \n \n Film\n \n \n 35 mm\n \n \n ];\n }\n}\n```\n\n```tsx\nimport { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'list-popover',\n styleUrl: 'list-popover.css',\n})\nexport class ListPopover {\n @Prop() collapsedBreadcrumbs: HTMLElement[] = [];\n\n render() {\n return [\n \n \n {this.collapsedBreadcrumbs.map(breadcrumb => (\n \n {breadcrumb.textContent}\n \n ))}\n \n \n ];\n }\n}\n```\n", - "vue": "### Default\n\n```html\n\n\n\n```\n\n### Colors\n\n```html\n\n\n\n```\n\n### Breadcrumbs with Icon\n\n```html\n\n\n\n```\n\n### Custom Separator\n\n```html\n\n\n\n```\n\n### Max Items\n\n```html\n\n\n\n```\n\n### Items Before or After Collapse\n\n```html\n\n\n\n```\n\n### Expand on Collapsed Indicator Click\n\n```html\n\n\n\n```\n\n\n### Popover on Collapsed Indicator Click\n\n```html\n\n\n\n```\n\n```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": false, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "itemsAfterCollapse", - "type": "number", - "mutable": false, - "attr": "items-after-collapse", - "reflectToAttr": false, - "docs": "The number of breadcrumbs to show after the collapsed indicator.\nIf this property exists `maxItems` will be ignored.", - "docsTags": [], - "default": "1", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "itemsBeforeCollapse", - "type": "number", - "mutable": false, - "attr": "items-before-collapse", - "reflectToAttr": false, - "docs": "The number of breadcrumbs to show before the collapsed indicator.\nIf this property exists `maxItems` will be ignored.", - "docsTags": [], - "default": "1", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "maxItems", - "type": "number | undefined", - "mutable": false, - "attr": "max-items", - "reflectToAttr": false, - "docs": "The maximum number of breadcrumbs to show before collapsing.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionCollapsedClick", - "detail": "BreadcrumbCollapsedClickEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the collapsed indicator is clicked on.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "collapsedClick", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the breadcrumbs" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Text color of the breadcrumbs" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/button/button.tsx", - "encapsulation": "shadow", - "tag": "ion-button", - "readme": "# ion-button\n\nButtons provide a clickable element, which can be used in forms, or anywhere that needs simple, standard button functionality. They may display text, icons, or both. Buttons can be styled with several attributes to look a specific way.\n\n## Expand\n\nThis attribute lets you specify how wide the button should be. By default, buttons are inline blocks, but setting this attribute will change the button to a full-width block element.\n\n| Value | Details |\n|----------------|------------------------------------------------------------------------------|\n| `block` | Full-width button with rounded corners. |\n| `full` | Full-width button with square corners and no border on the left or right. |\n\n## Fill\n\nThis attribute determines the background and border color of the button. By default, buttons have a solid background unless the button is inside of a toolbar, in which case it has a transparent background.\n\n| Value | Details |\n|----------------|------------------------------------------------------------------------------|\n| `clear` | Button with a transparent background that resembles a flat button. |\n| `outline` | Button with a transparent background and a visible border. |\n| `solid` | Button with a filled background. Useful for buttons in a toolbar. |\n\n## Size\n\nThis attribute specifies the size of the button. Setting this attribute will change the height and padding of a button.\n\n| Value | Details |\n|----------------|------------------------------------------------------------------------------|\n| `small` | Button with less height and padding. Default for buttons in an item. |\n| `default` | Button with the default height and padding. Useful for buttons in an item. |\n| `large` | Button with more height and padding. |\n\n", - "docs": "Buttons provide a clickable element, which can be used in forms, or anywhere that needs simple, standard button functionality. They may display text, icons, or both. Buttons can be styled with several attributes to look a specific way.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "- Content is placed between the named slots if provided without a slot." - }, - { - "name": "slot", - "text": "icon-only - Should be used on an icon in a button that has no text." - }, - { - "name": "slot", - "text": "start - Content is placed to the left of the button text in LTR, and to the right in RTL." - }, - { - "name": "slot", - "text": "end - Content is placed to the right of the button text in LTR, and to the left in RTL." - }, - { - "name": "part", - "text": "native - The native HTML button or anchor element that wraps all child elements." - } - ], - "usage": { - "angular": "\n```html\n\nDefault\n\n\nAnchor\n\n\nPrimary\nSecondary\nTertiary\nSuccess\nWarning\nDanger\nLight\nMedium\nDark\n\n\nFull Button\nBlock Button\n\n\nRound Button\n\n\nOutline + Full\nOutline + Block\nOutline + Round\n\n\n\n \n Left Icon\n\n\n\n Right Icon\n \n\n\n\n \n\n\n\nLarge\nDefault\nSmall\n```\n", - "javascript": "\n```html\n\nDefault\n\n\nAnchor\n\n\nPrimary\nSecondary\nTertiary\nSuccess\nWarning\nDanger\nLight\nMedium\nDark\n\n\nFull Button\nBlock Button\n\n\nRound Button\n\n\nOutline + Full\nOutline + Block\nOutline + Round\n\n\n\n \n Left Icon\n\n\n\n Right Icon\n \n\n\n\n \n\n\n\nLarge\nDefault\nSmall\n```\n", - "react": "```tsx\nimport React from 'react';\n\nimport { IonButton, IonIcon, IonContent } from '@ionic/react';\nimport { star } from 'ionicons/icons';\n\nexport const ButtonExample: React.FC = () => (\n \n {/*-- Default --*/}\n Default\n\n {/*-- Anchor --*/}\n Anchor\n\n {/*-- Colors --*/}\n Primary\n Secondary\n Tertiary\n Success\n Warning\n Danger\n Light\n Medium\n Dark\n\n {/*-- Expand --*/}\n Full Button\n Block Button\n\n {/*-- Round --*/}\n Round Button\n\n {/*-- Fill --*/}\n Outline + Full\n Outline + Block\n Outline + Round\n\n {/*-- Icons --*/}\n \n \n Left Icon\n \n\n \n Right Icon\n \n \n\n \n \n \n\n {/*-- Sizes --*/}\n Large\n Default\n Small\n \n);\n\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'button-example',\n styleUrl: 'button-example.css'\n})\nexport class ButtonExample {\n render() {\n return [\n // Default\n Default,\n\n // Anchor\n Anchor,\n\n // Colors\n Primary,\n Secondary,\n Tertiary,\n Success,\n Warning,\n Danger,\n Light,\n Medium,\n Dark,\n\n // Expand\n Full Button,\n Block Button,\n\n // Round\n Round Button,\n\n // Fill\n Outline + Full,\n Outline + Block,\n Outline + Round,\n\n // Icons\n \n \n Left Icon\n ,\n\n \n Right Icon\n \n ,\n\n \n \n ,\n\n // Sizes\n Large,\n Default,\n Small\n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "buttonType", - "type": "string", - "mutable": true, - "attr": "button-type", - "reflectToAttr": false, - "docs": "The type of button.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": true, - "docs": "If `true`, the user cannot interact with the button.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "download", - "type": "string | undefined", - "mutable": false, - "attr": "download", - "reflectToAttr": false, - "docs": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "expand", - "type": "\"block\" | \"full\" | undefined", - "mutable": false, - "attr": "expand", - "reflectToAttr": true, - "docs": "Set to `\"block\"` for a full-width button or to `\"full\"` for a full-width button\nwithout left and right borders.", - "docsTags": [], - "values": [ - { - "value": "block", - "type": "string" - }, - { - "value": "full", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "fill", - "type": "\"clear\" | \"default\" | \"outline\" | \"solid\" | undefined", - "mutable": true, - "attr": "fill", - "reflectToAttr": true, - "docs": "Set to `\"clear\"` for a transparent button, to `\"outline\"` for a transparent\nbutton with a border, or to `\"solid\"`. The default style is `\"solid\"` except inside of\na toolbar, where the default is `\"clear\"`.", - "docsTags": [], - "values": [ - { - "value": "clear", - "type": "string" - }, - { - "value": "default", - "type": "string" - }, - { - "value": "outline", - "type": "string" - }, - { - "value": "solid", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition animation when navigating to\nanother page using `href`.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerDirection", - "type": "\"back\" | \"forward\" | \"root\"", - "mutable": false, - "attr": "router-direction", - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition direction when navigating to\nanother page using `href`.", - "docsTags": [], - "default": "'forward'", - "values": [ - { - "value": "back", - "type": "string" - }, - { - "value": "forward", - "type": "string" - }, - { - "value": "root", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "shape", - "type": "\"round\" | undefined", - "mutable": false, - "attr": "shape", - "reflectToAttr": true, - "docs": "The button shape.", - "docsTags": [], - "values": [ - { - "value": "round", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "size", - "type": "\"default\" | \"large\" | \"small\" | undefined", - "mutable": false, - "attr": "size", - "reflectToAttr": true, - "docs": "The button size.", - "docsTags": [], - "values": [ - { - "value": "default", - "type": "string" - }, - { - "value": "large", - "type": "string" - }, - { - "value": "small", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "strong", - "type": "boolean", - "mutable": false, - "attr": "strong", - "reflectToAttr": false, - "docs": "If `true`, activates a button with a heavier font weight.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the button loses focus.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the button has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the button" - }, - { - "name": "--background-activated", - "annotation": "prop", - "docs": "Background of the button when pressed. Note: setting this will interfere with the Material Design ripple." - }, - { - "name": "--background-activated-opacity", - "annotation": "prop", - "docs": "Opacity of the button when pressed" - }, - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background of the button when focused with the tab key" - }, - { - "name": "--background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the button when focused with the tab key" - }, - { - "name": "--background-hover", - "annotation": "prop", - "docs": "Background of the button on hover" - }, - { - "name": "--background-hover-opacity", - "annotation": "prop", - "docs": "Opacity of the background on hover" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Border color of the button" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the button" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Border style of the button" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Border width of the button" - }, - { - "name": "--box-shadow", - "annotation": "prop", - "docs": "Box shadow of the button" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Text color of the button" - }, - { - "name": "--color-activated", - "annotation": "prop", - "docs": "Text color of the button when pressed" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Text color of the button when focused with the tab key" - }, - { - "name": "--color-hover", - "annotation": "prop", - "docs": "Text color of the button when hover" - }, - { - "name": "--opacity", - "annotation": "prop", - "docs": "Opacity of the button" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the button" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the button" - }, - { - "name": "--ripple-color", - "annotation": "prop", - "docs": "Color of the button ripple effect" - }, - { - "name": "--transition", - "annotation": "prop", - "docs": "Transition of the button" - } - ], - "slots": [ - { - "name": "", - "docs": "Content is placed between the named slots if provided without a slot." - }, - { - "name": "end", - "docs": "Content is placed to the right of the button text in LTR, and to the left in RTL." - }, - { - "name": "icon-only", - "docs": "Should be used on an icon in a button that has no text." - }, - { - "name": "start", - "docs": "Content is placed to the left of the button text in LTR, and to the right in RTL." - } - ], - "parts": [ - { - "name": "native", - "docs": "The native HTML button or anchor element that wraps all child elements." - } - ], - "dependents": [ - "ion-datetime" - ], - "dependencies": [ - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-button": [ - "ion-ripple-effect" - ], - "ion-datetime": [ - "ion-button" - ] - } - }, - { - "filePath": "./src/components/buttons/buttons.tsx", - "encapsulation": "scoped", - "tag": "ion-buttons", - "readme": "# ion-buttons\n\nThe Buttons component is a container element. Buttons placed in a toolbar should be placed inside of the `` element.\n\nThe `` element can be positioned inside of the toolbar using a named slot. The below chart has a description of each slot.\n\n| Slot | Description |\n|--------------|----------------------------------------------------------------------------------------------------------|\n| `secondary` | Positions element to the `left` of the content in `ios` mode, and directly to the `right` in `md` mode. |\n| `primary` | Positions element to the `right` of the content in `ios` mode, and to the far `right` in `md` mode. |\n| `start` | Positions to the `left` of the content in LTR, and to the `right` in RTL. |\n| `end` | Positions to the `right` of the content in LTR, and to the `left` in RTL. |\n\n", - "docs": "The Buttons component is a container element. Buttons placed in a toolbar should be placed inside of the `` element.\n\nThe `` element can be positioned inside of the toolbar using a named slot. The below chart has a description of each slot.\n\n| Slot | Description |\n|--------------|----------------------------------------------------------------------------------------------------------|\n| `secondary` | Positions element to the `left` of the content in `ios` mode, and directly to the `right` in `md` mode. |\n| `primary` | Positions element to the `right` of the content in `ios` mode, and to the far `right` in `md` mode. |\n| `start` | Positions to the `left` of the content in LTR, and to the `right` in RTL. |\n| `end` | Positions to the `right` of the content in LTR, and to the `left` in RTL. |", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n \n \n Back Button\n\n\n\n \n \n \n \n \n \n \n \n Default Buttons\n \n \n \n \n \n\n\n\n \n \n \n \n \n Right side menu toggle\n \n \n \n\n\n\n \n \n \n \n \n Collapsible Buttons\n\n```", - "javascript": "```html\n\n \n \n \n Back Button\n\n\n\n \n \n \n \n \n \n \n \n Default Buttons\n \n \n \n \n \n\n\n\n \n \n \n \n \n Right side menu toggle\n \n \n \n \n \n \n \n\n\n\n \n \n \n \n \n Collapsible Buttons\n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonButtons, IonToolbar, IonBackButton, IonTitle, IonButton, IonIcon, IonMenuButton, IonContent } from '@ionic/react';\nimport { personCircle, search, star, ellipsisHorizontal, ellipsisVertical } from 'ionicons/icons';\n\nexport const ButtonsExample: React.FC = () => (\n \n \n \n \n \n Back Button\n \n\n \n \n \n \n \n \n \n \n \n Default Buttons\n \n \n \n \n \n \n\n \n \n {}}>\n \n \n \n Right side menu toggle\n \n \n \n \n\n \n \n \n \n \n \n Collapsible Buttons\n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'buttons-example',\n styleUrl: 'buttons-example.css'\n})\nexport class ButtonsExample {\n\n clickedStar() {\n console.log(\"Clicked star button\");\n }\n\n render() {\n return [\n \n \n \n \n Back Button\n ,\n\n \n \n \n \n \n \n \n \n \n Default Buttons\n \n \n \n \n \n ,\n\n \n \n this.clickedStar()}>\n \n \n \n Right side menu toggle\n \n \n \n ,\n\n \n \n \n \n \n \n Collapsible Buttons\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "collapse", - "type": "boolean", - "mutable": false, - "attr": "collapse", - "reflectToAttr": false, - "docs": "If true, buttons will disappear when its\nparent toolbar has fully collapsed if the toolbar\nis not the first toolbar. If the toolbar is the\nfirst toolbar, the buttons will be hidden and will\nonly be shown once all toolbars have fully collapsed.\n\nOnly applies in `ios` mode with `collapse` set to\n`true` on `ion-header`.\n\nTypically used for [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles)", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [ - "ion-datetime" - ], - "dependencies": [], - "dependencyGraph": { - "ion-datetime": [ - "ion-buttons" - ] - } - }, - { - "filePath": "./src/components/card/card.tsx", - "encapsulation": "shadow", - "tag": "ion-card", - "readme": "# ion-card\n\nCards are a standard piece of UI that serves as an entry point to more detailed\ninformation. A card can be a single component, but is often made up of some\nheader, title, subtitle, and content. `ion-card` is broken up into several\nsub-components to reflect this. Please see `ion-card-content`,\n`ion-card-header`, `ion-card-title`, `ion-card-subtitle`.\n", - "docs": "Cards are a standard piece of UI that serves as an entry point to more detailed\ninformation. A card can be a single component, but is often made up of some\nheader, title, subtitle, and content. `ion-card` is broken up into several\nsub-components to reflect this. Please see `ion-card-content`,\n`ion-card-header`, `ion-card-title`, `ion-card-subtitle`.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "native - The native HTML button, anchor, or div element that wraps all child elements." - } - ], - "usage": { - "angular": "```html\n\n \n Card Subtitle\n Card Title\n \n\n \n Keep close to Nature's heart... and break clear away, once in awhile,\n and climb a mountain or spend a week in the woods. Wash your spirit clean.\n \n\n\n\n \n \n ion-item in a card, icon left, button right\n View\n \n\n \n This is content, without any paragraph or header tags,\n within an ion-card-content element.\n \n\n\n\n \n \n Card Link Item 1 activated\n \n\n \n \n Card Link Item 2\n \n\n \n \n Card Button Item 1 activated\n \n\n \n \n Card Button Item 2\n \n\n```", - "javascript": "```html\n\n \n Card Subtitle\n Card Title\n \n\n \n Keep close to Nature's heart... and break clear away, once in awhile,\n and climb a mountain or spend a week in the woods. Wash your spirit clean.\n \n\n\n\n \n \n ion-item in a card, icon left, button right\n View\n \n\n \n This is content, without any paragraph or header tags,\n within an ion-card-content element.\n \n\n\n\n \n \n Card Link Item 1 activated\n \n\n \n \n Card Link Item 2\n \n\n \n \n Card Button Item 1 activated\n \n\n \n \n Card Button Item 2\n \n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonCard, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCardContent, IonItem, IonIcon, IonLabel, IonButton } from '@ionic/react';\nimport { pin, wifi, wine, warning, walk } from 'ionicons/icons';\n\nexport const CardExamples: React.FC = () => {\n return (\n \n \n \n CardExamples\n \n \n \n \n \n Card Subtitle\n Card Title\n \n\n \n Keep close to Nature's heart... and break clear away, once in awhile,\n and climb a mountain or spend a week in the woods. Wash your spirit clean.\n \n \n\n \n \n \n ion-item in a card, icon left, button right\n View\n \n\n \n This is content, without any paragraph or header tags,\n within an ion-cardContent element.\n \n \n\n \n \n \n Card Link Item 1 activated\n \n\n \n \n Card Link Item 2\n \n\n \n \n Card Button Item 1 activated\n \n\n \n \n Card Button Item 2\n \n \n \n \n );\n};\n\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'card-example',\n styleUrl: 'card-example.css'\n})\nexport class CardExample {\n render() {\n return [\n \n \n Card Subtitle\n Card Title\n \n\n \n Keep close to Nature's heart... and break clear away, once in awhile,\n and climb a mountain or spend a week in the woods. Wash your spirit clean.\n \n ,\n\n \n \n \n ion-item in a card, icon left, button right\n View\n \n\n \n This is content, without any paragraph or header tags,\n within an ion-card-content element.\n \n ,\n\n \n \n \n Card Link Item 1 activated\n \n\n \n \n Card Link Item 2\n \n\n \n \n Card Button Item 1 activated\n \n\n \n \n Card Button Item 2\n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "button", - "type": "boolean", - "mutable": false, - "attr": "button", - "reflectToAttr": false, - "docs": "If `true`, a button tag will be rendered and the card will be tappable.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the card.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "download", - "type": "string | undefined", - "mutable": false, - "attr": "download", - "reflectToAttr": false, - "docs": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition animation when navigating to\nanother page using `href`.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerDirection", - "type": "\"back\" | \"forward\" | \"root\"", - "mutable": false, - "attr": "router-direction", - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition direction when navigating to\nanother page using `href`.", - "docsTags": [], - "default": "'forward'", - "values": [ - { - "value": "back", - "type": "string" - }, - { - "value": "forward", - "type": "string" - }, - { - "value": "root", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button. Only used when an `onclick` or `button` property is present.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the card" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the card" - } - ], - "slots": [], - "parts": [ - { - "name": "native", - "docs": "The native HTML button, anchor, or div element that wraps all child elements." - } - ], - "dependents": [], - "dependencies": [ - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-card": [ - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/card-content/card-content.tsx", - "encapsulation": "none", - "tag": "ion-card-content", - "readme": "# ion-card-content\n\n`ion-card-content` is child component of `ion-card` that adds some content padding.\nIt is recommended that any text content for a card should be placed in an `ion-card-content`.\n\n", - "docs": "`ion-card-content` is child component of `ion-card` that adds some content padding.\nIt is recommended that any text content for a card should be placed in an `ion-card-content`.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": {}, - "props": [ - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/card-header/card-header.tsx", - "encapsulation": "shadow", - "tag": "ion-card-header", - "readme": "# ion-card-header\n\n`ion-card-header` is a header component for `ion-card`.\n\n", - "docs": "`ion-card-header` is a header component for `ion-card`.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": {}, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the card header will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/card-subtitle/card-subtitle.tsx", - "encapsulation": "shadow", - "tag": "ion-card-subtitle", - "readme": "# ion-card-subtitle\n\n`ion-card-subtitle` is a child component of `ion-card`\n", - "docs": "`ion-card-subtitle` is a child component of `ion-card`", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": {}, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the card subtitle" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/card-title/card-title.tsx", - "encapsulation": "shadow", - "tag": "ion-card-title", - "readme": "# ion-card-title\n\n`ion-card-title` is a child component of `ion-card`\n\n", - "docs": "`ion-card-title` is a child component of `ion-card`", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": {}, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the card title" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/checkbox/checkbox.tsx", - "encapsulation": "shadow", - "tag": "ion-checkbox", - "readme": "# ion-checkbox\n\nCheckboxes allow the selection of multiple options from a set of options. They appear as checked (ticked) when activated. Clicking on a checkbox will toggle the `checked` property. They can also be checked programmatically by setting the `checked` property.\n\n## Interfaces\n\n### CheckboxChangeEventDetail\n\n```typescript\ninterface CheckboxChangeEventDetail {\n value: T;\n checked: boolean;\n}\n```\n\n### CheckboxCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface CheckboxCustomEvent extends CustomEvent {\n detail: CheckboxChangeEventDetail;\n target: HTMLIonCheckboxElement;\n}\n```\n\n", - "docs": "Checkboxes allow the selection of multiple options from a set of options. They appear as checked (ticked) when activated. Clicking on a checkbox will toggle the `checked` property. They can also be checked programmatically by setting the `checked` property.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "container - The container for the checkbox mark." - }, - { - "name": "part", - "text": "mark - The checkmark used to indicate the checked state." - } - ], - "usage": { - "angular": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n {{entry.val}}\n \n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'app-page-home',\n templateUrl: 'home.page.html',\n styleUrls: ['home.page.scss']\n})\nexport class HomePage {\n public form = [\n { val: 'Pepperoni', isChecked: true },\n { val: 'Sausage', isChecked: false },\n { val: 'Mushroom', isChecked: false }\n ];\n}\n```\n", - "javascript": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n Pepperoni\n \n \n\n \n Sausage\n \n \n\n \n Mushrooms\n \n \n\n```\n", - "react": "```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonCheckbox, IonList, IonItem, IonLabel, IonItemDivider } from '@ionic/react';\n\nconst checkboxList = [\n { val: 'Pepperoni', isChecked: true },\n { val: 'Sausage', isChecked: false },\n { val: 'Mushroom', isChecked: false }\n];\n\nexport const CheckboxExamples: React.FC = () => {\n\n const [checked, setChecked] = useState(false);\n\n return (\n \n \n \n CheckboxExamples\n \n \n \n \n Default Checkbox\n \n Checked: {JSON.stringify(checked)}\n setChecked(e.detail.checked)} />\n \n\n Disabled Checkbox\n \n\n Checkbox Colors\n \n \n \n \n \n \n \n Checkboxes in a List\n\n {checkboxList.map(({ val, isChecked }, i) => (\n \n {val}\n \n \n ))}\n \n \n \n );\n};\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'checkbox-example',\n styleUrl: 'checkbox-example.css'\n})\nexport class CheckboxExample {\n private form = [\n { val: 'Pepperoni', isChecked: true },\n { val: 'Sausage', isChecked: false },\n { val: 'Mushroom', isChecked: false }\n ];\n\n render() {\n return [\n // Default Checkbox\n ,\n\n // Disabled Checkbox\n ,\n\n // Checked Checkbox\n ,\n\n // Checkbox Colors\n ,\n ,\n ,\n ,\n ,\n\n // Checkboxes in a List\n \n {this.form.map(entry =>\n \n {entry.val}\n \n \n )}\n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "checked", - "type": "boolean", - "mutable": true, - "attr": "checked", - "reflectToAttr": false, - "docs": "If `true`, the checkbox is selected.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the checkbox.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "indeterminate", - "type": "boolean", - "mutable": true, - "attr": "indeterminate", - "reflectToAttr": false, - "docs": "If `true`, the checkbox will visually appear as indeterminate.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "this.inputId", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "any", - "mutable": false, - "attr": "value", - "reflectToAttr": false, - "docs": "The value of the checkbox does not mean if it's checked or not, use the `checked`\nproperty for that.\n\nThe value of a checkbox is analogous to the value of an ``,\nit's only used when the checkbox participates in a native `
`.", - "docsTags": [], - "default": "'on'", - "values": [ - { - "type": "any" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the checkbox loses focus.", - "docsTags": [] - }, - { - "event": "ionChange", - "detail": "CheckboxChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the checked property has changed.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the checkbox has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the checkbox icon" - }, - { - "name": "--background-checked", - "annotation": "prop", - "docs": "Background of the checkbox icon when checked" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Border color of the checkbox icon" - }, - { - "name": "--border-color-checked", - "annotation": "prop", - "docs": "Border color of the checkbox icon when checked" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the checkbox icon" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Border style of the checkbox icon" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Border width of the checkbox icon" - }, - { - "name": "--checkmark-color", - "annotation": "prop", - "docs": "Color of the checkbox checkmark when checked" - }, - { - "name": "--checkmark-width", - "annotation": "prop", - "docs": "Stroke width of the checkbox checkmark" - }, - { - "name": "--size", - "annotation": "prop", - "docs": "Size of the checkbox icon" - }, - { - "name": "--transition", - "annotation": "prop", - "docs": "Transition of the checkbox icon" - } - ], - "slots": [], - "parts": [ - { - "name": "container", - "docs": "The container for the checkbox mark." - }, - { - "name": "mark", - "docs": "The checkmark used to indicate the checked state." - } - ], - "dependents": [ - "ion-select-popover" - ], - "dependencies": [], - "dependencyGraph": { - "ion-select-popover": [ - "ion-checkbox" - ] - } - }, - { - "filePath": "./src/components/chip/chip.tsx", - "encapsulation": "shadow", - "tag": "ion-chip", - "readme": "# ion-chip\n\nChips represent complex entities in small blocks, such as a contact. A chip can contain several different elements such as avatars, text, and icons.\n", - "docs": "Chips represent complex entities in small blocks, such as a contact. A chip can contain several different elements such as avatars, text, and icons.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n Default\n\n\n\n Secondary Label\n\n\n\n Secondary w/ Dark label\n\n\n\n Disabled Chip\n\n\n\n \n Default\n\n\n\n \n Default\n\n\n\n Button Chip\n \n\n\n\n \n Icon Chip\n \n\n\n\n \n \n \n Avatar Chip\n \n\n```\n", - "javascript": "```html\n\n Default\n\n\n\n Secondary Label\n\n\n\n Secondary w/ Dark label\n\n\n\n Disabled Chip\n\n\n\n \n Default\n\n\n\n \n Default\n\n\n\n Button Chip\n \n\n\n\n \n Icon Chip\n \n\n\n\n \n \n \n Avatar Chip\n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonChip, IonLabel, IonIcon, IonAvatar } from '@ionic/react';\nimport { pin, heart, closeCircle, close } from 'ionicons/icons';\n\nexport const ChipExamples: React.FC = () => {\n return (\n \n \n \n ChipExamples\n \n \n \n \n Default\n \n\n \n Secondary Label\n \n\n \n Secondary w/ Dark label\n \n\n \n Disabled Chip\n \n\n \n \n Default\n \n\n \n \n Default\n \n\n \n Button Chip\n \n \n\n \n \n Icon Chip\n \n \n\n \n \n \n \n Avatar Chip\n \n \n \n \n );\n};\n\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'chip-example',\n styleUrl: 'chip-example.css'\n})\nexport class ChipExample {\n render() {\n return [\n \n Default\n ,\n\n \n Secondary Label\n ,\n\n \n Secondary w/ Dark label\n ,\n\n \n \n Default\n ,\n\n \n \n Default\n ,\n\n \n Button Chip\n \n ,\n\n \n \n Icon Chip\n \n ,\n\n \n \n \n \n Avatar Chip\n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the chip.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "outline", - "type": "boolean", - "mutable": false, - "attr": "outline", - "reflectToAttr": false, - "docs": "Display an outline style button.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the chip" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the chip" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [ - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-chip": [ - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/col/col.tsx", - "encapsulation": "shadow", - "tag": "ion-col", - "readme": "# ion-col\n\nColumns are cellular components of the [grid](../grid) system and go inside of a [row](../row).\nThey will expand to fill their row. All content within a grid should go inside of a column.\n\nSee [Grid Layout](/docs/layout/grid) for more information.\n\n\n## Column Alignment\n\nBy default, columns will stretch to fill the entire height of the row. Columns are [flex items](https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item), so there are several [CSS classes](/docs/layout/css-utilities#flex-item-properties) that can be applied to a column to customize this behavior.\n\n", - "docs": "Columns are cellular components of the [grid](../grid) system and go inside of a [row](../row).\nThey will expand to fill their row. All content within a grid should go inside of a column.\n\nSee [Grid Layout](/docs/layout/grid) for more information.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "offset", - "type": "string | undefined", - "mutable": false, - "attr": "offset", - "reflectToAttr": false, - "docs": "The amount to offset the column, in terms of how many columns it should shift to the end\nof the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "offsetLg", - "type": "string | undefined", - "mutable": false, - "attr": "offset-lg", - "reflectToAttr": false, - "docs": "The amount to offset the column for lg screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "offsetMd", - "type": "string | undefined", - "mutable": false, - "attr": "offset-md", - "reflectToAttr": false, - "docs": "The amount to offset the column for md screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "offsetSm", - "type": "string | undefined", - "mutable": false, - "attr": "offset-sm", - "reflectToAttr": false, - "docs": "The amount to offset the column for sm screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "offsetXl", - "type": "string | undefined", - "mutable": false, - "attr": "offset-xl", - "reflectToAttr": false, - "docs": "The amount to offset the column for xl screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "offsetXs", - "type": "string | undefined", - "mutable": false, - "attr": "offset-xs", - "reflectToAttr": false, - "docs": "The amount to offset the column for xs screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pull", - "type": "string | undefined", - "mutable": false, - "attr": "pull", - "reflectToAttr": false, - "docs": "The amount to pull the column, in terms of how many columns it should shift to the start of\nthe total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pullLg", - "type": "string | undefined", - "mutable": false, - "attr": "pull-lg", - "reflectToAttr": false, - "docs": "The amount to pull the column for lg screens, in terms of how many columns it should shift\nto the start of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pullMd", - "type": "string | undefined", - "mutable": false, - "attr": "pull-md", - "reflectToAttr": false, - "docs": "The amount to pull the column for md screens, in terms of how many columns it should shift\nto the start of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pullSm", - "type": "string | undefined", - "mutable": false, - "attr": "pull-sm", - "reflectToAttr": false, - "docs": "The amount to pull the column for sm screens, in terms of how many columns it should shift\nto the start of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pullXl", - "type": "string | undefined", - "mutable": false, - "attr": "pull-xl", - "reflectToAttr": false, - "docs": "The amount to pull the column for xl screens, in terms of how many columns it should shift\nto the start of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pullXs", - "type": "string | undefined", - "mutable": false, - "attr": "pull-xs", - "reflectToAttr": false, - "docs": "The amount to pull the column for xs screens, in terms of how many columns it should shift\nto the start of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "push", - "type": "string | undefined", - "mutable": false, - "attr": "push", - "reflectToAttr": false, - "docs": "The amount to push the column, in terms of how many columns it should shift to the end\nof the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pushLg", - "type": "string | undefined", - "mutable": false, - "attr": "push-lg", - "reflectToAttr": false, - "docs": "The amount to push the column for lg screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pushMd", - "type": "string | undefined", - "mutable": false, - "attr": "push-md", - "reflectToAttr": false, - "docs": "The amount to push the column for md screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pushSm", - "type": "string | undefined", - "mutable": false, - "attr": "push-sm", - "reflectToAttr": false, - "docs": "The amount to push the column for sm screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pushXl", - "type": "string | undefined", - "mutable": false, - "attr": "push-xl", - "reflectToAttr": false, - "docs": "The amount to push the column for xl screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pushXs", - "type": "string | undefined", - "mutable": false, - "attr": "push-xs", - "reflectToAttr": false, - "docs": "The amount to push the column for xs screens, in terms of how many columns it should shift\nto the end of the total available.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "size", - "type": "string | undefined", - "mutable": false, - "attr": "size", - "reflectToAttr": false, - "docs": "The size of the column, in terms of how many columns it should take up out of the total\navailable. If `\"auto\"` is passed, the column will be the size of its content.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "sizeLg", - "type": "string | undefined", - "mutable": false, - "attr": "size-lg", - "reflectToAttr": false, - "docs": "The size of the column for lg screens, in terms of how many columns it should take up out\nof the total available. If `\"auto\"` is passed, the column will be the size of its content.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "sizeMd", - "type": "string | undefined", - "mutable": false, - "attr": "size-md", - "reflectToAttr": false, - "docs": "The size of the column for md screens, in terms of how many columns it should take up out\nof the total available. If `\"auto\"` is passed, the column will be the size of its content.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "sizeSm", - "type": "string | undefined", - "mutable": false, - "attr": "size-sm", - "reflectToAttr": false, - "docs": "The size of the column for sm screens, in terms of how many columns it should take up out\nof the total available. If `\"auto\"` is passed, the column will be the size of its content.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "sizeXl", - "type": "string | undefined", - "mutable": false, - "attr": "size-xl", - "reflectToAttr": false, - "docs": "The size of the column for xl screens, in terms of how many columns it should take up out\nof the total available. If `\"auto\"` is passed, the column will be the size of its content.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "sizeXs", - "type": "string | undefined", - "mutable": false, - "attr": "size-xs", - "reflectToAttr": false, - "docs": "The size of the column for xs screens, in terms of how many columns it should take up out\nof the total available. If `\"auto\"` is passed, the column will be the size of its content.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [ - { - "event": "resize", - "target": "window", - "capture": false, - "passive": true - } - ], - "styles": [ - { - "name": "--ion-grid-column-padding", - "annotation": "prop", - "docs": "Padding for the Column" - }, - { - "name": "--ion-grid-column-padding-lg", - "annotation": "prop", - "docs": "Padding for the Column on lg screens and up" - }, - { - "name": "--ion-grid-column-padding-md", - "annotation": "prop", - "docs": "Padding for the Column on md screens and up" - }, - { - "name": "--ion-grid-column-padding-sm", - "annotation": "prop", - "docs": "Padding for the Column on sm screens and up" - }, - { - "name": "--ion-grid-column-padding-xl", - "annotation": "prop", - "docs": "Padding for the Column on xl screens and up" - }, - { - "name": "--ion-grid-column-padding-xs", - "annotation": "prop", - "docs": "Padding for the Column on xs screens and up" - }, - { - "name": "--ion-grid-columns", - "annotation": "prop", - "docs": "The number of total Columns in the Grid" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/content/content.tsx", - "encapsulation": "shadow", - "tag": "ion-content", - "readme": "# ion-content\n\nThe content component provides an easy to use content area with some useful methods\nto control the scrollable area. There should only be one content in a single\nview.\n\nContent, along with many other Ionic components, can be customized to modify its padding, margin, and more using the global styles provided in the [CSS Utilities](/docs/layout/css-utilities) or by individually styling it using CSS and the available [CSS Custom Properties](#css-custom-properties).\n\n\n## Fixed Content\n\nIn order to place elements outside of the scrollable area, `slot=\"fixed\"` can be added to the element. This will absolutely position the element placing it in the top left. In order to place the element in a different position, style it using [top, right, bottom, and left](https://developer.mozilla.org/en-US/docs/Web/CSS/position).\n\n## Interfaces\n\n### ScrollBaseDetail\n\n```typescript\ninterface ScrollBaseDetail {\n isScrolling: boolean;\n}\n```\n\n### ScrollDetail\n\n```typescript\ninterface ScrollDetail extends GestureDetail, ScrollBaseDetail {\n scrollTop: number;\n scrollLeft: number;\n}\n```\n\n### ScrollBaseCustomEvent \n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing on the `ionScrollStart` and `ionScrollEnd` events.\n\n```typescript\ninterface ScrollBaseCustomEvent extends CustomEvent {\n detail: ScrollBaseDetail;\n target: HTMLIonContentElement;\n}\n```\n\n### ScrollCustomEvent \n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing on the `ionScroll` event.\n\n```typescript\ninterface ScrollCustomEvent extends ScrollBaseCustomEvent {\n detail: ScrollDetail;\n}\n```\n\n", - "docs": "The content component provides an easy to use content area with some useful methods\nto control the scrollable area. There should only be one content in a single\nview.\n\nContent, along with many other Ionic components, can be customized to modify its padding, margin, and more using the global styles provided in the [CSS Utilities](/docs/layout/css-utilities) or by individually styling it using CSS and the available [CSS Custom Properties](#css-custom-properties).", - "docsTags": [ - { - "name": "slot", - "text": "- Content is placed in the scrollable area if provided without a slot." - }, - { - "name": "slot", - "text": "fixed - Should be used for fixed content that should not scroll." - }, - { - "name": "part", - "text": "background - The background of the content." - }, - { - "name": "part", - "text": "scroll - The scrollable container of the content." - } - ], - "usage": { - "angular": "```html\n\n

Main Content

\n\n
\n

Fixed Content

\n
\n\n```\n\n", - "javascript": "```html\n\n

Main Content

\n\n
\n

Fixed Content

\n
\n
\n```\n\n```javascript\nvar content = document.querySelector('ion-content');\ncontent.scrollEvents = true;\ncontent.addEventListener('ionScrollStart', () => console.log('scroll start'));\ncontent.addEventListener('ionScroll', (ev) => console.log('scroll', ev.detail));\ncontent.addEventListener('ionScrollEnd', () => console.log('scroll end'));\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonContent } from '@ionic/react';\n\nconst ContentExample: React.FC = () => (\n {}}\n onIonScroll={() => {}}\n onIonScrollEnd={() => {}}>\n

Main Content

\n\n
\n

Fixed Content

\n
\n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'content-example',\n styleUrl: 'content-example.css'\n})\nexport class ContentExample {\n logScrollStart() {\n console.log('Scroll start');\n }\n\n logScrolling(ev) {\n console.log('Scrolling', ev);\n }\n\n logScrollEnd() {\n console.log('Scroll end');\n }\n\n render() {\n return [\n this.logScrollStart()}\n onIonScroll={(ev) => this.logScrolling(ev)}\n onIonScrollEnd={() => this.logScrollEnd()}>\n

Main Content

\n\n
\n

Fixed Content

\n
\n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n\n```\n\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "forceOverscroll", - "type": "boolean | undefined", - "mutable": true, - "attr": "force-overscroll", - "reflectToAttr": false, - "docs": "If `true` and the content does not cause an overflow scroll, the scroll interaction will cause a bounce.\nIf the content exceeds the bounds of ionContent, nothing will change.\nNote, the does not disable the system bounce on iOS. That is an OS level setting.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "fullscreen", - "type": "boolean", - "mutable": false, - "attr": "fullscreen", - "reflectToAttr": false, - "docs": "If `true`, the content will scroll behind the headers\nand footers. This effect can easily be seen by setting the toolbar\nto transparent.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "scrollEvents", - "type": "boolean", - "mutable": false, - "attr": "scroll-events", - "reflectToAttr": false, - "docs": "Because of performance reasons, ionScroll events are disabled by default, in order to enable them\nand start listening from (ionScroll), set this property to `true`.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "scrollX", - "type": "boolean", - "mutable": false, - "attr": "scroll-x", - "reflectToAttr": false, - "docs": "If you want to enable the content scrolling in the X axis, set this property to `true`.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "scrollY", - "type": "boolean", - "mutable": false, - "attr": "scroll-y", - "reflectToAttr": false, - "docs": "If you want to disable the content scrolling in the Y axis, set this property to `false`.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "getScrollElement", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getScrollElement() => Promise", - "parameters": [], - "docs": "Get the element where the actual scrolling takes place.\nThis element can be used to subscribe to `scroll` events or manually modify\n`scrollTop`. However, it's recommended to use the API provided by `ion-content`:\n\ni.e. Using `ionScroll`, `ionScrollStart`, `ionScrollEnd` for scrolling events\nand `scrollToPoint()` to scroll the content into a certain point.", - "docsTags": [] - }, - { - "name": "scrollByPoint", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "scrollByPoint(x: number, y: number, duration: number) => Promise", - "parameters": [], - "docs": "Scroll by a specified X/Y distance in the component.", - "docsTags": [ - { - "name": "param", - "text": "x The amount to scroll by on the horizontal axis." - }, - { - "name": "param", - "text": "y The amount to scroll by on the vertical axis." - }, - { - "name": "param", - "text": "duration The amount of time to take scrolling by that amount." - } - ] - }, - { - "name": "scrollToBottom", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "scrollToBottom(duration?: number) => Promise", - "parameters": [], - "docs": "Scroll to the bottom of the component.", - "docsTags": [ - { - "name": "param", - "text": "duration The amount of time to take scrolling to the bottom. Defaults to `0`." - } - ] - }, - { - "name": "scrollToPoint", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "scrollToPoint(x: number | undefined | null, y: number | undefined | null, duration?: number) => Promise", - "parameters": [], - "docs": "Scroll to a specified X/Y location in the component.", - "docsTags": [ - { - "name": "param", - "text": "x The point to scroll to on the horizontal axis." - }, - { - "name": "param", - "text": "y The point to scroll to on the vertical axis." - }, - { - "name": "param", - "text": "duration The amount of time to take scrolling to that point. Defaults to `0`." - } - ] - }, - { - "name": "scrollToTop", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "scrollToTop(duration?: number) => Promise", - "parameters": [], - "docs": "Scroll to the top of the component.", - "docsTags": [ - { - "name": "param", - "text": "duration The amount of time to take scrolling to the top. Defaults to `0`." - } - ] - } - ], - "events": [ - { - "event": "ionScroll", - "detail": "ScrollDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted while scrolling. This event is disabled by default.\nLook at the property: `scrollEvents`", - "docsTags": [] - }, - { - "event": "ionScrollEnd", - "detail": "ScrollBaseDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the scroll has ended.", - "docsTags": [] - }, - { - "event": "ionScrollStart", - "detail": "ScrollBaseDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the scroll has started.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "appload", - "target": "window", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the content" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the content" - }, - { - "name": "--keyboard-offset", - "annotation": "prop", - "docs": "Keyboard offset of the content" - }, - { - "name": "--offset-bottom", - "annotation": "prop", - "docs": "Offset bottom of the content" - }, - { - "name": "--offset-top", - "annotation": "prop", - "docs": "Offset top of the content" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the content" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the content" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the content" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the content" - } - ], - "slots": [ - { - "name": "", - "docs": "Content is placed in the scrollable area if provided without a slot." - }, - { - "name": "fixed", - "docs": "Should be used for fixed content that should not scroll." - } - ], - "parts": [ - { - "name": "background", - "docs": "The background of the content." - }, - { - "name": "scroll", - "docs": "The scrollable container of the content." - } - ], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/datetime/datetime.tsx", - "encapsulation": "shadow", - "tag": "ion-datetime", - "readme": "# ion-datetime\n\nDatetimes present a calendar interface and time wheel, making it easy for users to select dates and times. Datetimes are similar to the native `input` elements of `datetime-local`, however, Ionic Framework's Datetime component makes it easy to display the date and time in the preferred format, and manage the datetime values.\n\n### Datetime Data\n\nHistorically, handling datetime values within JavaScript, or even within HTML\ninputs, has always been a challenge. Specifically, JavaScript's `Date` object is\nnotoriously difficult to correctly parse apart datetime strings or to format\ndatetime values. Even worse is how different browsers and JavaScript versions\nparse various datetime strings differently, especially per locale.\n\nFortunately, Ionic Framework's datetime input has been designed so developers can avoid\nthe common pitfalls, allowing developers to easily manipulate datetime values and give the user a simple datetime picker for a great user experience.\n\n##### ISO 8601 Datetime Format: YYYY-MM-DDTHH:mmZ\n\nIonic Framework uses the [ISO 8601 datetime format](https://www.w3.org/TR/NOTE-datetime)\nfor its value. The value is simply a string, rather than using JavaScript's\n`Date` object. Using the ISO datetime format makes it easy to serialize\nand parse within JSON objects and databases.\n\nAn ISO format can be used as a simple year, or just the hour and minute, or get\nmore detailed down to the millisecond and time zone. Any of the ISO formats below\ncan be used, and after a user selects a new value, Ionic Framework will continue to use\nthe same ISO format which datetime value was originally given as.\n\n| Description | Format | Datetime Value Example |\n| -------------------- | ---------------------- | ---------------------------- |\n| Year | YYYY | 1994 |\n| Year and Month | YYYY-MM | 1994-12 |\n| Complete Date | YYYY-MM-DD | 1994-12-15 |\n| Date and Time | YYYY-MM-DDTHH:mm | 1994-12-15T13:47 |\n| UTC Timezone | YYYY-MM-DDTHH:mm:ssZ | 1994-12-15T13:47:20Z |\n| Timezone Offset | YYYY-MM-DDTHH:mm:ssTZD | 1994-12-15T13:47:20+05:00 |\n| Hour and Minute | HH:mm | 13:47 |\n| Hour, Minute, Second | HH:mm:ss | 13:47:20 |\n\nNote that the year is always four-digits, milliseconds (if it's added) is always\nthree-digits, and all others are always two-digits. So the number representing\nJanuary always has a leading zero, such as `01`. Additionally, the hour is\nalways in the 24-hour format, so `00` is `12am` on a 12-hour clock, `13` means\n`1pm`, and `23` means `11pm`.\n\n## Min and Max Datetimes\n\nDates are infinite in either direction, so for a user's selection there should be at least some form of restricting the dates that can be selected. By default, the maximum date is to the end of the current year, and the minimum date is from the beginning of the year that was 100 years ago.\n\nTo customize the minimum and maximum datetime values, the `min` and `max` component properties can be provided which may make more sense for the app's use-case. Following the same IS0 8601 format listed in the table above, each component can restrict which dates can be selected by the user. By passing `2016` to the `min` property and `2020-10-31` to the `max` property, the datetime will restrict the date selection between the beginning of `2016`, and `October 31st of 2020`.\n\n## Selecting Specific Values\n\nWhile the `min` and `max` properties allow you to restrict date selection to a certain range, the `monthValues`, `dayValues`, `yearValues`, `hourValues`, and `minuteValues` properties allow you choose specific days and times that you to have enabled.\n\nFor example, if we wanted users to only select minutes in increments of 15, we could pass `\"0,15,30,45\"` to the `minuteValues` property.\n\nAs another example, if we wanted users to only select from the month of October, we could pass `\"10\"` to the `monthValues` property.\n\n## Customizing Date and Time Presentation\n\nSome use cases may call for only date selection or only time selection. The `presentation` property allows you to specify which pickers to show and the order to show them in. For example, `presentation=\"time\"` would only show the time picker. `presentation=\"time-date\"` would show the time picker first and the date picker second, but `presentation=\"date-time\"` would show the date picker first and the time picker second.\n\n## Reset and Cancel Buttons\n\n`ion-datetime` provides `cancel` and `reset` methods that you can call when clicking on custom buttons that you have provided in the `buttons` slot. The `reset` method also allows you to provide a date to reset the datetime to.\n\n## Confirming Selected Values\n\nBy default, `ionChange` is emitted with the new datetime value whenever a new date is selected. To require user confirmation before emitting `ionChange`, you can either set the `showDefaultButtons` property to `true` or use the `buttons` slot to pass in a custom confirmation button. When passing in custom buttons, the confirm button must call the `confirm` method on `ion-datetime` for `ionChange` to be emitted.\n\n## Localization\n\nIonic Framework makes use of the [Intl.DatetimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DatetimeFormat) Web API which allows us to automatically localize the month and day names according to the language and region set on the user's device.\n\nFor instances where you need a specific locale, you can use the `locale` property to set it. The following example sets the language to \"French\" and the region to \"France\":\n\n```html\n\n```\n\n### Controlling the Hour Cycle\n\n`ion-datetime` will use the hour cycle that is specified by the `locale` property by default. For example, if `locale` is set to `en-US`, then `ion-datetime` will use a 12 hour cycle.\n\nThere are 4 primary hour cycle types:\n\n| Hour cycle type | Description |\n| --------------- | ------------------------------------------------------------ |\n| `'h12` | Hour system using 1–12; corresponds to 'h' in patterns. The 12 hour clock, with midnight starting at 12:00 am. |\n| `'h23'` | Hour system using 0–23; corresponds to 'H' in patterns. The 24 hour clock, with midnight starting at 0:00. |\n| `'h11'` | Hour system using 0–11; corresponds to 'K' in patterns. The 12 hour clock, with midnight starting at 0:00 am. |\n| `'h24'` | Hour system using 1–24; corresponds to 'k' in pattern. The 24 hour clock, with midnight starting at 24:00. |\n\n> Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle\n\nThere may be scenarios where you need to have more control over which hour cycle is used. This is where the `hourCycle` property can help.\n\nIn the following example, we can use the `hourCycle` property to force `ion-datetime` to use the 12 hour cycle even though the locale is `en-GB`, which uses a 24 hour cycle by default:\n\n```html\n\n```\n\n`ion-datetime` also supports [locale extension tags](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). These tags let you encode information about the locale in the locale string itself. Developers may prefer to use the extension tag approach if they are using the [Intl.Locale API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) in their apps.\n\nFor example, if you wanted to use a 12 hour cycle with the `en-GB` locale, you could alternatively do:\n\n```html\n\n```\n\n`ion-datetime` currently supports the `h12` and `h23` hour cycle types. Interested in seeing support for `h11` and `h24` added to `ion-datetime`? [Let us know!](https://github.com/ionic-team/ionic-framework/issues/23750)\n\n### Setting the First Day of the Week\n\nFor `ion-datetime`, the default first day of the week is Sunday. As of 2021, there is no browser API that lets Ionic automatically determine the first day of the week based on a device's locale, though there is on-going work regarding this (see: [TC39 GitHub](https://github.com/tc39/ecma402/issues/6)).\n\nTo customize the first day of the week, developers can use the `firstDayOfWeek` property. This property takes in a number between `0` and `6` where `0` represents Sunday and `6` represents Saturday.\n\nFor example, if you wanted to have the first day of the week be Monday, you could set `firstDayOfWeek` to `1`:\n\n```html\n\n```\n\n## Time Zones\n\nIonic's `ion-datetime` follows the [datetime-local](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local) behavior of not manipulating or setting the time zone inside of a datetime control. In other words, a time value of \"07:00\" will not be adjusted according to different time zones.\n\nWe recommend using a library such as [date-fns-tz](https://github.com/marnusw/date-fns-tz) to convert a datetime value to the desired time zone.\n\nBelow is an example of formatting an ISO-8601 string to display in the time zone set on a user's device:\n\n```typescript\nimport { format, utcToZonedTime } from 'date-fns-tz';\n\n// Get the time zone set on the user's device\nconst userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n// Create a date object from a UTC date string\nconst date = new Date('2014-10-25T10:46:20Z');\n\n// Use date-fns-tz to convert from UTC to a zoned time\nconst zonedTime = dateFnsTz.utcToZonedTime(date, userTimeZone);\n\n// Create a formatted string from the zoned time\nformat(zonedTime, 'yyyy-MM-dd HH:mm:ssXXX', { timeZone: userTimeZone });\n```\n\n### Parsing Date Values\n\nThe `ionChange` event will emit the date value as an ISO-8601 string in the event payload. It is the developer's responsibility to format it based on their application needs. We recommend using [date-fns](https://date-fns.org) to format the date value.\n\nBelow is an example of formatting an ISO-8601 string to display the month, date and year:\n\n```typescript\nimport { format, parseISO } from 'date-fns';\n\n/**\n * This is provided in the event\n * payload from the `ionChange` event.\n * \n * The value is an ISO-8601 date string.\n */\nconst dateFromIonDatetime = '2021-06-04T14:23:00-04:00';\nconst formattedString = format(parseISO(dateFromIonDatetime), 'MMM d, yyyy');\n\nconsole.log(formattedString); // Jun 4, 2021\n```\n\nSee https://date-fns.org/docs/format for a list of all the valid format tokens.\n\n## Advanced Datetime Validation and Manipulation\n\nThe datetime picker provides the simplicity of selecting an exact format, and\npersists the datetime values as a string using the standardized [ISO 8601\ndatetime format](https://www.w3.org/TR/NOTE-datetime). However, it's important\nto note that `ion-datetime` does not attempt to solve all situations when\nvalidating and manipulating datetime values. If datetime values need to be\nparsed from a certain format, or manipulated (such as adding 5 days to a date,\nsubtracting 30 minutes, etc.), or even formatting data to a specific locale,\nthen we highly recommend using [date-fns](https://date-fns.org) to work with\ndates in JavaScript.\n\n## Accessibility\n\n### Keyboard Navigation\n\n`ion-datetime` has full keyboard support for navigating between focusable elements inside of the component. The following table details what each key does:\n\n| Key | Function |\n| ------------------ | ------------------------------------------------------------ |\n| `Tab` | Moves focus to the next focusable element. |\n| `Shift` + `Tab` | Moves focus to the previous focusable element. |\n| `Space` or `Enter` | Clicks the focusable element. |\n\n#### Date Grid\n\n| Key | Function |\n| ------------------ | ------------------------------------------------------------ |\n| `ArrowUp` | Moves focus to the same day of the previous week. |\n| `ArrowDown` | Moves focus to the same day of the next week. |\n| `ArrowRight` | Moves focus to the next day. |\n| `ArrowLeft` | Moves focus to the previous day. |\n| `Home` | Moves focus to the first day of the current week. |\n| `End` | Moves focus to the last day of the current week. |\n| `PageUp` | Changes the grid of dates to the previous month. |\n| `PageDown` | Changes the grid of dates to the next month. |\n| `Shift` + `PageUp` | Changes the grid of dates to the previous year. |\n| `Shift` + `PageDown` | Changes the grid of dates to the next year. |\n\n#### Time, Month, and Year Wheels\n\nWhen using the time wheel picker, you can use the number keys to select hour and minute values when the columns are focused.\n\n| Key | Function |\n| ------------------ | ------------------------------------------------------------ |\n| `ArrowUp` | Scroll to the previous item. |\n| `ArrowDown` | Scroll to the next item. |\n| `Home` | Scroll to the first item. |\n| `End` | Scroll to the last item. |\n\n## Interfaces\n\n### DatetimeChangeEventDetail\n\n```typescript\ninterface DatetimeChangeEventDetail {\n value?: string | null;\n}\n```\n\n### DatetimeCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface DatetimeCustomEvent extends CustomEvent {\n detail: DatetimeChangeEventDetail;\n target: HTMLIonDatetimeElement;\n}\n```\n", - "docs": "Datetimes present a calendar interface and time wheel, making it easy for users to select dates and times. Datetimes are similar to the native `input` elements of `datetime-local`, however, Ionic Framework's Datetime component makes it easy to display the date and time in the preferred format, and manage the datetime values.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "title - The title of the datetime." - }, - { - "name": "slot", - "text": "buttons - The buttons in the datetime." - }, - { - "name": "slot", - "text": "time-label - The label for the time selector in the datetime." - } - ], - "usage": { - "angular": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
My Custom Title
\n
\n\n\n\n\n\nOpen Datetime Modal\n\n \n \n \n \n \n\n\n\n\n \n Good to go!\n Reset\n \n\n\n\n\n Date\n {{ dateValue }}\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n \n \n \n\n```\n\n```typescript\nimport { Component, ViewChild } from '@angular/core';\nimport { IonDatetime } from '@ionic/angular';\nimport { format, parseISO } from 'date-fns';\n\n@Component({…})\nexport class MyComponent {\n @ViewChild(IonDatetime, { static: true }) datetime: IonDatetime;\n\n dateValue = '';\n dateValue2 = '';\n\n constructor() {}\n \n confirm() {\n this.datetime.nativeEl.confirm();\n }\n \n reset() {\n this.datetime.nativeEl.reset();\n }\n\n formatDate(value: string) {\n return format(parseISO(value), 'MMM dd yyyy');\n }\n}\n```", - "javascript": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
My Custom Title
\n
\n\n\n\n\n\n\n \n Good to go!\n Reset\n \n\n\n\nOpen Datetime Modal\n\n \n \n \n\n\n\n\n Date\n \n \n \n \n\n\n\n\n \n \n \n \n \n \n \n\n```\n\n```javascript\nimport { format, parseISO } from 'date-fns';\n\nconst datetime = document.querySelector('#custom-datetime');\n\nconst confirm = () => {\n datetime.confirm();\n};\n\nconst reset = () => {\n datetime.reset();\n};\n\nconst formatDate = (value: string) => {\n return format(parseISO(value), 'MMM dd yyyy');\n};\n\nconst popoverDatetime = document.querySelector('#popover-datetime');\nconst dateInput = document.querySelector('#date-input');\npopoverDatetime.addEventListener('ionChange', ev => dateInput.innerText = formatDate(ev.detail.value));\n\nconst popoverDatetime2 = document.querySelector('#popover-datetime-2');\nconst dateInput2 = document.querySelector('#date-input-2');\npopoverDatetime2.addEventListener('ionChange', ev => dateInput2.value = formatDate(ev.detail.value));\n```", - "react": "```javascript\nimport React, { useState, useRef } from 'react';\nimport {\n IonButton,\n IonButtons,\n IonContent,\n IonDatetime,\n IonInput,\n IonItem,\n IonModal,\n IonPage,\n IonPopover\n} from '@ionic/react';\nimport { calendar } from 'ionicons/icons';\nimport { format, parseISO } from 'date-fns';\n\nexport const DateTimeExamples: React.FC = () => {\n const [selectedDate, setSelectedDate] = useState('2012-12-15T13:47:20.789');\n const [popoverDate, setPopoverDate] = useState('');\n const [popoverDate2, setPopoverDate2] = useState('');\n\n const customDatetime = useRef();\n const confirm = () => {\n if (customDatetime === undefined) return;\n \n customDatetime.confirm();\n };\n \n const reset = () => {\n if (customDatetime === undefined) return;\n \n customDatetime.reset();\n };\n\n const formatDate = (value: string) => {\n return format(parseISO(value), 'MMM dd yyyy');\n };\n\n return (\n \n {/* Initial value */}\n setSelectedDate(e.detail.value!)}>\n \n {/* Readonly */}\n \n \n {/* Disabled */}\n \n \n {/* Custom locale */}\n \n \n {/* Max and min */}\n \n \n {/* 15 minute increments */}\n \n \n {/* Specific days/months/years */} \n \n \n {/* Selecting time, no date */}\n \n \n {/* Selecting time first, date second */}\n \n\n {/* Full width size */}\n \n \n {/* Custom Hour Cycle */}\n \n \n {/* Custom first day of week */}\n \n\n {/* Custom title */}\n \n
My Custom Title
\n
\n\n {/* Clear button */}\n \n \n {/* Custom buttons */}\n \n \n confirm()}>Good to go!\n reset()}>Reset\n \n \n \n {/* Datetime in overlay */}\n Open Datetime Modal\n \n \n \n \n \n\n {/* Datetime in popover with cover element */}\n \n Date\n {popoverDate}\n \n setPopoverDate(formatDate(ev.detail.value!))}\n />\n \n \n\n {/* Datetime in popover with input */}\n \n \n \n \n \n \n setPopoverDate2(formatDate(ev.detail.value!))}\n />\n \n \n
\n )\n}\n```", - "stencil": "```javascript\nimport { Component, h } from '@stencil/core';\nimport { format, parseISO } from 'date-fns';\n\n@Component({\n tag: 'datetime-example',\n styleUrl: 'datetime-example.css'\n})\nexport class DatetimeExample {\n private customDatetime?: HTMLElement;\n private dateInput?: HTMLElement;\n private dateInput2?: HTMLElement;\n \n private confirm() {\n const { customDatetime } = this;\n if (customDatetime === undefined) return;\n \n customDatetime.confirm();\n }\n\n private reset() {\n const { customDatetime } = this;\n if (customDatetime === undefined) return;\n \n customDatetime.reset();\n }\n\n private formatDate(value: string) {\n return format(parseISO(value), 'MMM dd yyyy');\n }\n \n render() {\n return [\n {/* Initial value */}\n ,\n \n {/* Readonly */}\n ,\n \n {/* Disabled */}\n ,\n \n {/* Custom locale */}\n ,\n \n {/* Max and min */}\n ,\n \n {/* 15 minute increments */}\n ,\n \n {/* Specific days/months/years */} \n ,\n \n {/* Selecting time, no date */}\n ,\n \n {/* Selecting time first, date second */}\n ,\n\n {/* Full width size */}\n ,\n \n {/* Custom Hour Cycle */}\n ,\n \n {/* Custom first day of week */}\n ,\n\n {/* Custom title */}\n \n
My Custom Title
\n
,\n\n {/* Clear button */}\n \n \n {/* Custom buttons */}\n this.customDatetime = el}>\n \n this.confirm()}>Good to go!\n this.reset()}>Reset\n \n ,\n \n {/* Datetime in overlay */}\n Open Datetime Modal\n \n \n \n \n \n\n {/* Datetime in popover with cover element */}\n \n Date\n this.dateInput = el}>\n \n this.dateInput.innerText = formatDate(ev.detail.value)}\n />\n \n \n\n {/* Datetime in popover with input */}\n \n this.dateInput2 = el}>\n \n \n \n \n this.dateInput2.value = formatDate(ev.detail.value)}\n />\n \n \n ]\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "cancelText", - "type": "string", - "mutable": false, - "attr": "cancel-text", - "reflectToAttr": false, - "docs": "The text to display on the picker's cancel button.", - "docsTags": [], - "default": "'Cancel'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "clearText", - "type": "string", - "mutable": false, - "attr": "clear-text", - "reflectToAttr": false, - "docs": "The text to display on the picker's \"Clear\" button.", - "docsTags": [], - "default": "'Clear'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": false, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "default": "'primary'", - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "dayValues", - "type": "number | number[] | string | undefined", - "mutable": false, - "attr": "day-values", - "reflectToAttr": false, - "docs": "Values used to create the list of selectable days. By default\nevery day is shown for the given month. However, to control exactly which days of\nthe month to display, the `dayValues` input can take a number, an array of numbers, or\na string of comma separated numbers. Note that even if the array days have an invalid\nnumber for the selected month, like `31` in February, it will correctly not show\ndays which are not valid for the selected month.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "number[]" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the datetime.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "doneText", - "type": "string", - "mutable": false, - "attr": "done-text", - "reflectToAttr": false, - "docs": "The text to display on the picker's \"Done\" button.", - "docsTags": [], - "default": "'Done'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "firstDayOfWeek", - "type": "number", - "mutable": false, - "attr": "first-day-of-week", - "reflectToAttr": false, - "docs": "The first day of the week to use for `ion-datetime`. The\ndefault value is `0` and represents Sunday.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "hourCycle", - "type": "\"h12\" | \"h23\" | undefined", - "mutable": false, - "attr": "hour-cycle", - "reflectToAttr": false, - "docs": "The hour cycle of the `ion-datetime`. If no value is set, this is\nspecified by the current locale.", - "docsTags": [], - "values": [ - { - "value": "h12", - "type": "string" - }, - { - "value": "h23", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "hourValues", - "type": "number | number[] | string | undefined", - "mutable": false, - "attr": "hour-values", - "reflectToAttr": false, - "docs": "Values used to create the list of selectable hours. By default\nthe hour values range from `0` to `23` for 24-hour, or `1` to `12` for 12-hour. However,\nto control exactly which hours to display, the `hourValues` input can take a number, an\narray of numbers, or a string of comma separated numbers.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "number[]" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "locale", - "type": "string", - "mutable": false, - "attr": "locale", - "reflectToAttr": false, - "docs": "The locale to use for `ion-datetime`. This\nimpacts month and day name formatting.\nThe `'default'` value refers to the default\nlocale set by your device.", - "docsTags": [], - "default": "'default'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "max", - "type": "string | undefined", - "mutable": true, - "attr": "max", - "reflectToAttr": false, - "docs": "The maximum datetime allowed. Value must be a date string\nfollowing the\n[ISO 8601 datetime format standard](https://www.w3.org/TR/NOTE-datetime),\n`1996-12-19`. The format does not have to be specific to an exact\ndatetime. For example, the maximum could just be the year, such as `1994`.\nDefaults to the end of this year.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "min", - "type": "string | undefined", - "mutable": true, - "attr": "min", - "reflectToAttr": false, - "docs": "The minimum datetime allowed. Value must be a date string\nfollowing the\n[ISO 8601 datetime format standard](https://www.w3.org/TR/NOTE-datetime),\nsuch as `1996-12-19`. The format does not have to be specific to an exact\ndatetime. For example, the minimum could just be the year, such as `1994`.\nDefaults to the beginning of the year, 100 years ago from today.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "minuteValues", - "type": "number | number[] | string | undefined", - "mutable": false, - "attr": "minute-values", - "reflectToAttr": false, - "docs": "Values used to create the list of selectable minutes. By default\nthe minutes range from `0` to `59`. However, to control exactly which minutes to display,\nthe `minuteValues` input can take a number, an array of numbers, or a string of comma\nseparated numbers. For example, if the minute selections should only be every 15 minutes,\nthen this input value would be `minuteValues=\"0,15,30,45\"`.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "number[]" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "monthValues", - "type": "number | number[] | string | undefined", - "mutable": false, - "attr": "month-values", - "reflectToAttr": false, - "docs": "Values used to create the list of selectable months. By default\nthe month values range from `1` to `12`. However, to control exactly which months to\ndisplay, the `monthValues` input can take a number, an array of numbers, or a string of\ncomma separated numbers. For example, if only summer months should be shown, then this\ninput value would be `monthValues=\"6,7,8\"`. Note that month numbers do *not* have a\nzero-based index, meaning January's value is `1`, and December's is `12`.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "number[]" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "this.inputId", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "presentation", - "type": "\"date\" | \"date-time\" | \"month\" | \"month-year\" | \"time\" | \"time-date\" | \"year\"", - "mutable": false, - "attr": "presentation", - "reflectToAttr": false, - "docs": "Which values you want to select. `'date'` will show\na calendar picker to select the month, day, and year. `'time'`\nwill show a time picker to select the hour, minute, and (optionally)\nAM/PM. `'date-time'` will show the date picker first and time picker second.\n`'time-date'` will show the time picker first and date picker second.", - "docsTags": [], - "default": "'date-time'", - "values": [ - { - "value": "date", - "type": "string" - }, - { - "value": "date-time", - "type": "string" - }, - { - "value": "month", - "type": "string" - }, - { - "value": "month-year", - "type": "string" - }, - { - "value": "time", - "type": "string" - }, - { - "value": "time-date", - "type": "string" - }, - { - "value": "year", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "readonly", - "type": "boolean", - "mutable": false, - "attr": "readonly", - "reflectToAttr": false, - "docs": "If `true`, the datetime appears normal but is not interactive.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "showClearButton", - "type": "boolean", - "mutable": false, - "attr": "show-clear-button", - "reflectToAttr": false, - "docs": "If `true`, a \"Clear\" button will be rendered alongside\nthe default \"Cancel\" and \"OK\" buttons at the bottom of the `ion-datetime`\ncomponent. Developers can also use the `button` slot\nif they want to customize these buttons. If custom\nbuttons are set in the `button` slot then the\ndefault buttons will not be rendered.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "showDefaultButtons", - "type": "boolean", - "mutable": false, - "attr": "show-default-buttons", - "reflectToAttr": false, - "docs": "If `true`, the default \"Cancel\" and \"OK\" buttons\nwill be rendered at the bottom of the `ion-datetime`\ncomponent. Developers can also use the `button` slot\nif they want to customize these buttons. If custom\nbuttons are set in the `button` slot then the\ndefault buttons will not be rendered.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "showDefaultTimeLabel", - "type": "boolean", - "mutable": false, - "attr": "show-default-time-label", - "reflectToAttr": false, - "docs": "If `true`, the default \"Time\" label will be rendered\nfor the time selector of the `ion-datetime` component.\nDevelopers can also use the `time-label` slot\nif they want to customize this label. If a custom\nlabel is set in the `time-label` slot then the\ndefault label will not be rendered.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "showDefaultTitle", - "type": "boolean", - "mutable": false, - "attr": "show-default-title", - "reflectToAttr": false, - "docs": "If `true`, a header will be shown above the calendar\npicker. On `ios` mode this will include the\nslotted title, and on `md` mode this will include\nthe slotted title and the selected date.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "size", - "type": "\"cover\" | \"fixed\"", - "mutable": false, - "attr": "size", - "reflectToAttr": false, - "docs": "If `cover`, the `ion-datetime` will expand to cover the full width of its container.\nIf `fixed`, the `ion-datetime` will have a fixed width.", - "docsTags": [], - "default": "'fixed'", - "values": [ - { - "value": "cover", - "type": "string" - }, - { - "value": "fixed", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "null | string | undefined", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "The value of the datetime as a valid ISO 8601 datetime string.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "yearValues", - "type": "number | number[] | string | undefined", - "mutable": false, - "attr": "year-values", - "reflectToAttr": false, - "docs": "Values used to create the list of selectable years. By default\nthe year values range between the `min` and `max` datetime inputs. However, to\ncontrol exactly which years to display, the `yearValues` input can take a number, an array\nof numbers, or string of comma separated numbers. For example, to show upcoming and\nrecent leap years, then this input's value would be `yearValues=\"2024,2020,2016,2012,2008\"`.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "number[]" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "cancel", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "cancel(closeOverlay?: boolean) => Promise", - "parameters": [], - "docs": "Emits the ionCancel event and\noptionally closes the popover\nor modal that the datetime was\npresented in.", - "docsTags": [] - }, - { - "name": "confirm", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "confirm(closeOverlay?: boolean) => Promise", - "parameters": [], - "docs": "Confirms the selected datetime value, updates the\n`value` property, and optionally closes the popover\nor modal that the datetime was presented in.", - "docsTags": [] - }, - { - "name": "reset", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "reset(startDate?: string | undefined) => Promise", - "parameters": [], - "docs": "Resets the internal state of the datetime but does not update the value.\nPassing a valid ISO-8601 string will reset the state of the component to the provided date.\nIf no value is provided, the internal state will be reset to today.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the datetime loses focus.", - "docsTags": [] - }, - { - "event": "ionCancel", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the datetime selection was cancelled.", - "docsTags": [] - }, - { - "event": "ionChange", - "detail": "DatetimeChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value (selected date) has changed.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the datetime has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "The primary background of the datetime component." - }, - { - "name": "--background-rgb", - "annotation": "prop", - "docs": "The primary background of the datetime component in RGB format." - }, - { - "name": "--title-color", - "annotation": "prop", - "docs": "The text color of the title." - } - ], - "slots": [ - { - "name": "buttons", - "docs": "The buttons in the datetime." - }, - { - "name": "time-label", - "docs": "The label for the time selector in the datetime." - }, - { - "name": "title", - "docs": "The title of the datetime." - } - ], - "parts": [], - "dependents": [], - "dependencies": [ - "ion-buttons", - "ion-button", - "ion-picker-internal", - "ion-picker-column-internal", - "ion-item", - "ion-label", - "ion-icon", - "ion-popover" - ], - "dependencyGraph": { - "ion-datetime": [ - "ion-buttons", - "ion-button", - "ion-picker-internal", - "ion-picker-column-internal", - "ion-item", - "ion-label", - "ion-icon", - "ion-popover" - ], - "ion-button": [ - "ion-ripple-effect" - ], - "ion-item": [ - "ion-icon", - "ion-ripple-effect", - "ion-note" - ], - "ion-popover": [ - "ion-backdrop" - ] - } - }, - { - "filePath": "./src/components/fab/fab.tsx", - "encapsulation": "shadow", - "tag": "ion-fab", - "readme": "# ion-fab\n\nFabs are container elements that contain one or more fab buttons. They should be placed in a fixed position that does not scroll with the content. Fab should have one main fab-button. Fabs can also contain fab-lists which contain related buttons that show when the main fab button is clicked. The same fab container can contain several [fab-list](../fab-list) elements with different side values.\n", - "docs": "Fabs are container elements that contain one or more fab buttons. They should be placed in a fixed position that does not scroll with the content. Fab should have one main fab-button. Fabs can also contain fab-lists which contain related buttons that show when the main fab button is clicked. The same fab container can contain several [fab-list](../fab-list) elements with different side values.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n Header\n \n\n\n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n \n Footer\n \n\n```\n", - "javascript": "```html\n\n \n Header\n \n\n\n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n \n Footer\n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonHeader, IonFooter, IonPage, IonTitle, IonToolbar, IonFab, IonFabButton, IonIcon, IonFabList } from '@ionic/react';\nimport { add, settings, share, person, arrowForwardCircle, arrowBackCircle, arrowUpCircle, logoVimeo, logoFacebook, logoInstagram, logoTwitter } from 'ionicons/icons';\n\nexport const FabExamples: React.FC = () => {\n return (\n \n \n \n Header\n \n \n \n {/*-- fab placed to the top end --*/}\n \n \n \n \n \n\n {/*-- fab placed to the bottom end --*/}\n \n \n \n \n \n\n {/*-- fab placed to the top start --*/}\n \n \n \n \n \n\n {/*-- fab placed to the bottom start --*/}\n \n \n \n \n \n\n {/*-- fab placed to the (vertical) center and start --*/}\n \n \n \n \n \n\n {/*-- fab placed to the (vertical) center and end --*/}\n \n \n \n \n \n\n {/*-- fab placed to the top and end and on the top edge of the content overlapping header --*/}\n \n \n \n \n \n\n {/*-- fab placed to the bottom and start and on the bottom edge of the content overlapping footer with a list to the right --*/}\n \n \n \n \n \n \n \n \n\n {/*-- fab placed in the center of the content with a list on each side --*/}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Footer\n \n \n \n );\n};\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'fab-example',\n styleUrl: 'fab-example.css'\n})\nexport class FabExample {\n render() {\n return [\n \n \n Header\n \n ,\n\n \n {/* fab placed to the top end */}\n \n \n \n \n \n\n {/* fab placed to the bottom end */}\n \n \n \n \n \n\n {/* fab placed to the top start */}\n \n \n \n \n \n\n {/* fab placed to the bottom start */}\n \n \n \n \n \n\n {/* fab placed to the (vertical) center and start */}\n \n \n \n \n \n\n {/* fab placed to the (vertical) center and end */}\n \n \n \n \n \n\n {/* fab placed to the top and end and on the top edge of the content overlapping header */}\n \n \n \n \n \n\n {/* fab placed to the bottom and start and on the bottom edge of content overlapping footer with a list to the right */}\n \n \n \n \n \n \n \n \n\n {/* fab placed in the center of the content with a list on each side */}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n\n \n \n \n Footer\n \n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "activated", - "type": "boolean", - "mutable": true, - "attr": "activated", - "reflectToAttr": false, - "docs": "If `true`, both the `ion-fab-button` and all `ion-fab-list` inside `ion-fab` will become active.\nThat means `ion-fab-button` will become a `close` icon and `ion-fab-list` will become visible.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "edge", - "type": "boolean", - "mutable": false, - "attr": "edge", - "reflectToAttr": false, - "docs": "If `true`, the fab will display on the edge of the header if\n`vertical` is `\"top\"`, and on the edge of the footer if\nit is `\"bottom\"`. Should be used with a `fixed` slot.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "horizontal", - "type": "\"center\" | \"end\" | \"start\" | undefined", - "mutable": false, - "attr": "horizontal", - "reflectToAttr": false, - "docs": "Where to align the fab horizontally in the viewport.", - "docsTags": [], - "values": [ - { - "value": "center", - "type": "string" - }, - { - "value": "end", - "type": "string" - }, - { - "value": "start", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "vertical", - "type": "\"bottom\" | \"center\" | \"top\" | undefined", - "mutable": false, - "attr": "vertical", - "reflectToAttr": false, - "docs": "Where to align the fab vertically in the viewport.", - "docsTags": [], - "values": [ - { - "value": "bottom", - "type": "string" - }, - { - "value": "center", - "type": "string" - }, - { - "value": "top", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "close", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "close() => Promise", - "parameters": [], - "docs": "Close an active FAB list container.", - "docsTags": [] - } - ], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/fab-button/fab-button.tsx", - "encapsulation": "shadow", - "tag": "ion-fab-button", - "readme": "# ion-fab-button\n\nFloating Action Buttons (FABs) represent the primary action in an application. By default, they have a circular shape. When pressed, the button may open more related actions. As the name suggests, FABs generally float over the content in a fixed position. This is not achieved exclusively by using an `FAB`. They need to be wrapped with an `` component in order to be fixed over the content.\n\nIf the FAB button is not wrapped with ``, it will scroll with the content. FAB buttons have a default size, a mini size and can accept different colors:\n", - "docs": "Floating Action Buttons (FABs) represent the primary action in an application. By default, they have a circular shape. When pressed, the button may open more related actions. As the name suggests, FABs generally float over the content in a fixed position. This is not achieved exclusively by using an `FAB`. They need to be wrapped with an `` component in order to be fixed over the content.\n\nIf the FAB button is not wrapped with ``, it will scroll with the content. FAB buttons have a default size, a mini size and can accept different colors:", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "native - The native HTML button or anchor element that wraps all child elements." - }, - { - "name": "part", - "text": "close-icon - The close icon that is displayed when a fab list opens (uses ion-icon)." - } - ], - "usage": { - "angular": "```html\n\n\n \n \n Button\n \n\n \n Default\n\n \n Mini\n\n \n Primary\n Secondary\n Danger\n Light\n Dark\n\n\n```\n", - "javascript": "```html\n\n\n \n \n Button\n \n\n \n Default\n\n \n Mini\n\n \n Primary\n Secondary\n Danger\n Light\n Dark\n\n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonFab, IonFabButton } from '@ionic/react';\n\nexport const FabButtonExample: React.FC = () => (\n \n {/*-- Fixed Floating Action Button that does not scroll with the content --*/}\n \n Button\n \n\n {/*-- Default Floating Action Button that scrolls with the content.--*/}\n Default\n\n {/*-- Mini --*/}\n Mini\n\n {/*-- Colors --*/}\n Primary\n Secondary\n Danger\n Light\n Dark\n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'fab-button-example',\n styleUrl: 'fab-button-example.css'\n})\nexport class FabButtonExample {\n render() {\n return [\n \n\n {/* Fixed Floating Action Button that does not scroll with the content */}\n \n Button\n \n\n {/* Default Floating Action Button that scrolls with the content */}\n Default\n\n {/* Mini */}\n Mini\n\n {/* Colors */}\n Primary\n Secondary\n Danger\n Light\n Dark\n\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "activated", - "type": "boolean", - "mutable": false, - "attr": "activated", - "reflectToAttr": false, - "docs": "If `true`, the fab button will be show a close icon.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "closeIcon", - "type": "string", - "mutable": false, - "attr": "close-icon", - "reflectToAttr": false, - "docs": "The icon name to use for the close icon. This will appear when the fab button\nis pressed. Only applies if it is the main button inside of a fab containing a\nfab list.", - "docsTags": [], - "default": "close", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the fab button.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "download", - "type": "string | undefined", - "mutable": false, - "attr": "download", - "reflectToAttr": false, - "docs": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition animation when navigating to\nanother page using `href`.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerDirection", - "type": "\"back\" | \"forward\" | \"root\"", - "mutable": false, - "attr": "router-direction", - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition direction when navigating to\nanother page using `href`.", - "docsTags": [], - "default": "'forward'", - "values": [ - { - "value": "back", - "type": "string" - }, - { - "value": "forward", - "type": "string" - }, - { - "value": "root", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "show", - "type": "boolean", - "mutable": false, - "attr": "show", - "reflectToAttr": false, - "docs": "If `true`, the fab button will show when in a fab-list.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "size", - "type": "\"small\" | undefined", - "mutable": false, - "attr": "size", - "reflectToAttr": false, - "docs": "The size of the button. Set this to `small` in order to have a mini fab button.", - "docsTags": [], - "values": [ - { - "value": "small", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the fab button will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the button loses focus.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the button has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the button" - }, - { - "name": "--background-activated", - "annotation": "prop", - "docs": "Background of the button when pressed. Note: setting this will interfere with the Material Design ripple." - }, - { - "name": "--background-activated-opacity", - "annotation": "prop", - "docs": "Opacity of the button background when pressed" - }, - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background of the button when focused with the tab key" - }, - { - "name": "--background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the button background when focused with the tab key" - }, - { - "name": "--background-hover", - "annotation": "prop", - "docs": "Background of the button on hover" - }, - { - "name": "--background-hover-opacity", - "annotation": "prop", - "docs": "Opacity of the button background on hover" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Border color of the button" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the button" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Border style of the button" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Border width of the button" - }, - { - "name": "--box-shadow", - "annotation": "prop", - "docs": "Box shadow of the button" - }, - { - "name": "--close-icon-font-size", - "annotation": "prop", - "docs": "Font size of the close icon" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Text color of the button" - }, - { - "name": "--color-activated", - "annotation": "prop", - "docs": "Text color of the button when pressed" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Text color of the button when focused with the tab key" - }, - { - "name": "--color-hover", - "annotation": "prop", - "docs": "Text color of the button on hover" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the button" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the button" - }, - { - "name": "--ripple-color", - "annotation": "prop", - "docs": "Color of the button ripple effect" - }, - { - "name": "--transition", - "annotation": "prop", - "docs": "Transition of the button" - } - ], - "slots": [], - "parts": [ - { - "name": "close-icon", - "docs": "The close icon that is displayed when a fab list opens (uses ion-icon)." - }, - { - "name": "native", - "docs": "The native HTML button or anchor element that wraps all child elements." - } - ], - "dependents": [], - "dependencies": [ - "ion-icon", - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-fab-button": [ - "ion-icon", - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/fab-list/fab-list.tsx", - "encapsulation": "shadow", - "tag": "ion-fab-list", - "readme": "# ion-fab-list\n\nThe `ion-fab-list` element is a container for multiple fab buttons. This collection of fab buttons contains actions related to the main fab button and is flung out on click. To specify what side the buttons should appear on, set the `side` property to 'start', 'end', 'top', 'bottom'\n", - "docs": "The `ion-fab-list` element is a container for multiple fab buttons. This collection of fab buttons contains actions related to the main fab button and is flung out on click. To specify what side the buttons should appear on, set the `side` property to 'start', 'end', 'top', 'bottom'", - "docsTags": [], - "usage": { - "angular": "```html\n\n Share\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n```\n", - "javascript": "```html\n\n Share\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonFab, IonFabButton, IonFabList, IonContent, IonIcon } from '@ionic/react';\nimport { logoFacebook, logoTwitter, logoYoutube, logoPwa, logoNpm, logoIonic, logoGithub, logoJavascript, logoAngular, logoVimeo, logoChrome, logoReact } from 'ionicons/icons';\n\nexport const FabListExample: React.FC = () => (\n \n \n Share\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'fab-list-example',\n styleUrl: 'fab-list-example.css'\n})\nexport class FabListExample {\n render() {\n return [\n \n Share\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "activated", - "type": "boolean", - "mutable": false, - "attr": "activated", - "reflectToAttr": false, - "docs": "If `true`, the fab list will show all fab buttons in the list.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "side", - "type": "\"bottom\" | \"end\" | \"start\" | \"top\"", - "mutable": false, - "attr": "side", - "reflectToAttr": false, - "docs": "The side the fab list will show on relative to the main fab button.", - "docsTags": [], - "default": "'bottom'", - "values": [ - { - "value": "bottom", - "type": "string" - }, - { - "value": "end", - "type": "string" - }, - { - "value": "start", - "type": "string" - }, - { - "value": "top", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/footer/footer.tsx", - "encapsulation": "none", - "tag": "ion-footer", - "readme": "# ion-footer\n\nFooter is a root component of a page that sits at the bottom of the page.\nFooter can be a wrapper for ion-toolbar to make sure the content area is sized correctly.\n\n## Fade Footer\n\nThe `collapse` property can be set to `'fade'` on a page's `ion-footer` to have the background color of the toolbars fade in as users scroll. This provides the same fade effect that is found in many native iOS applications.\n", - "docs": "Footer is a root component of a page that sits at the bottom of the page.\nFooter can be a wrapper for ion-toolbar to make sure the content area is sized correctly.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n\n\n\n \n Footer - No Border\n \n\n\n\n \n Footer\n \n\n\n\n\n \n Footer\n \n\n```\n", - "javascript": "```html\n\n\n\n\n \n Footer - No Border\n \n\n\n\n \n Footer\n \n\n\n\n\n \n Footer\n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonFooter, IonToolbar, IonTitle } from '@ionic/react';\n\nexport const FooterExample: React.FC = () => (\n <>\n \n \n {/*-- Footer without a border --*/}\n \n \n Footer - No Border\n \n \n\n \n \n Footer\n \n \n \n {/*-- Fade Footer --*/}\n \n \n Footer\n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'footer-example',\n styleUrl: 'footer-example.css'\n})\nexport class FooterExample {\n render() {\n return [\n ,\n\n {/*-- Footer without a border --*/}\n \n \n Footer - No Border\n \n ,\n\n \n \n Footer\n \n ,\n \n {/*-- Fade Footer --*/}\n \n \n Footer\n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "collapse", - "type": "\"fade\" | undefined", - "mutable": false, - "attr": "collapse", - "reflectToAttr": false, - "docs": "Describes the scroll effect that will be applied to the footer.\nOnly applies in iOS mode.", - "docsTags": [], - "values": [ - { - "value": "fade", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the footer will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n\nNote: In order to scroll content behind the footer, the `fullscreen`\nattribute needs to be set on the content.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/grid/grid.tsx", - "encapsulation": "shadow", - "tag": "ion-grid", - "readme": "# ion-grid\n\n\nThe grid is a powerful mobile-first flexbox system for building custom layouts.\n\nIt is composed of three units — a grid, [row(s)](../row) and [column(s)](../col). Columns will expand to fill the row, and will resize to fit additional columns. It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized using CSS.\n\nSee the [Responsive Grid documentation](/docs/layout/grid) for more information.\n", - "docs": "The grid is a powerful mobile-first flexbox system for building custom layouts.\n\nIt is composed of three units — a grid, [row(s)](../row) and [column(s)](../col). Columns will expand to fill the row, and will resize to fit additional columns. It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized using CSS.\n\nSee the [Responsive Grid documentation](/docs/layout/grid) for more information.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n \n ion-col\n \n \n ion-col\n \n \n ion-col\n \n \n ion-col\n \n \n\n \n \n ion-col [size=\"6\"]\n \n \n ion-col\n \n \n ion-col\n \n \n\n \n \n ion-col [size=\"3\"]\n \n \n ion-col\n \n \n ion-col [size=\"3\"]\n \n \n\n \n \n ion-col [size=\"3\"]\n \n \n ion-col [size=\"3\"] [offset=\"3\"]\n \n \n\n \n \n ion-col\n \n \n ion-col\n
#\n
\n \n ion-col\n
#\n
#\n
\n \n ion-col\n
#\n
#\n
#\n
\n
\n\n \n \n ion-col [start]\n \n \n ion-col [center]\n \n \n ion-col [end]\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [start] ion-col\n \n \n [start] ion-col\n \n \n [start] ion-col [end]\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [center] ion-col\n \n \n [center] ion-col\n \n \n [center] ion-col\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [end] ion-col\n \n \n [end] ion-col [start]\n \n \n [end] ion-col\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n\n \n \n ion-col [size=\"6\"] [size-lg] [offset=\"3\"]\n \n \n ion-col [size=\"3\"] [size-lg]\n \n \n
\n```", - "javascript": "```html\n\n \n \n ion-col\n \n \n ion-col\n \n \n ion-col\n \n \n ion-col\n \n \n\n \n \n ion-col [size=\"6\"]\n \n \n ion-col\n \n \n ion-col\n \n \n\n \n \n ion-col [size=\"3\"]\n \n \n ion-col\n \n \n ion-col [size=\"3\"]\n \n \n\n \n \n ion-col [size=\"3\"]\n \n \n ion-col [size=\"3\"] [offset=\"3\"]\n \n \n\n \n \n ion-col\n \n \n ion-col\n
#\n
\n \n ion-col\n
#\n
#\n
\n \n ion-col\n
#\n
#\n
#\n
\n
\n\n \n \n ion-col [start]\n \n \n ion-col [center]\n \n \n ion-col [end]\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [start] ion-col\n \n \n [start] ion-col\n \n \n [start] ion-col [end]\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [center] ion-col\n \n \n [center] ion-col\n \n \n [center] ion-col\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [end] ion-col\n \n \n [end] ion-col [start]\n \n \n [end] ion-col\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n ion-col [size=\"12\"] [size-sm]\n \n \n\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n ion-col [size=\"12\"] [size-md]\n \n \n\n \n \n ion-col [size=\"6\"] [size-lg] [offset=\"3\"]\n \n \n ion-col [size=\"3\"] [size-lg]\n \n \n
\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonGrid, IonRow, IonCol, IonContent } from '@ionic/react';\n\nexport const GridExample: React.FC = () => (\n \n \n \n ion-col\n ion-col\n ion-col\n ion-col\n \n\n \n ion-col size=\"6\"\n ion-col\n ion-col\n \n\n \n ion-col size=\"3\"\n ion-col\n ion-col size=\"3\"\n \n\n \n ion-col size=\"3\"\n \n ion-col size=\"3\" offset=\"3\"\n \n \n\n \n ion-col\n \n ion-col\n
#\n
\n \n ion-col\n
#\n
#\n
\n \n ion-col\n
#\n
#\n
#\n
\n
\n\n \n ion-col start\n ion-col center\n ion-col end\n \n ion-col\n
#\n
#\n
\n
\n\n \n start ion-col\n start ion-col\n start ion-col end\n \n ion-col\n
#\n
#\n
\n
\n\n \n center ion-col\n center ion-col\n center ion-col\n \n ion-col\n
#\n
#\n
\n
\n\n \n end ion-col\n end ion-col start\n end ion-col\n \n ion-col\n
#\n
#\n
\n
\n\n \n \n ion-col size=\"12\" size-sm\n \n \n ion-col size=\"12\" size-sm\n \n \n ion-col size=\"12\" size-sm\n \n \n ion-col size=\"12\" size-sm\n \n \n\n \n \n ion-col size=\"12\" size-md\n \n \n ion-col size=\"12\" size-md\n \n \n ion-col size=\"12\" size-md\n \n \n ion-col size=\"12\" size-md\n \n \n\n \n \n ion-col size=\"6\" size-lg offset=\"3\"\n \n \n ion-col size=\"3\" size-lg\n \n \n
\n
\n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'grid-example',\n styleUrl: 'grid-example.css'\n})\nexport class GridExample {\n render() {\n return [\n \n \n \n ion-col\n \n \n ion-col\n \n \n ion-col\n \n \n ion-col\n \n \n\n \n \n ion-col [size=\"6\"]\n \n \n ion-col\n \n \n ion-col\n \n \n\n \n \n ion-col [size=\"3\"]\n \n \n ion-col\n \n \n ion-col [size=\"3\"]\n \n \n\n \n \n ion-col [size=\"3\"]\n \n \n ion-col [size=\"3\"] [offset=\"3\"]\n \n \n\n \n \n ion-col\n \n \n ion-col\n
#\n
\n \n ion-col\n
#\n
#\n
\n \n ion-col\n
#\n
#\n
#\n
\n
\n\n \n \n ion-col [start]\n \n \n ion-col [center]\n \n \n ion-col [end]\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [start] ion-col\n \n \n [start] ion-col\n \n \n [start] ion-col [end]\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [center] ion-col\n \n \n [center] ion-col\n \n \n [center] ion-col\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n [end] ion-col\n \n \n [end] ion-col [start]\n \n \n [end] ion-col\n \n \n ion-col\n
#\n
#\n
\n
\n\n \n \n ion-col [size=\"12\"] [sizeSm]\n \n \n ion-col [size=\"12\"] [sizeSm]\n \n \n ion-col [size=\"12\"] [sizeSm]\n \n \n ion-col [size=\"12\"] [sizeSm]\n \n \n\n \n \n ion-col [size=\"12\"] [sizeMd]\n \n \n ion-col [size=\"12\"] [sizeMd]\n \n \n ion-col [size=\"12\"] [sizeMd]\n \n \n ion-col [size=\"12\"] [sizeMd]\n \n \n\n \n \n ion-col [size=\"6\"] [sizeLg] [offset=\"3\"]\n \n \n ion-col [size=\"3\"] [sizeLg]\n \n \n
\n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "fixed", - "type": "boolean", - "mutable": false, - "attr": "fixed", - "reflectToAttr": false, - "docs": "If `true`, the grid will have a fixed width based on the screen size.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--ion-grid-padding", - "annotation": "prop", - "docs": "Padding for the Grid" - }, - { - "name": "--ion-grid-padding-lg", - "annotation": "prop", - "docs": "Padding for the Grid on lg screens" - }, - { - "name": "--ion-grid-padding-md", - "annotation": "prop", - "docs": "Padding for the Grid on md screens" - }, - { - "name": "--ion-grid-padding-sm", - "annotation": "prop", - "docs": "Padding for the Grid on sm screens" - }, - { - "name": "--ion-grid-padding-xl", - "annotation": "prop", - "docs": "Padding for the Grid on xl screens" - }, - { - "name": "--ion-grid-padding-xs", - "annotation": "prop", - "docs": "Padding for the Grid on xs screens" - }, - { - "name": "--ion-grid-width", - "annotation": "prop", - "docs": "Width of the fixed Grid" - }, - { - "name": "--ion-grid-width-lg", - "annotation": "prop", - "docs": "Width of the fixed Grid on lg screens" - }, - { - "name": "--ion-grid-width-md", - "annotation": "prop", - "docs": "Width of the fixed Grid on md screens" - }, - { - "name": "--ion-grid-width-sm", - "annotation": "prop", - "docs": "Width of the fixed Grid on sm screens" - }, - { - "name": "--ion-grid-width-xl", - "annotation": "prop", - "docs": "Width of the fixed Grid on xl screens" - }, - { - "name": "--ion-grid-width-xs", - "annotation": "prop", - "docs": "Width of the fixed Grid on xs screens" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/header/header.tsx", - "encapsulation": "none", - "tag": "ion-header", - "readme": "# ion-header\n\nHeader is a parent component that holds the toolbar component.\nIt's important to note that ion-header needs to be the one of the three root elements of a page\n\n## Fade Header\n\nThe `collapse` property can be set to `'fade'` on a page's main `ion-header` to have the background color of the toolbars fade in as users scroll. This provides the same fade effect that is found in many native iOS applications.\n\nThis functionality can be combined with [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles) as well. The `collapse=\"condense\"` value should be set on the `ion-header` inside of your `ion-content`. The `collapse=\"fade\"` value should be set on the `ion-header` outside of your `ion-content`.\n\n", - "docs": "Header is a parent component that holds the toolbar component.\nIt's important to note that ion-header needs to be the one of the three root elements of a page", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n \n \n \n \n My Navigation Bar\n \n\n \n Subheader\n \n\n\n\n\n \n Header - No Border\n \n\n\n\n \n \n My Navigation Bar\n \n \n\n\n\n\n \n Header\n \n\n\n\n \n \n Header\n \n \n\n```\n", - "javascript": "```html\n\n \n \n \n \n My Navigation Bar\n \n\n \n Subheader\n \n\n\n\n\n \n Header - No Border\n \n\n\n\n \n \n My Navigation Bar\n \n \n\n\n\n\n \n Header\n \n\n\n\n \n \n Header\n \n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonHeader, IonContent, IonToolbar, IonButtons, IonBackButton, IonTitle } from '@ionic/react';\n\nexport const HeaderExample: React.FC = () => (\n <>\n \n \n \n \n \n My Navigation Bar\n \n \n \n Subheader\n \n \n \n {/*-- Header without a border --*/}\n \n \n Header - No Border\n \n \n \n \n \n \n My Navigation Bar\n \n \n \n \n {/*-- Fade Header with collapse header --*/}\n \n \n Header\n \n \n \n \n \n \n Header\n \n \n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'header-example',\n styleUrl: 'header-example.css'\n})\nexport class HeaderExample {\n render() {\n return [\n \n \n \n \n \n My Navigation Bar\n \n\n \n Subheader\n \n ,\n\n {/*-- Header without a border --*/}\n \n \n Header - No Border\n \n ,\n\n \n \n \n My Navigation Bar\n \n \n ,\n \n {/*-- Fade Header with collapse header --*/}\n \n \n Header\n \n \n \n \n \n \n Header\n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "collapse", - "type": "\"condense\" | \"fade\" | undefined", - "mutable": false, - "attr": "collapse", - "reflectToAttr": false, - "docs": "Describes the scroll effect that will be applied to the header.\nOnly applies in iOS mode.\n\nTypically used for [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles)", - "docsTags": [], - "values": [ - { - "value": "condense", - "type": "string" - }, - { - "value": "fade", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the header will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n\nNote: In order to scroll content behind the header, the `fullscreen`\nattribute needs to be set on the content.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/img/img.tsx", - "encapsulation": "shadow", - "tag": "ion-img", - "readme": "# ion-img\n\nImg is a tag that will lazily load an image when ever the tag is in the viewport. This is extremely useful when generating a large list as images are only loaded when they're visible. The component uses [Intersection Observer](https://caniuse.com/#feat=intersectionobserver) internally, which is supported in most modern browser, but falls back to a `setTimeout` when it is not supported.\n\n", - "docs": "Img is a tag that will lazily load an image when ever the tag is in the viewport. This is extremely useful when generating a large list as images are only loaded when they're visible. The component uses [Intersection Observer](https://caniuse.com/#feat=intersectionobserver) internally, which is supported in most modern browser, but falls back to a `setTimeout` when it is not supported.", - "docsTags": [ - { - "name": "part", - "text": "image - The inner `img` element." - } - ], - "usage": { - "angular": "```html\n\n \n \n \n \n {{item.text}}\n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonList, IonItem, IonThumbnail, IonImg, IonLabel, IonContent } from '@ionic/react';\n\ntype Item = {\n src: string;\n text: string;\n};\nconst items: Item[] = [{ src: 'http://placekitten.com/g/200/300', text: 'a picture of a cat' }];\n\nexport const ImgExample: React.FC = () => (\n \n \n {items.map((image, i) => (\n \n \n \n \n {image.text}\n \n ))}\n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'img-example',\n styleUrl: 'img-example.css'\n})\nexport class ImgExample {\n private items = [{\n 'text': 'Item 1',\n 'src': '/path/to/external/file.png'\n }, {\n 'text': 'Item 2',\n 'src': '/path/to/external/file.png'\n }, {\n 'text': 'Item 3',\n 'src': '/path/to/external/file.png'\n }];\n\n render() {\n return [\n \n {this.items.map(item =>\n \n \n \n \n {item.text}\n \n )}\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "alt", - "type": "string | undefined", - "mutable": false, - "attr": "alt", - "reflectToAttr": false, - "docs": "This attribute defines the alternative text describing the image.\nUsers will see this text displayed if the image URL is wrong,\nthe image is not in one of the supported formats, or if the image is not yet downloaded.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "src", - "type": "string | undefined", - "mutable": false, - "attr": "src", - "reflectToAttr": false, - "docs": "The image URL. This attribute is mandatory for the `` element.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionError", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the img fails to load", - "docsTags": [] - }, - { - "event": "ionImgDidLoad", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the image has finished loading", - "docsTags": [] - }, - { - "event": "ionImgWillLoad", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the img src has been set", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [ - { - "name": "image", - "docs": "The inner `img` element." - } - ], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/infinite-scroll/infinite-scroll.tsx", - "encapsulation": "none", - "tag": "ion-infinite-scroll", - "readme": "# ion-infinite-scroll\n\nThe Infinite Scroll component calls an action to be performed when the user scrolls a specified distance from the bottom or top of the page.\n\nThe expression assigned to the `ionInfinite` event is called when the user reaches that defined distance. When this expression has finished any and all tasks, it should call the `complete()` method on the infinite scroll instance.\n\n## Infinite Scroll Content\n\nThe `ion-infinite-scroll` component has the infinite scroll logic. It requires a child component in order to display content. Ionic uses its `ion-infinite-scroll-content` component by default. This component displays the infinite scroll and changes the look depending on the infinite scroll's state. It displays a spinner that looks best based on the platform the user is on. However, the default spinner can be changed and text can be added by setting properties on the `ion-infinite-scroll-content` component.\n\n## Custom Content\n\nSeparating the `ion-infinite-scroll` and `ion-infinite-scroll-content` components allows developers to create their own content components, if desired. This content can contain anything, from an SVG element to elements with unique CSS animations.\n\n## Interfaces\n\n### InfiniteScrollCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface InfiniteScrollCustomEvent extends CustomEvent {\n target: HTMLIonInfiniteScrollElement;\n}\n```\n", - "docs": "The Infinite Scroll component calls an action to be performed when the user scrolls a specified distance from the bottom or top of the page.\n\nThe expression assigned to the `ionInfinite` event is called when the user reaches that defined distance. When this expression has finished any and all tasks, it should call the `complete()` method on the infinite scroll instance.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n Toggle Infinite Scroll\n \n\n \n\n \n \n \n \n\n```\n\n```typescript\nimport { Component, ViewChild } from '@angular/core';\nimport { IonInfiniteScroll } from '@ionic/angular';\n\n@Component({\n selector: 'infinite-scroll-example',\n templateUrl: 'infinite-scroll-example.html',\n styleUrls: ['./infinite-scroll-example.css']\n})\nexport class InfiniteScrollExample {\n @ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;\n\n constructor() {}\n\n loadData(event) {\n setTimeout(() => {\n console.log('Done');\n event.target.complete();\n\n // App logic to determine if all data is loaded\n // and disable the infinite scroll\n if (data.length === 1000) {\n event.target.disabled = true;\n }\n }, 500);\n }\n\n toggleInfiniteScroll() {\n this.infiniteScroll.disabled = !this.infiniteScroll.disabled;\n }\n}\n```\n", - "javascript": "```html\n\n \n Toggle Infinite Scroll\n \n\n \n\n \n \n \n \n\n```\n\n```javascript\nconst infiniteScroll = document.getElementById('infinite-scroll');\n\ninfiniteScroll.addEventListener('ionInfinite', function(event) {\n setTimeout(function() {\n console.log('Done');\n event.target.complete();\n\n // App logic to determine if all data is loaded\n // and disable the infinite scroll\n if (data.length === 1000) {\n event.target.disabled = true;\n }\n }, 500);\n});\n\nfunction toggleInfiniteScroll() {\n infiniteScroll.disabled = !infiniteScroll.disabled;\n}\n```\n", - "react": "```tsx\nimport { \n IonButton,\n IonContent, \n IonHeader,\n IonInfiniteScroll, \n IonInfiniteScrollContent, \n IonItem,\n IonLabel,\n IonList, \n IonPage, \n IonTitle, \n IonToolbar,\n useIonViewWillEnter\n} from '@ionic/react';\nimport { useState } from 'react';\n\nconst InfiniteScrollExample: React.FC = () => {\n const [data, setData] = useState([]);\n const [isInfiniteDisabled, setInfiniteDisabled] = useState(false);\n \n const pushData = () => {\n const max = data.length + 20;\n const min = max - 20;\n const newData = [];\n for (let i = min; i < max; i++) {\n newData.push('Item' + i);\n }\n \n setData([\n ...data,\n ...newData\n ]);\n }\n const loadData = (ev: any) => {\n setTimeout(() => {\n pushData();\n console.log('Loaded data');\n ev.target.complete();\n if (data.length === 1000) {\n setInfiniteDisabled(true);\n }\n }, 500);\n } \n \n useIonViewWillEnter(() => {\n pushData();\n });\n \n return (\n \n \n \n Blank\n \n \n \n \n \n Blank\n \n \n \n setInfiniteDisabled(!isInfiniteDisabled)} expand=\"block\">\n Toggle Infinite Scroll\n \n \n \n {data.map((item, index) => {\n return (\n \n {item}\n \n )\n })}\n \n \n \n \n \n \n \n );\n};\n\nexport default InfiniteScrollExample;\n```", - "stencil": "```tsx\nimport { Component, State, h } from '@stencil/core';\n\n@Component({\n tag: 'infinite-scroll-example',\n styleUrl: 'infinite-scroll-example.css'\n})\nexport class InfiniteScrollExample {\n private infiniteScroll: HTMLIonInfiniteScrollElement;\n\n @State() data = [];\n\n componentWillLoad() {\n this.pushData();\n }\n\n pushData() {\n const max = this.data.length + 20;\n const min = max - 20;\n\n for (var i = min; i < max; i++) {\n this.data.push('Item ' + i);\n }\n\n // Stencil does not re-render when pushing to an array\n // so create a new copy of the array\n // https://stenciljs.com/docs/reactive-data#handling-arrays-and-objects\n this.data = [\n ...this.data\n ];\n }\n\n loadData(ev) {\n setTimeout(() => {\n this.pushData();\n console.log('Loaded data');\n ev.target.complete();\n\n // App logic to determine if all data is loaded\n // and disable the infinite scroll\n if (this.data.length === 1000) {\n ev.target.disabled = true;\n }\n }, 500);\n }\n\n toggleInfiniteScroll() {\n this.infiniteScroll.disabled = !this.infiniteScroll.disabled;\n }\n\n render() {\n return [\n \n this.toggleInfiniteScroll()} expand=\"block\">\n Toggle Infinite Scroll\n \n\n \n {this.data.map(item =>\n \n {item}\n \n )}\n \n\n this.infiniteScroll = el}\n onIonInfinite={(ev) => this.loadData(ev)}>\n \n \n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the infinite scroll will be hidden and scroll event listeners\nwill be removed.\n\nSet this to true to disable the infinite scroll from actively\ntrying to receive new data while scrolling. This is useful\nwhen it is known that there is no more data that can be added, and\nthe infinite scroll is no longer needed.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "position", - "type": "\"bottom\" | \"top\"", - "mutable": false, - "attr": "position", - "reflectToAttr": false, - "docs": "The position of the infinite scroll element.\nThe value can be either `top` or `bottom`.", - "docsTags": [], - "default": "'bottom'", - "values": [ - { - "value": "bottom", - "type": "string" - }, - { - "value": "top", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "threshold", - "type": "string", - "mutable": false, - "attr": "threshold", - "reflectToAttr": false, - "docs": "The threshold distance from the bottom\nof the content to call the `infinite` output event when scrolled.\nThe threshold value can be either a percent, or\nin pixels. For example, use the value of `10%` for the `infinite`\noutput event to get called when the user has scrolled 10%\nfrom the bottom of the page. Use the value `100px` when the\nscroll is within 100 pixels from the bottom of the page.", - "docsTags": [], - "default": "'15%'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "complete", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "complete() => Promise", - "parameters": [], - "docs": "Call `complete()` within the `ionInfinite` output event handler when\nyour async operation has completed. For example, the `loading`\nstate is while the app is performing an asynchronous operation,\nsuch as receiving more data from an AJAX request to add more items\nto a data list. Once the data has been received and UI updated, you\nthen call this method to signify that the loading has completed.\nThis method will change the infinite scroll's state from `loading`\nto `enabled`.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionInfinite", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the scroll reaches\nthe threshold distance. From within your infinite handler,\nyou must call the infinite scroll's `complete()` method when\nyour async operation has completed.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/infinite-scroll-content/infinite-scroll-content.tsx", - "encapsulation": "none", - "tag": "ion-infinite-scroll-content", - "readme": "# ion-infinite-scroll-content\n\nThe `ion-infinite-scroll-content` component is the default child used by the `ion-infinite-scroll`. It displays an infinite scroll spinner that looks best based on the platform and changes the look depending on the infinite scroll's state. The default spinner can be changed and text can be added by setting the `loadingSpinner` and `loadingText` properties.\n", - "docs": "The `ion-infinite-scroll-content` component is the default child used by the `ion-infinite-scroll`. It displays an infinite scroll spinner that looks best based on the platform and changes the look depending on the infinite scroll's state. The default spinner can be changed and text can be added by setting the `loadingSpinner` and `loadingText` properties.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n \n \n \n\n```\n", - "javascript": "```html\n\n \n \n \n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonInfiniteScroll, IonInfiniteScrollContent } from '@ionic/react';\n\nexport const InfiniteScrollExample: React.FC = () => (\n \n \n \n \n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'infinite-scroll-content-example',\n styleUrl: 'infinite-scroll-content-example.css'\n})\nexport class InfiniteScrollContentExample {\n render() {\n return [\n \n \n \n \n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "accept", - "type": "string | undefined", - "mutable": false, - "attr": "accept", - "reflectToAttr": false, - "docs": "If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "autocapitalize", - "type": "string", - "mutable": false, - "attr": "autocapitalize", - "reflectToAttr": false, - "docs": "Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\nAvailable options: `\"off\"`, `\"none\"`, `\"on\"`, `\"sentences\"`, `\"words\"`, `\"characters\"`.", - "docsTags": [], - "default": "'off'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "autocomplete", - "type": "\"off\" | \"on\" | \"name\" | \"honorific-prefix\" | \"given-name\" | \"additional-name\" | \"family-name\" | \"honorific-suffix\" | \"nickname\" | \"email\" | \"username\" | \"new-password\" | \"current-password\" | \"one-time-code\" | \"organization-title\" | \"organization\" | \"street-address\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"address-level4\" | \"address-level3\" | \"address-level2\" | \"address-level1\" | \"country\" | \"country-name\" | \"postal-code\" | \"cc-name\" | \"cc-given-name\" | \"cc-additional-name\" | \"cc-family-name\" | \"cc-number\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-csc\" | \"cc-type\" | \"transaction-currency\" | \"transaction-amount\" | \"language\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"sex\" | \"tel\" | \"tel-country-code\" | \"tel-national\" | \"tel-area-code\" | \"tel-local\" | \"tel-extension\" | \"impp\" | \"url\" | \"photo\"", - "mutable": false, - "attr": "autocomplete", - "reflectToAttr": false, - "docs": "Indicates whether the value of the control can be automatically completed by the browser.", - "docsTags": [], - "default": "'off'", - "values": [ - { - "value": "off", - "type": "string" - }, - { - "value": "on", - "type": "string" - }, - { - "value": "name", - "type": "string" - }, - { - "value": "honorific-prefix", - "type": "string" - }, - { - "value": "given-name", - "type": "string" - }, - { - "value": "additional-name", - "type": "string" - }, - { - "value": "family-name", - "type": "string" - }, - { - "value": "honorific-suffix", - "type": "string" - }, - { - "value": "nickname", - "type": "string" - }, - { - "value": "email", - "type": "string" - }, - { - "value": "username", - "type": "string" - }, - { - "value": "new-password", - "type": "string" - }, - { - "value": "current-password", - "type": "string" - }, - { - "value": "one-time-code", - "type": "string" - }, - { - "value": "organization-title", - "type": "string" - }, - { - "value": "organization", - "type": "string" - }, - { - "value": "street-address", - "type": "string" - }, - { - "value": "address-line1", - "type": "string" - }, - { - "value": "address-line2", - "type": "string" - }, - { - "value": "address-line3", - "type": "string" - }, - { - "value": "address-level4", - "type": "string" - }, - { - "value": "address-level3", - "type": "string" - }, - { - "value": "address-level2", - "type": "string" - }, - { - "value": "address-level1", - "type": "string" - }, - { - "value": "country", - "type": "string" - }, - { - "value": "country-name", - "type": "string" - }, - { - "value": "postal-code", - "type": "string" - }, - { - "value": "cc-name", - "type": "string" - }, - { - "value": "cc-given-name", - "type": "string" - }, - { - "value": "cc-additional-name", - "type": "string" - }, - { - "value": "cc-family-name", - "type": "string" - }, - { - "value": "cc-number", - "type": "string" - }, - { - "value": "cc-exp", - "type": "string" - }, - { - "value": "cc-exp-month", - "type": "string" - }, - { - "value": "cc-exp-year", - "type": "string" - }, - { - "value": "cc-csc", - "type": "string" - }, - { - "value": "cc-type", - "type": "string" - }, - { - "value": "transaction-currency", - "type": "string" - }, - { - "value": "transaction-amount", - "type": "string" - }, - { - "value": "language", - "type": "string" - }, - { - "value": "bday", - "type": "string" - }, - { - "value": "bday-day", - "type": "string" - }, - { - "value": "bday-month", - "type": "string" - }, - { - "value": "bday-year", - "type": "string" - }, - { - "value": "sex", - "type": "string" - }, - { - "value": "tel", - "type": "string" - }, - { - "value": "tel-country-code", - "type": "string" - }, - { - "value": "tel-national", - "type": "string" - }, - { - "value": "tel-area-code", - "type": "string" - }, - { - "value": "tel-local", - "type": "string" - }, - { - "value": "tel-extension", - "type": "string" - }, - { - "value": "impp", - "type": "string" - }, - { - "value": "url", - "type": "string" - }, - { - "value": "photo", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "autocorrect", - "type": "\"off\" | \"on\"", - "mutable": false, - "attr": "autocorrect", - "reflectToAttr": false, - "docs": "Whether auto correction should be enabled when the user is entering/editing the text value.", - "docsTags": [], - "default": "'off'", - "values": [ - { - "value": "off", - "type": "string" - }, - { - "value": "on", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "autofocus", - "type": "boolean", - "mutable": false, - "attr": "autofocus", - "reflectToAttr": false, - "docs": "This Boolean attribute lets you specify that a form control should have input focus when the page loads.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "clearInput", - "type": "boolean", - "mutable": false, - "attr": "clear-input", - "reflectToAttr": false, - "docs": "If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "clearOnEdit", - "type": "boolean | undefined", - "mutable": false, - "attr": "clear-on-edit", - "reflectToAttr": false, - "docs": "If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "debounce", - "type": "number", - "mutable": false, - "attr": "debounce", - "reflectToAttr": false, - "docs": "Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the input.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "enterkeyhint", - "type": "\"done\" | \"enter\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined", - "mutable": false, - "attr": "enterkeyhint", - "reflectToAttr": false, - "docs": "A hint to the browser for which enter key to display.\nPossible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n`\"previous\"`, `\"search\"`, and `\"send\"`.", - "docsTags": [], - "values": [ - { - "value": "done", - "type": "string" - }, - { - "value": "enter", - "type": "string" - }, - { - "value": "go", - "type": "string" - }, - { - "value": "next", - "type": "string" - }, - { - "value": "previous", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "send", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "inputmode", - "type": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\" | undefined", - "mutable": false, - "attr": "inputmode", - "reflectToAttr": false, - "docs": "A hint to the browser for which keyboard to display.\nPossible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n`\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.", - "docsTags": [], - "values": [ - { - "value": "decimal", - "type": "string" - }, - { - "value": "email", - "type": "string" - }, - { - "value": "none", - "type": "string" - }, - { - "value": "numeric", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "tel", - "type": "string" - }, - { - "value": "text", - "type": "string" - }, - { - "value": "url", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "max", - "type": "number | string | undefined", - "mutable": false, - "attr": "max", - "reflectToAttr": false, - "docs": "The maximum value, which must not be less than its minimum (min attribute) value.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "maxlength", - "type": "number | undefined", - "mutable": false, - "attr": "maxlength", - "reflectToAttr": false, - "docs": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "min", - "type": "number | string | undefined", - "mutable": false, - "attr": "min", - "reflectToAttr": false, - "docs": "The minimum value, which must not be greater than its maximum (max attribute) value.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "minlength", - "type": "number | undefined", - "mutable": false, - "attr": "minlength", - "reflectToAttr": false, - "docs": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "multiple", - "type": "boolean | undefined", - "mutable": false, - "attr": "multiple", - "reflectToAttr": false, - "docs": "If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "this.inputId", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "pattern", - "type": "string | undefined", - "mutable": false, - "attr": "pattern", - "reflectToAttr": false, - "docs": "A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise it is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support the `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "placeholder", - "type": "string | undefined", - "mutable": false, - "attr": "placeholder", - "reflectToAttr": false, - "docs": "Instructional text that shows before the input has a value.\nThis property applies only when the `type` property is set to `\"email\"`,\n`\"number\"`, `\"password\"`, `\"search\"`, `\"tel\"`, `\"text\"`, or `\"url\"`, otherwise it is ignored.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "readonly", - "type": "boolean", - "mutable": false, - "attr": "readonly", - "reflectToAttr": false, - "docs": "If `true`, the user cannot modify the value.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "required", - "type": "boolean", - "mutable": false, - "attr": "required", - "reflectToAttr": false, - "docs": "If `true`, the user must fill in a value before submitting a form.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "size", - "type": "number | undefined", - "mutable": false, - "attr": "size", - "reflectToAttr": false, - "docs": "The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "spellcheck", - "type": "boolean", - "mutable": false, - "attr": "spellcheck", - "reflectToAttr": false, - "docs": "If `true`, the element will have its spelling and grammar checked.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "step", - "type": "string | undefined", - "mutable": false, - "attr": "step", - "reflectToAttr": false, - "docs": "Works with the min and max attributes to limit the increments at which a value can be set.\nPossible values are: `\"any\"` or a positive floating point number.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "type", - "type": "\"date\" | \"datetime-local\" | \"email\" | \"month\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"time\" | \"url\" | \"week\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of control to display. The default type is text.", - "docsTags": [], - "default": "'text'", - "values": [ - { - "value": "date", - "type": "string" - }, - { - "value": "datetime-local", - "type": "string" - }, - { - "value": "email", - "type": "string" - }, - { - "value": "month", - "type": "string" - }, - { - "value": "number", - "type": "string" - }, - { - "value": "password", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "tel", - "type": "string" - }, - { - "value": "text", - "type": "string" - }, - { - "value": "time", - "type": "string" - }, - { - "value": "url", - "type": "string" - }, - { - "value": "week", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "null | number | string | undefined", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "The value of the input.", - "docsTags": [], - "default": "''", - "values": [ - { - "type": "null" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "getInputElement", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getInputElement() => Promise", - "parameters": [], - "docs": "Returns the native `` element used under the hood.", - "docsTags": [] - }, - { - "name": "setFocus", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "setFocus() => Promise", - "parameters": [], - "docs": "Sets focus on the native `input` in `ion-input`. Use this method instead of the global\n`input.focus()`.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionBlur", - "detail": "FocusEvent", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the input loses focus.", - "docsTags": [] - }, - { - "event": "ionChange", - "detail": "InputChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value has changed.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "FocusEvent", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the input has focus.", - "docsTags": [] - }, - { - "event": "ionInput", - "detail": "InputEvent", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when a keyboard input occurred.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the input" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the input text" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the input" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the input" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the input" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the input" - }, - { - "name": "--placeholder-color", - "annotation": "prop", - "docs": "Color of the input placeholder text" - }, - { - "name": "--placeholder-font-style", - "annotation": "prop", - "docs": "Font style of the input placeholder text" - }, - { - "name": "--placeholder-font-weight", - "annotation": "prop", - "docs": "Font weight of the input placeholder text" - }, - { - "name": "--placeholder-opacity", - "annotation": "prop", - "docs": "Opacity of the input placeholder text" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/item/item.tsx", - "encapsulation": "shadow", - "tag": "ion-item", - "readme": "# ion-item\n\nItems are elements that can contain text, icons, avatars, images, inputs, and any other native or custom elements. Generally they are placed in a list with other items. Items can be swiped, deleted, reordered, edited, and more.\n\n## Clickable Items\n\nAn item is considered \"clickable\" if it has an `href` or `button` property set. Clickable items have a few visual differences that indicate they can be interacted with. For example, a clickable item receives the ripple effect upon activation in `md` mode, has a highlight when activated in `ios` mode, and has a [detail arrow](#detail-arrows) by default in `ios` mode.\n\n## Detail Arrows\n\nBy default [clickable items](#clickable-items) will display a right arrow icon on `ios` mode. To hide the right arrow icon on clickable elements, set the `detail` property to `false`. To show the right arrow icon on an item that doesn't display it naturally, set the `detail` property to `true`.\n\n\n\n\n## Item Placement\n\nItem uses named [slots](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) in order to position content. This logic makes it possible to write a complex item with simple, understandable markup without having to worry about styling and positioning the elements.\n\nThe below chart details the item slots and where it will place the element inside of the item:\n\n| Slot | Description |\n|---------|-----------------------------------------------------------------------------|\n| `start` | Placed to the left of all other content in LTR, and to the `right` in RTL. |\n| `end` | Placed to the right of all other content in LTR, and to the `left` in RTL. |\n| none | Placed inside of the input wrapper. |\n\n\n### Text Alignment\n\nItems left align text and add an ellipsis when the text is wider than the item. See the [CSS Utilities Documentation](/docs/layout/css-utilities) for classes that can be added to `` to transform the text.\n\n\n## Input Highlight\n\n### Highlight Height\n\nItems containing an input will highlight the bottom border of the input with a different color when focused, valid, or invalid. By default, `md` items have a highlight with a height set to `2px` and `ios` has no highlight (technically the height is set to `0`). The height can be changed using the `--highlight-height` CSS property. To turn off the highlight, set this variable to `0`. For more information on setting CSS properties, see the [theming documentation](/docs/theming/css-variables).\n\n### Highlight Color\n\nThe highlight color changes based on the item state, but all of the states use Ionic colors by default. When focused, the input highlight will use the `primary` color. If the input is valid it will use the `success` color, and invalid inputs will use the `danger` color. See the [CSS Custom Properties](#css-custom-properties) section below for the highlight color variables.\n\n", - "docs": "Items are elements that can contain text, icons, avatars, images, inputs, and any other native or custom elements. Generally they are placed in a list with other items. Items can be swiped, deleted, reordered, edited, and more.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "- Content is placed between the named slots if provided without a slot." - }, - { - "name": "slot", - "text": "start - Content is placed to the left of the item text in LTR, and to the right in RTL." - }, - { - "name": "slot", - "text": "end - Content is placed to the right of the item text in LTR, and to the left in RTL." - }, - { - "name": "slot", - "text": "helper - Content is placed under the item and displayed when no error is detected." - }, - { - "name": "slot", - "text": "error - Content is placed under the item and displayed when an error is detected." - }, - { - "name": "part", - "text": "native - The native HTML button, anchor or div element that wraps all child elements." - }, - { - "name": "part", - "text": "detail-icon - The chevron icon for the item. Only applies when `detail=\"true\"`." - } - ], - "usage": { - "angular": "```html\n\n\n \n Item\n \n\n\n\n\n \n Button Item\n \n\n\n\n\n \n Anchor Item\n \n\n\n\n \n Secondary Color Item\n \n\n```\n\n### Detail Arrows\n\n```html\n\n \n Standard Item with Detail Arrow\n \n\n\n\n \n Button Item with Detail Arrow\n \n\n\n\n \n Anchor Item with no Detail Arrow\n \n\n```\n\n### List Items\n\n```html\n\n \n \n Item\n \n \n\n \n \n No Lines Item\n \n \n\n \n \n Multiline text that should wrap when it is too long\n to fit on one line in the item.\n \n \n\n \n \n \n

H3 Primary Title

\n
\n

Paragraph line 1

\n \n

Paragraph line 2 secondary

\n
\n
\n
\n\n \n \n Item with Full Lines\n \n \n\n
\n```\n\n### Item Lines\n\n```html\n\n\n Item Lines Inset\n\n\n\n\n Item Lines Full\n\n\n\n\n Item Lines None\n\n\n\n\n \n Full Lines Item 1\n \n\n \n Full Lines Item 2\n \n\n\n\n\n \n Inset Lines Item 1\n \n\n \n Inset Lines Item 2\n \n\n\n\n\n \n No lines Item 1\n \n\n \n No lines Item 2\n \n\n \n No lines Item 3\n \n\n```\n\n\n### Media Items\n\n```html\n\n \n \n \n \n Avatar Start, Button Item\n \n\n\n\n \n Thumbnail End, Anchor Item\n \n \n \n \n\n\n\n \n \n \n \n

H2 Title Text

\n

Button on right

\n
\n View\n
\n\n\n \n \n \n \n

H3 Title Text

\n

Icon on right

\n
\n \n
\n```\n\n### Buttons in Items\n\n```html\n\n \n Start\n \n Button Start/End\n \n End\n \n\n\n\n \n Start Icon\n \n \n Buttons with Icons\n \n \n End Icon\n \n\n\n\n \n \n \n Icon only Buttons\n \n \n \n\n```\n\n### Icons in Items\n\n```html\n\n \n Icon End\n \n \n\n\n\n \n Large Icon End\n \n \n\n\n\n \n Small Icon End\n \n \n\n\n\n \n \n Icon Start\n \n\n\n\n \n Two Icons End\n \n \n \n\n```\n\n### Item Inputs\n\n```html\n\n Datetime\n \n\n\n\n Select\n \n No Game Console\n NES\n Nintendo64\n PlayStation\n Sega Genesis\n Sega Saturn\n SNES\n \n\n\n\n Toggle\n \n\n\n\n Floating Input\n \n\n\n\n Input (placeholder)\n \n\n\n\n Input (Fill: Solid)\n \n\n\n\n Input (Fill: Outline)\n \n\n\n\n Helper and Error Text\n \n Helper Text\n Error Text\n\n\n\n Checkbox\n \n\n\n\n Range\n \n\n```\n", - "javascript": "```html\n\n\n \n Item\n \n\n\n\n\n \n Button Item\n \n\n\n\n\n \n Anchor Item\n \n\n\n\n \n Secondary Color Item\n \n\n```\n\n### Detail Arrows\n\n```html\n\n \n Standard Item with Detail Arrow\n \n\n\n\n \n Button Item with Detail Arrow\n \n\n\n\n \n Anchor Item with no Detail Arrow\n \n\n```\n\n### List Items\n\n```html\n\n \n \n Item\n \n \n\n \n \n No Lines Item\n \n \n\n \n \n Multiline text that should wrap when it is too long\n to fit on one line in the item.\n \n \n\n \n \n \n

H3 Primary Title

\n
\n

Paragraph line 1

\n \n

Paragraph line 2 secondary

\n
\n
\n
\n\n \n \n Item with Full Lines\n \n \n\n
\n```\n\n### Item Lines\n\n```html\n\n\n Item Lines Inset\n\n\n\n\n Item Lines Full\n\n\n\n\n Item Lines None\n\n\n\n\n \n Full Lines Item 1\n \n\n \n Full Lines Item 2\n \n\n\n\n\n \n Inset Lines Item 1\n \n\n \n Inset Lines Item 2\n \n\n\n\n\n \n No lines Item 1\n \n\n \n No lines Item 2\n \n\n \n No lines Item 3\n \n\n```\n\n\n### Media Items\n\n```html\n\n \n \n \n \n Avatar Start, Button Item\n \n\n\n\n \n Thumbnail End, Anchor Item\n \n \n \n \n\n\n\n \n \n \n \n

H2 Title Text

\n

Button on right

\n
\n View\n
\n\n\n \n \n \n \n

H3 Title Text

\n

Icon on right

\n
\n \n
\n```\n\n### Buttons in Items\n\n```html\n\n \n Start\n \n Button Start/End\n \n End\n \n\n\n\n \n Start Icon\n \n \n Buttons with Icons\n \n \n End Icon\n \n\n\n\n \n \n \n Icon only Buttons\n \n \n \n\n```\n\n### Icons in Items\n\n```html\n\n \n Icon End\n \n \n\n\n\n \n Large Icon End\n \n \n\n\n\n \n Small Icon End\n \n \n\n\n\n \n \n Icon Start\n \n\n\n\n \n Two Icons End\n \n \n \n\n```\n\n### Item Inputs\n\n```html\n\n Datetime\n \n\n\n\n Select\n \n No Game Console\n NES\n Nintendo64\n PlayStation\n Sega Genesis\n Sega Saturn\n SNES\n \n\n\n\n Toggle\n \n\n\n\n Floating Input\n \n\n\n\n Input (placeholder)\n \n\n\n\n Input (Fill: Solid)\n \n\n\n\n Input (Fill: Outline)\n \n\n\n\n Helper and Error Text\n \n Helper Text\n Error Text\n\n\n\n Checkbox\n \n\n\n\n Range\n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonItem, IonLabel, IonList, IonText, IonAvatar, IonThumbnail, IonButton, IonIcon, IonDatetime, IonSelect, IonSelectOption, IonToggle, IonInput, IonCheckbox, IonRange, IonNote } from '@ionic/react';\nimport { closeCircle, home, star, navigate, informationCircle, checkmarkCircle, shuffle } from 'ionicons/icons';\n\nexport const ItemExamples: React.FC = () => {\n return (\n \n \n \n ItemExamples\n \n \n \n {/*-- Default Item --*/}\n \n \n Item\n \n \n\n {/*-- Item as a Button --*/}\n { }}>\n \n Button Item\n \n \n\n {/*-- Item as an Anchor --*/}\n \n \n Anchor Item\n \n \n\n \n \n Secondary Color Item\n \n \n\n {/*-- Detail Arrows --*/}\n \n \n Standard Item with Detail Arrow\n \n \n\n { }} detail>\n \n Button Item with Detail Arrow\n \n \n\n \n \n Anchor Item with no Detail Arrow\n \n \n\n \n \n \n Item\n \n \n\n \n \n No Lines Item\n \n \n\n \n \n Multiline text that should wrap when it is too long\n to fit on one line in the item.\n \n \n\n \n \n \n

H3 Primary Title

\n
\n

Paragraph line 1

\n \n

Paragraph line 2 secondary

\n
\n
\n
\n\n \n \n Item with Full Lines\n \n \n
\n\n {/*-- Item Inset Lines --*/}\n \n Item Lines Inset\n \n\n {/*-- Item Full Lines --*/}\n \n Item Lines Full\n \n\n {/*-- Item None Lines --*/}\n \n Item Lines None\n \n\n {/*-- List Full Lines --*/}\n \n \n Full Lines Item 1\n \n\n \n Full Lines Item 2\n \n \n\n {/*-- List Inset Lines --*/}\n \n \n Inset Lines Item 1\n \n\n \n Inset Lines Item 2\n \n \n\n {/*-- List No Lines --*/}\n \n \n No lines Item 1\n \n\n \n No lines Item 2\n \n\n \n No lines Item 3\n \n \n\n { }}>\n \n \n \n \n Avatar Start, Button Item\n \n \n\n \n \n Thumbnail End, Anchor Item\n \n \n \n \n \n\n \n \n \n \n \n

H2 Title Text

\n

Button on right

\n
\n View\n
\n\n { }}>\n \n \n \n \n

H3 Title Text

\n

Icon on right

\n
\n \n
\n\n {/*-- Buttons in Items --*/}\n \n \n Start\n \n Button Start/End\n \n End\n \n \n\n \n \n Start Icon\n \n \n Buttons with Icons\n \n \n End Icon\n \n \n\n \n \n \n \n Icon only Buttons\n \n \n \n \n\n \n \n Icon End\n \n \n \n\n \n \n Large Icon End\n \n \n \n\n \n \n Small Icon End\n \n \n \n\n \n \n \n Icon Start\n \n \n\n \n \n Two Icons End\n \n \n \n \n\n \n Datetime\n \n \n\n \n Select\n \n No Game Console\n NES\n Nintendo64\n PlayStation\n Sega Genesis\n Sega Saturn\n SNES\n \n \n\n \n Toggle\n \n \n\n \n Floating Input\n \n \n\n \n Input (placeholder)\n \n \n\n \n Input (Fill: Solid)\n \n \n\n \n Input (Fill: Outline)\n \n \n\n \n Helper and Error Text\n \n Helper Text\n Error Text\n \n\n \n Checkbox\n \n \n\n \n Range\n \n \n
\n
\n );\n};\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n buttonClick() {\n console.log('Clicked button');\n }\n\n render() {\n return [\n // Default Item\n \n \n Item\n \n ,\n\n // Item as a Button\n this.buttonClick()}>\n \n Button Item\n \n ,\n\n // Item as an Anchor\n \n \n Anchor Item\n \n ,\n\n \n \n Secondary Color Item\n \n \n ];\n }\n}\n```\n\n### Detail Arrows\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n buttonClick() {\n console.log('Clicked button');\n }\n\n render() {\n return [\n \n \n Standard Item with Detail Arrow\n \n ,\n\n this.buttonClick()} detail>\n \n Button Item with Detail Arrow\n \n ,\n\n \n \n Anchor Item with no Detail Arrow\n \n \n ];\n }\n}\n```\n\n### List Items\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n render() {\n return [\n \n \n \n Item\n \n ,\n\n \n \n No Lines Item\n \n ,\n\n \n \n Multiline text that should wrap when it is too long\n to fit on one line in the item.\n \n ,\n\n \n \n \n

H3 Primary Title

\n
\n

Paragraph line 1

\n \n

Paragraph line 2 secondary

\n
\n
\n
,\n\n \n \n Item with Full Lines\n \n \n
\n ];\n }\n}\n```\n\n### Item Lines\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n render() {\n return [\n // Item Inset Lines\n \n Item Lines Inset\n ,\n\n // Item Full Lines\n \n Item Lines Full\n ,\n\n // Item None Lines\n \n Item Lines None\n ,\n\n // List Full Lines\n \n \n Full Lines Item 1\n \n\n \n Full Lines Item 2\n \n ,\n\n // List Inset Lines\n \n \n Inset Lines Item 1\n \n\n \n Inset Lines Item 2\n \n ,\n\n // List No Lines\n \n \n No lines Item 1\n \n\n \n No lines Item 2\n \n\n \n No lines Item 3\n \n \n ];\n }\n}\n```\n\n### Media Items\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n testClick() {\n console.log('Test click');\n }\n\n render() {\n return [\n this.testClick()}>\n \n \n \n \n Avatar Start, Button Item\n \n ,\n\n \n \n Thumbnail End, Anchor Item\n \n \n \n \n ,\n\n \n \n \n \n \n

H2 Title Text

\n

Button on right

\n
\n View\n
,\n\n this.testClick()}>\n \n \n \n \n

H3 Title Text

\n

Icon on right

\n
\n \n
\n ];\n }\n}\n```\n\n### Buttons in Items\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n render() {\n return [\n \n \n Start\n \n Button Start/End\n \n End\n \n ,\n\n \n \n Start Icon\n \n \n Buttons with Icons\n \n \n End Icon\n \n ,\n\n \n \n \n \n Icon only Buttons\n \n \n \n \n ];\n }\n}\n```\n\n### Icons in Items\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n render() {\n return [\n \n \n Icon End\n \n \n ,\n\n \n \n Large Icon End\n \n \n ,\n\n \n \n Small Icon End\n \n \n ,\n\n \n \n \n Icon Start\n \n ,\n\n \n \n Two Icons End\n \n \n \n \n ];\n }\n}\n```\n\n### Item Inputs\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-example',\n styleUrl: 'item-example.css'\n})\nexport class ItemExample {\n render() {\n return [\n \n Datetime\n \n ,\n\n \n Select\n \n No Game Console\n NES\n Nintendo64\n PlayStation\n Sega Genesis\n Sega Saturn\n SNES\n \n ,\n\n \n Toggle\n \n ,\n\n \n Floating Input\n \n ,\n\n \n Input (placeholder)\n \n ,\n\n \n Input (Fill: Solid)\n \n ,\n\n \n Input (Fill: Outline)\n \n ,\n\n \n Helper and Error Text\n \n Helper Text\n Error Text\n ,\n\n \n Checkbox\n \n ,\n\n \n Range\n \n \n ];\n }\n}\n```", - "vue": "```html\n\n```\n\n### Detail Arrows\n\n```html\n\n```\n\n### List Items\n\n```html\n\n```\n\n### Item Lines\n\n```html\n\n```\n\n\n### Media Items\n\n```html\n\n```\n\n### Buttons in Items\n\n```html\n\n```\n\n### Icons in Items\n\n```html\n\n```\n\n### Item Inputs\n\n```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "button", - "type": "boolean", - "mutable": false, - "attr": "button", - "reflectToAttr": false, - "docs": "If `true`, a button tag will be rendered and the item will be tappable.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "counter", - "type": "boolean", - "mutable": false, - "attr": "counter", - "reflectToAttr": false, - "docs": "If `true`, a character counter will display the ratio of characters used and the total character limit. Only applies when the `maxlength` property is set on the inner `ion-input` or `ion-textarea`.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "detail", - "type": "boolean | undefined", - "mutable": false, - "attr": "detail", - "reflectToAttr": false, - "docs": "If `true`, a detail arrow will appear on the item. Defaults to `false` unless the `mode`\nis `ios` and an `href` or `button` property is present.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "detailIcon", - "type": "string", - "mutable": false, - "attr": "detail-icon", - "reflectToAttr": false, - "docs": "The icon to use when `detail` is set to `true`.", - "docsTags": [], - "default": "chevronForward", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the item.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "download", - "type": "string | undefined", - "mutable": false, - "attr": "download", - "reflectToAttr": false, - "docs": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "fill", - "type": "\"outline\" | \"solid\" | undefined", - "mutable": false, - "attr": "fill", - "reflectToAttr": false, - "docs": "The fill for the item. If `'solid'` the item will have a background. If\n`'outline'` the item will be transparent with a border. Only available in `md` mode.", - "docsTags": [], - "values": [ - { - "value": "outline", - "type": "string" - }, - { - "value": "solid", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "lines", - "type": "\"full\" | \"inset\" | \"none\" | undefined", - "mutable": false, - "attr": "lines", - "reflectToAttr": false, - "docs": "How the bottom border should be displayed on the item.", - "docsTags": [], - "values": [ - { - "value": "full", - "type": "string" - }, - { - "value": "inset", - "type": "string" - }, - { - "value": "none", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition animation when navigating to\nanother page using `href`.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerDirection", - "type": "\"back\" | \"forward\" | \"root\"", - "mutable": false, - "attr": "router-direction", - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition direction when navigating to\nanother page using `href`.", - "docsTags": [], - "default": "'forward'", - "values": [ - { - "value": "back", - "type": "string" - }, - { - "value": "forward", - "type": "string" - }, - { - "value": "root", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "shape", - "type": "\"round\" | undefined", - "mutable": false, - "attr": "shape", - "reflectToAttr": false, - "docs": "The shape of the item. If \"round\" it will have increased\nborder radius.", - "docsTags": [], - "values": [ - { - "value": "round", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button. Only used when an `onclick` or `button` property is present.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [ - { - "event": "ionChange", - "capture": false, - "passive": false - }, - { - "event": "ionColor", - "capture": false, - "passive": false - }, - { - "event": "ionStyle", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the item" - }, - { - "name": "--background-activated", - "annotation": "prop", - "docs": "Background of the item when pressed. Note: setting this will interfere with the Material Design ripple." - }, - { - "name": "--background-activated-opacity", - "annotation": "prop", - "docs": "Opacity of the item background when pressed" - }, - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background of the item when focused with the tab key" - }, - { - "name": "--background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the item background when focused with the tab key" - }, - { - "name": "--background-hover", - "annotation": "prop", - "docs": "Background of the item on hover" - }, - { - "name": "--background-hover-opacity", - "annotation": "prop", - "docs": "Opacity of the background of the item on hover" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Color of the item border" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Radius of the item border" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Style of the item border" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Width of the item border" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the item" - }, - { - "name": "--color-activated", - "annotation": "prop", - "docs": "Color of the item when pressed" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Color of the item when focused with the tab key" - }, - { - "name": "--color-hover", - "annotation": "prop", - "docs": "Color of the item on hover" - }, - { - "name": "--detail-icon-color", - "annotation": "prop", - "docs": "Color of the item detail icon" - }, - { - "name": "--detail-icon-font-size", - "annotation": "prop", - "docs": "Font size of the item detail icon" - }, - { - "name": "--detail-icon-opacity", - "annotation": "prop", - "docs": "Opacity of the item detail icon" - }, - { - "name": "--highlight-color-focused", - "annotation": "prop", - "docs": "The color of the highlight on the item when focused" - }, - { - "name": "--highlight-color-invalid", - "annotation": "prop", - "docs": "The color of the highlight on the item when invalid" - }, - { - "name": "--highlight-color-valid", - "annotation": "prop", - "docs": "The color of the highlight on the item when valid" - }, - { - "name": "--highlight-height", - "annotation": "prop", - "docs": "The height of the highlight on the item" - }, - { - "name": "--inner-border-width", - "annotation": "prop", - "docs": "Width of the item inner border" - }, - { - "name": "--inner-box-shadow", - "annotation": "prop", - "docs": "Box shadow of the item inner" - }, - { - "name": "--inner-padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the item inner" - }, - { - "name": "--inner-padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the item inner" - }, - { - "name": "--inner-padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the item inner" - }, - { - "name": "--inner-padding-top", - "annotation": "prop", - "docs": "Top padding of the item inner" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the item" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the item" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the item" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the item" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the item" - }, - { - "name": "--ripple-color", - "annotation": "prop", - "docs": "Color of the item ripple effect" - }, - { - "name": "--transition", - "annotation": "prop", - "docs": "Transition of the item" - } - ], - "slots": [ - { - "name": "", - "docs": "Content is placed between the named slots if provided without a slot." - }, - { - "name": "end", - "docs": "Content is placed to the right of the item text in LTR, and to the left in RTL." - }, - { - "name": "error", - "docs": "Content is placed under the item and displayed when an error is detected." - }, - { - "name": "helper", - "docs": "Content is placed under the item and displayed when no error is detected." - }, - { - "name": "start", - "docs": "Content is placed to the left of the item text in LTR, and to the right in RTL." - } - ], - "parts": [ - { - "name": "detail-icon", - "docs": "The chevron icon for the item. Only applies when `detail=\"true\"`." - }, - { - "name": "native", - "docs": "The native HTML button, anchor or div element that wraps all child elements." - } - ], - "dependents": [ - "ion-datetime", - "ion-select-popover" - ], - "dependencies": [ - "ion-icon", - "ion-ripple-effect", - "ion-note" - ], - "dependencyGraph": { - "ion-item": [ - "ion-icon", - "ion-ripple-effect", - "ion-note" - ], - "ion-datetime": [ - "ion-item" - ], - "ion-select-popover": [ - "ion-item" - ] - } - }, - { - "filePath": "./src/components/item-divider/item-divider.tsx", - "encapsulation": "shadow", - "tag": "ion-item-divider", - "readme": "# ion-item-divider\n\nItem Dividers are block elements that can be used to separate items in a list. They are similar to list headers, but instead of being placed at the top of a list, they should go in between groups of items.\n", - "docs": "Item Dividers are block elements that can be used to separate items in a list. They are similar to list headers, but instead of being placed at the top of a list, they should go in between groups of items.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "- Content is placed between the named slots if provided without a slot." - }, - { - "name": "slot", - "text": "start - Content is placed to the left of the divider text in LTR, and to the right in RTL." - }, - { - "name": "slot", - "text": "end - Content is placed to the right of the divider text in LTR, and to the left in RTL." - } - ], - "usage": { - "angular": "```html\n\n \n Basic Item Divider\n \n\n\n\n \n Secondary Item Divider\n \n\n\n\n\n \n \n Section A\n \n \n\n A1\n A2\n A3\n A4\n A5\n\n \n \n Section B\n \n \n\n B1\n B2\n B3\n B4\n B5\n\n```\n", - "javascript": "```html\n\n \n Basic Item Divider\n \n\n\n\n \n Secondary Item Divider\n \n\n\n\n\n \n \n Section A\n \n \n\n A1\n A2\n A3\n A4\n A5\n\n \n \n Section B\n \n \n\n B1\n B2\n B3\n B4\n B5\n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonItemDivider, IonLabel, IonList, IonItem, IonContent } from '@ionic/react';\n\nexport const ItemDividerExample: React.FC = () => (\n \n \n \n Basic Item Divider\n \n \n\n \n \n Secondary Item Divider\n \n \n\n {/*-- Item Dividers in a List --*/}\n \n \n \n Section A\n \n \n\n A1\n A2\n A3\n A4\n A5\n\n \n \n Section B\n \n \n\n B1\n B2\n B3\n B4\n B5\n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-divider-example',\n styleUrl: 'item-divider-example.css'\n})\nexport class ItemDividerExample {\n render() {\n return [\n \n \n Basic Item Divider\n \n ,\n\n \n \n Secondary Item Divider\n \n ,\n\n // Item Dividers in a List\n \n \n \n Section A\n \n \n\n A1\n A2\n A3\n A4\n A5\n\n \n \n Section B\n \n \n\n B1\n B2\n B3\n B4\n B5\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "sticky", - "type": "boolean", - "mutable": false, - "attr": "sticky", - "reflectToAttr": false, - "docs": "When it's set to `true`, the item-divider will stay visible when it reaches the top\nof the viewport until the next `ion-item-divider` replaces it.\n\nThis feature relies in `position:sticky`:\nhttps://caniuse.com/#feat=css-sticky", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the item divider" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the item divider" - }, - { - "name": "--inner-padding-bottom", - "annotation": "prop", - "docs": "Bottom inner padding of the item divider" - }, - { - "name": "--inner-padding-end", - "annotation": "prop", - "docs": "End inner padding of the item divider" - }, - { - "name": "--inner-padding-start", - "annotation": "prop", - "docs": "Start inner padding of the item divider" - }, - { - "name": "--inner-padding-top", - "annotation": "prop", - "docs": "Top inner padding of the item divider" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the item divider" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the item divider" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the item divider" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the item divider" - } - ], - "slots": [ - { - "name": "", - "docs": "Content is placed between the named slots if provided without a slot." - }, - { - "name": "end", - "docs": "Content is placed to the right of the divider text in LTR, and to the left in RTL." - }, - { - "name": "start", - "docs": "Content is placed to the left of the divider text in LTR, and to the right in RTL." - } - ], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/item-group/item-group.tsx", - "encapsulation": "none", - "tag": "ion-item-group", - "readme": "# ion-item-group\n\nItem groups are containers that organize similar items together. They can contain item dividers to divide the items into multiple sections. They can also be used to group sliding items.\n\n\n\n", - "docs": "Item groups are containers that organize similar items together. They can contain item dividers to divide the items into multiple sections. They can also be used to group sliding items.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n A\n \n\n \n Angola\n \n \n Argentina\n \n \n Armenia\n \n\n\n\n \n B\n \n\n \n Bangladesh\n \n \n Belarus\n \n \n Belgium\n \n\n\n\n\n\n \n \n Fruits\n \n \n\n \n \n \n

Grapes

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Apples

\n
\n
\n \n \n Favorite\n \n \n
\n
\n\n\n \n \n Vegetables\n \n \n\n \n \n \n

Carrots

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Celery

\n
\n
\n \n \n Favorite\n \n \n
\n
\n```\n", - "javascript": "```html\n\n \n A\n \n\n \n Angola\n \n \n Argentina\n \n \n Armenia\n \n\n\n\n \n B\n \n\n \n Bangladesh\n \n \n Belarus\n \n \n Belgium\n \n\n\n\n\n\n \n \n Fruits\n \n \n\n \n \n \n

Grapes

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Apples

\n
\n
\n \n \n Favorite\n \n \n
\n
\n\n\n \n \n Vegetables\n \n \n\n \n \n \n

Carrots

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Celery

\n
\n
\n \n \n Favorite\n \n \n
\n
\n```\n", - "react": "```tsx\nimport React from 'react';\n\nimport { IonItemGroup, IonItemDivider, IonLabel, IonItem, IonItemSliding, IonItemOptions, IonItemOption } from '@ionic/react';\n\nconst Example: React.FC<{}> = () => (\n <>\n \n \n A\n \n\n \n Angola\n \n \n Argentina\n \n \n Armenia\n \n \n\n \n \n B\n \n\n \n Bangladesh\n \n \n Belarus\n \n \n Belgium\n \n \n\n\n {/*-- They can also be used to group sliding items --*/}\n \n \n \n Fruits\n \n \n\n \n \n \n

Grapes

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Apples

\n
\n
\n \n \n Favorite\n \n \n
\n
\n\n \n \n \n Vegetables\n \n \n\n \n \n \n

Carrots

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Celery

\n
\n
\n \n \n Favorite\n \n \n
\n
\n \n);\n\nexport default Example;\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-group-example',\n styleUrl: 'item-group-example.css'\n})\nexport class ItemGroupExample {\n render() {\n return [\n \n \n A\n \n\n \n Angola\n \n \n Argentina\n \n \n Armenia\n \n \n\n \n \n B\n \n\n \n Bangladesh\n \n \n Belarus\n \n \n Belgium\n \n \n\n\n // They can also be used to group sliding items\n \n \n \n Fruits\n \n \n\n \n \n \n

Grapes

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Apples

\n
\n
\n \n \n Favorite\n \n \n
\n
\n\n \n \n \n Vegetables\n \n \n\n \n \n \n

Carrots

\n
\n
\n \n \n Favorite\n \n \n
\n\n \n \n \n

Celery

\n
\n
\n \n \n Favorite\n \n \n
\n
\n ];\n }\n}\n```", - "vue": "```html\n\n\n```\n" - }, - "props": [], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/item-option/item-option.tsx", - "encapsulation": "shadow", - "tag": "ion-item-option", - "readme": "# ion-item-option\n\nThe option button for an `ion-item-sliding`. Must be placed inside of an ``.\nYou can combine the `ionSwipe` event and the `expandable` directive to create a full swipe\naction for the item.\n", - "docs": "The option button for an `ion-item-sliding`. Must be placed inside of an ``.\nYou can combine the `ionSwipe` event and the `expandable` directive to create a full swipe\naction for the item.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "- Content is placed between the named slots if provided without a slot." - }, - { - "name": "slot", - "text": "start - Content is placed to the left of the option text in LTR, and to the right in RTL." - }, - { - "name": "slot", - "text": "top - Content is placed above the option text." - }, - { - "name": "slot", - "text": "icon-only - Should be used on an icon in an option that has no text." - }, - { - "name": "slot", - "text": "bottom - Content is placed below the option text." - }, - { - "name": "slot", - "text": "end - Content is placed to the right of the option text in LTR, and to the left in RTL." - }, - { - "name": "part", - "text": "native - The native HTML button or anchor element that wraps all child elements." - } - ], - "usage": {}, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the item option.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "download", - "type": "string | undefined", - "mutable": false, - "attr": "download", - "reflectToAttr": false, - "docs": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "expandable", - "type": "boolean", - "mutable": false, - "attr": "expandable", - "reflectToAttr": false, - "docs": "If `true`, the option will expand to take up the available width and cover any other options.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the item option" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the item option" - } - ], - "slots": [ - { - "name": "", - "docs": "Content is placed between the named slots if provided without a slot." - }, - { - "name": "bottom", - "docs": "Content is placed below the option text." - }, - { - "name": "end", - "docs": "Content is placed to the right of the option text in LTR, and to the left in RTL." - }, - { - "name": "icon-only", - "docs": "Should be used on an icon in an option that has no text." - }, - { - "name": "start", - "docs": "Content is placed to the left of the option text in LTR, and to the right in RTL." - }, - { - "name": "top", - "docs": "Content is placed above the option text." - } - ], - "parts": [ - { - "name": "native", - "docs": "The native HTML button or anchor element that wraps all child elements." - } - ], - "dependents": [], - "dependencies": [ - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-item-option": [ - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/item-options/item-options.tsx", - "encapsulation": "none", - "tag": "ion-item-options", - "readme": "# ion-item-options\n\nThe option buttons for an `ion-item-sliding`. These buttons can be placed either on the [start or end side](#side-description).\nYou can combine the `ionSwipe` event plus the `expandable` directive to create a full swipe action for the item.\n\n\n## Side Description\n\n| Side | Position | Swipe Direction |\n|---------|-----------------------------------------------------------------|-------------------------------------------------------------------|\n| `start` | To the `left` of the content in LTR, and to the `right` in RTL. | From `left` to `right` in LTR, and from `right` to `left` in RTL. |\n| `end` | To the `right` of the content in LTR, and to the `left` in RTL. | From `right` to `left` in LTR, and from `left` to `right` in RTL. |\n\n", - "docs": "The option buttons for an `ion-item-sliding`. These buttons can be placed either on the [start or end side](#side-description).\nYou can combine the `ionSwipe` event plus the `expandable` directive to create a full swipe action for the item.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "side", - "type": "\"end\" | \"start\"", - "mutable": false, - "attr": "side", - "reflectToAttr": false, - "docs": "The side the option button should be on. Possible values: `\"start\"` and `\"end\"`. If you have multiple `ion-item-options`, a side must be provided for each.", - "docsTags": [], - "default": "'end'", - "values": [ - { - "value": "end", - "type": "string" - }, - { - "value": "start", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionSwipe", - "detail": "any", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the item has been fully swiped.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/item-sliding/item-sliding.tsx", - "encapsulation": "none", - "tag": "ion-item-sliding", - "readme": "# ion-item-sliding\n\nA sliding item contains an item that can be dragged to reveal buttons. It requires an [item](../item) component as a child. All options to reveal should be placed in the [item options](../item-options) element.\n\n\n## Swipe Direction\n\nBy default, the buttons are placed on the `\"end\"` side. This means that options are revealed when the sliding item is swiped from end to start, i.e. from right to left in LTR, but from left to right in RTL. To place them on the opposite side, so that they are revealed when swiping in the opposite direction, set the `side` attribute to `\"start\"` on the [`ion-item-options`](../item-options) element. Up to two `ion-item-options` can be used at the same time in order to reveal two different sets of options depending on the swiping direction.\n\n\n## Options Layout\n\nBy default if an icon is placed with text in the [item option](../item-option), it will display the icon on top of the text, but the icon slot can be changed to any of the following to position it in the option.\n\n| Slot | Description |\n| ----------- | ------------------------------------------------------------------------ |\n| `start` | In LTR, start is the left side of the button, and in RTL it is the right |\n| `top` | The icon is above the text |\n| `icon-only` | The icon is the only content of the button |\n| `bottom` | The icon is below the text |\n| `end` | In LTR, end is the right side of the button, and in RTL it is the left |\n\n\n## Expandable Options\n\nOptions can be expanded to take up the full width of the item if you swipe past a certain point. This can be combined with the `ionSwipe` event to call methods on the class.\n\n## Interfaces\n\n### ItemSlidingCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface ItemSlidingCustomEvent extends CustomEvent {\n target: HTMLIonItemSlidingElement;\n}\n```\n\n", - "docs": "A sliding item contains an item that can be dragged to reveal buttons. It requires an [item](../item) component as a child. All options to reveal should be placed in the [item options](../item-options) element.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n \n \n Favorite\n Share\n \n\n \n Item Options\n \n\n \n Unread\n \n \n\n \n \n \n \n Delete\n \n \n\n \n Expandable Options\n \n\n \n \n Archive\n \n \n \n\n \n \n \n \n

HubStruck Notifications

\n

A new message in your network

\n

Oceanic Next has joined your network

\n
\n \n 10:45 AM\n \n
\n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n
\n\n \n \n \n \n Sliding Item, Icons Start\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n \n \n \n \n Sliding Item, Icons End\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n \n \n \n \n Sliding Item, Icons Top\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n \n \n \n \n Sliding Item, Icons Bottom\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n
\n```\n", - "javascript": "```html\n\n \n \n \n Favorite\n Share\n \n\n \n Item Options\n \n\n \n Unread\n \n \n\n \n \n \n \n Delete\n \n \n\n \n Expandable Options\n \n\n \n \n Archive\n \n \n \n\n \n \n \n \n

HubStruck Notifications

\n

A new message in your network

\n

Oceanic Next has joined your network

\n
\n \n 10:45 AM\n \n
\n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n
\n\n \n \n \n \n Sliding Item, Icons Start\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n \n \n \n \n Sliding Item, Icons End\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n \n \n \n \n Sliding Item, Icons Top\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n \n \n \n \n Sliding Item, Icons Bottom\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n
\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonList, IonItemSliding, IonItem, IonLabel, IonItemOptions, IonItemOption, IonIcon, IonNote } from '@ionic/react';\n\nimport { heart, trash, star, archive, ellipsisHorizontal, ellipsisVertical } from 'ionicons/icons';\n\nexport const ItemSlidingExample: React.FC = () => (\n\n {/* Sliding item with text options on both sides */}\n \n \n console.log('favorite clicked')}>Favorite\n console.log('share clicked')}>Share\n \n\n \n Item Options\n \n\n \n console.log('unread clicked')}>Unread\n \n \n\n {/* Sliding item with expandable options on both sides */}\n \n \n \n Delete\n \n \n\n \n Expandable Options\n \n\n \n \n Archive\n \n \n \n\n {/* Multi-line sliding item with icon options on both sides */}\n \n \n \n

HubStruck Notifications

\n

A new message in your network

\n

Oceanic Next has joined your network

\n
\n \n 10:45 AM\n \n
\n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n
\n\n {/* Sliding item with icon start options on end side */}\n \n \n \n Sliding Item, Icons Start\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n {/* Sliding item with icon end options on end side */}\n \n \n \n Sliding Item, Icons End\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n {/* Sliding item with icon top options on end side */}\n \n \n \n Sliding Item, Icons Top\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n {/* Sliding item with icon bottom options on end side */}\n \n \n \n Sliding Item, Icons Bottom\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n
\n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'item-sliding-example',\n styleUrl: 'item-sliding-example.css'\n})\nexport class ItemSlidingExample {\n favorite(ev: any) {\n console.log('Favorite clicked', ev);\n }\n\n share(ev: any) {\n console.log('Favorite clicked', ev);\n }\n\n unread(ev: any) {\n console.log('Favorite clicked', ev);\n }\n\n render() {\n return [\n \n {/* Sliding item with text options on both sides */}\n \n \n this.favorite(ev)}>Favorite\n this.share(ev)}>Share\n \n\n \n Item Options\n \n\n \n this.unread(ev)}>Unread\n \n \n\n {/* Sliding item with expandable options on both sides */}\n \n \n \n Delete\n \n \n\n \n Expandable Options\n \n\n \n \n Archive\n \n \n \n\n {/* Multi-line sliding item with icon options on both sides */}\n \n \n \n

HubStruck Notifications

\n

A new message in your network

\n

Oceanic Next has joined your network

\n
\n \n 10:45 AM\n \n
\n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n
\n\n {/* Sliding item with icon start options on end side */}\n \n \n \n Sliding Item, Icons Start\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n {/* Sliding item with icon end options on end side */}\n \n \n \n Sliding Item, Icons End\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n {/* Sliding item with icon top options on end side */}\n \n \n \n Sliding Item, Icons Top\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n\n {/* Sliding item with icon bottom options on end side */}\n \n \n \n Sliding Item, Icons Bottom\n \n \n \n \n \n More\n \n \n \n Archive\n \n \n \n
\n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the sliding item.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "close", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "close() => Promise", - "parameters": [], - "docs": "Close the sliding item. Items can also be closed from the [List](../list).", - "docsTags": [] - }, - { - "name": "closeOpened", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "closeOpened() => Promise", - "parameters": [], - "docs": "Close all of the sliding items in the list. Items can also be closed from the [List](../list).", - "docsTags": [] - }, - { - "name": "getOpenAmount", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getOpenAmount() => Promise", - "parameters": [], - "docs": "Get the amount the item is open in pixels.", - "docsTags": [] - }, - { - "name": "getSlidingRatio", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getSlidingRatio() => Promise", - "parameters": [], - "docs": "Get the ratio of the open amount of the item compared to the width of the options.\nIf the number returned is positive, then the options on the right side are open.\nIf the number returned is negative, then the options on the left side are open.\nIf the absolute value of the number is greater than 1, the item is open more than\nthe width of the options.", - "docsTags": [] - }, - { - "name": "open", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "open(side: Side | undefined) => Promise", - "parameters": [], - "docs": "Open the sliding item.", - "docsTags": [ - { - "name": "param", - "text": "side The side of the options to open. If a side is not provided, it will open the first set of options it finds within the item." - } - ] - } - ], - "events": [ - { - "event": "ionDrag", - "detail": "any", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the sliding position changes.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/label/label.tsx", - "encapsulation": "scoped", - "tag": "ion-label", - "readme": "# ion-label\n\nLabel is a wrapper element that can be used in combination with `ion-item`, `ion-input`, `ion-toggle`, and more. The position of the label inside of an item can be inline, fixed, stacked, or floating.\n\n", - "docs": "Label is a wrapper element that can be used in combination with `ion-item`, `ion-input`, `ion-toggle`, and more. The position of the label inside of an item can be inline, fixed, stacked, or floating.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\nLabel\n\n\nPrimary Label\nSecondary Label\nDanger Label\nLight Label\nDark Label\n\n\n\n Default Item\n\n\n\n \n Multi-line text that should wrap when it is too long\n to fit on one line in the item.\n \n\n\n\n\n Default Input\n \n\n\n\n Fixed\n \n\n\n\n Floating\n \n\n\n\n Stacked\n \n\n\n\n Toggle\n \n\n\n\n \n Checkbox\n\n```\n", - "javascript": "```html\n\nLabel\n\n\nPrimary Label\nSecondary Label\nDanger Label\nLight Label\nDark Label\n\n\n\n Default Item\n\n\n\n \n Multi-line text that should wrap when it is too long\n to fit on one line in the item.\n \n\n\n\n\n Default Input\n \n\n\n\n Fixed\n \n\n\n\n Floating\n \n\n\n\n Stacked\n \n\n\n\n Toggle\n \n\n\n\n \n Checkbox\n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonLabel, IonItem, IonInput, IonToggle, IonCheckbox, IonContent } from '@ionic/react';\n\nexport const LabelExample: React.FC = () => (\n \n {/*-- Default Label --*/}\n Label
\n\n {/*-- Label Colors --*/}\n Primary Label
\n Secondary Label
\n Danger Label
\n Light Label
\n Dark Label
\n\n {/*-- Item Labels --*/}\n \n Default Item\n \n\n \n \n Multi-line text that should wrap when it is too long\n to fit on one line in the item.\n \n \n\n {/*-- Input Labels --*/}\n \n Default Input\n \n \n\n \n Fixed\n \n \n\n \n Floating\n \n \n\n \n Stacked\n \n \n\n \n Toggle\n \n \n\n \n \n Checkbox\n \n
\n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'label-example',\n styleUrl: 'label-example.css'\n})\nexport class LabelExample {\n render() {\n return [\n // Default Label\n Label,\n\n // Label Colors\n Primary Label,\n Secondary Label,\n Danger Label,\n Light Label,\n Dark Label,\n\n // Item Labels\n \n Default Item\n ,\n\n \n \n Multi-line text that should wrap when it is too long\n to fit on one line in the item.\n \n ,\n\n // Input Labels\n \n Default Input\n \n ,\n\n \n Fixed\n \n ,\n\n \n Floating\n \n ,\n\n \n Stacked\n \n ,\n\n \n Toggle\n \n ,\n\n \n \n Checkbox\n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "position", - "type": "\"fixed\" | \"floating\" | \"stacked\" | undefined", - "mutable": false, - "attr": "position", - "reflectToAttr": false, - "docs": "The position determines where and how the label behaves inside an item.", - "docsTags": [], - "values": [ - { - "value": "fixed", - "type": "string" - }, - { - "value": "floating", - "type": "string" - }, - { - "value": "stacked", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the label" - } - ], - "slots": [], - "parts": [], - "dependents": [ - "ion-datetime", - "ion-select-popover" - ], - "dependencies": [], - "dependencyGraph": { - "ion-datetime": [ - "ion-label" - ], - "ion-select-popover": [ - "ion-label" - ] - } - }, - { - "filePath": "./src/components/list/list.tsx", - "encapsulation": "none", - "tag": "ion-list", - "readme": "# ion-list\n\nLists are made up of multiple rows of items which can contain text, buttons, toggles,\nicons, thumbnails, and much more. Lists generally contain items with similar data content, such as images and text.\n\nLists support several interactions including swiping items to reveal options, dragging to reorder items within the list, and deleting items.\n\n", - "docs": "Lists are made up of multiple rows of items which can contain text, buttons, toggles,\nicons, thumbnails, and much more. Lists generally contain items with similar data content, such as images and text.\n\nLists support several interactions including swiping items to reveal options, dragging to reorder items within the list, and deleting items.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n\n \n Pokémon Yellow\n \n \n Mega Man X\n \n \n The Legend of Zelda\n \n \n Pac-Man\n \n \n Super Mario World\n \n\n\n\n\n \n Input\n \n \n \n Toggle\n \n \n \n Radio\n \n \n \n Checkbox\n \n \n\n\n\n\n \n \n Item\n \n \n Unread\n \n \n\n \n \n Item\n \n \n Unread\n \n \n\n```", - "javascript": "```html\n\n\n \n Pokémon Yellow\n \n \n Mega Man X\n \n \n The Legend of Zelda\n \n \n Pac-Man\n \n \n Super Mario World\n \n\n\n\n\n \n Input\n \n \n \n Toggle\n \n \n \n Radio\n \n \n \n Checkbox\n \n \n\n\n\n\n \n \n Item\n \n \n Unread\n \n \n\n \n \n Item\n \n \n Unread\n \n \n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonList, IonItem, IonLabel, IonInput, IonToggle, IonRadio, IonCheckbox, IonItemSliding, IonItemOption, IonItemOptions, IonContent } from '@ionic/react';\n\nexport const ListExample: React.FC = () => (\n \n {/*-- List of Text Items --*/}\n \n \n Pokémon Yellow\n \n \n Mega Man X\n \n \n The Legend of Zelda\n \n \n Pac-Man\n \n \n Super Mario World\n \n \n\n {/*-- List of Input Items --*/}\n \n \n Input\n \n \n \n Toggle\n \n \n \n Radio\n \n \n \n Checkbox\n \n \n \n\n {/*-- List of Sliding Items --*/}\n \n \n \n Item\n \n \n {}}>Unread\n \n \n\n \n \n Item\n \n \n {}}>Unread\n \n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'list-example',\n styleUrl: 'list-example.css'\n})\nexport class ListExample {\n unread(ev: Event) {\n console.log('Item is unread', ev);\n }\n\n render() {\n return [\n // List of Text Items\n \n \n Pokémon Yellow\n \n \n Mega Man X\n \n \n The Legend of Zelda\n \n \n Pac-Man\n \n \n Super Mario World\n \n ,\n\n // List of Input Items\n \n \n Input\n \n \n \n Toggle\n \n \n \n Radio\n \n \n \n Checkbox\n \n \n ,\n\n // List of Sliding Items\n \n \n \n Item\n \n \n this.unread(ev)}>Unread\n \n \n\n \n \n Item\n \n \n this.unread(ev)}>Unread\n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "inset", - "type": "boolean", - "mutable": false, - "attr": "inset", - "reflectToAttr": false, - "docs": "If `true`, the list will have margin around it and rounded corners.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "lines", - "type": "\"full\" | \"inset\" | \"none\" | undefined", - "mutable": false, - "attr": "lines", - "reflectToAttr": false, - "docs": "How the bottom border should be displayed on all items.", - "docsTags": [], - "values": [ - { - "value": "full", - "type": "string" - }, - { - "value": "inset", - "type": "string" - }, - { - "value": "none", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "closeSlidingItems", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "closeSlidingItems() => Promise", - "parameters": [], - "docs": "If `ion-item-sliding` are used inside the list, this method closes\nany open sliding item.\n\nReturns `true` if an actual `ion-item-sliding` is closed.", - "docsTags": [] - } - ], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [ - "ion-select-popover" - ], - "dependencies": [], - "dependencyGraph": { - "ion-select-popover": [ - "ion-list" - ] - } - }, - { - "filePath": "./src/components/list-header/list-header.tsx", - "encapsulation": "shadow", - "tag": "ion-list-header", - "readme": "# ion-list-header\n\nListHeader a header component for a list.\nUnlike ItemDivider, ListHeaders are styled to be stand-out from the rest of the list items.\n\n", - "docs": "ListHeader a header component for a list.\nUnlike ItemDivider, ListHeaders are styled to be stand-out from the rest of the list items.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n\n List Header\n\n\n\n\n New This Week\n See All\n\n\n\n\n New This Week\n See All\n\n\n\n\n New This Week\n See All\n\n\n\n\n New This Week\n See All\n\n\n\n\n \n Recent\n Clear\n \n \n \n

I got you babe

\n
\n
\n
\n\n\n \n Trending\n \n \n \n

harry styles

\n
\n
\n \n \n

christmas

\n
\n
\n \n \n

falling

\n
\n
\n
\n```\n", - "javascript": "```html\n\n\n List Header\n\n\n\n\n New This Week\n See All\n\n\n\n\n New This Week\n See All\n\n\n\n\n New This Week\n See All\n\n\n\n\n New This Week\n See All\n\n\n\n\n \n Recent\n Clear\n \n \n \n

I got you babe

\n
\n
\n
\n\n\n \n Trending\n \n \n \n

harry styles

\n
\n
\n \n \n

christmas

\n
\n
\n \n \n

falling

\n
\n
\n
\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonButton, IonContent, IonItem, IonLabel, IonList, IonListHeader } from '@ionic/react';\n\nexport const ListHeaderExample: React.FC = () => (\n \n {/*-- Default List Header --*/}\n \n List Header\n \n\n {/*-- List Header with Button --*/}\n \n New This Week\n See All\n \n\n {/*-- List Header with Outline Button --*/}\n \n New This Week\n See All\n \n\n {/*-- List Header Full Lines --*/}\n \n New This Week\n See All\n \n\n {/*-- List Header Inset Lines --*/}\n \n New This Week\n See All\n \n\n {/*-- List Headers in Lists --*/}\n \n \n Recent\n Clear\n \n \n \n

I got you babe

\n
\n
\n
\n\n \n \n Trending\n \n \n \n

harry styles

\n
\n
\n \n \n

christmas

\n
\n
\n \n \n

falling

\n
\n
\n
\n
\n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'list-header-example',\n styleUrl: 'list-header-example.css'\n})\nexport class ListHeaderExample {\n render() {\n return [\n // Default List Header\n \n List Header\n ,\n\n // List Header with Button\n \n New This Week\n See All\n ,\n\n // List Header with Outline Button\n \n New This Week\n See All\n ,\n\n // List Header Full Lines\n \n New This Week\n See All\n ,\n\n // List Header Inset Lines\n \n New This Week\n See All\n ,\n\n // List Headers in Lists\n \n \n Recent\n Clear\n \n \n \n

I got you babe

\n
\n
\n
,\n\n \n \n Trending\n \n \n \n

harry styles

\n
\n
\n \n \n

christmas

\n
\n
\n \n \n

falling

\n
\n
\n
\n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "lines", - "type": "\"full\" | \"inset\" | \"none\" | undefined", - "mutable": false, - "attr": "lines", - "reflectToAttr": false, - "docs": "How the bottom border should be displayed on the list header.", - "docsTags": [], - "values": [ - { - "value": "full", - "type": "string" - }, - { - "value": "inset", - "type": "string" - }, - { - "value": "none", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the list header" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Color of the list header border" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Style of the list header border" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Width of the list header border" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the list header text" - }, - { - "name": "--inner-border-width", - "annotation": "prop", - "docs": "Width of the inner list header border" - } - ], - "slots": [], - "parts": [], - "dependents": [ - "ion-select-popover" - ], - "dependencies": [], - "dependencyGraph": { - "ion-select-popover": [ - "ion-list-header" - ] - } - }, - { - "filePath": "./src/components/loading/loading.tsx", - "encapsulation": "scoped", - "tag": "ion-loading", - "readme": "# ion-loading\n\nAn overlay that can be used to indicate activity while blocking user interaction. The loading indicator appears on top of the app's content, and can be dismissed by the app to resume user interaction with the app. It includes an optional backdrop, which can be disabled by setting `showBackdrop: false` upon creation.\n\n## Dismissing\n\nThe loading indicator can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the loading options. To dismiss the loading indicator after creation, call the `dismiss()` method on the loading instance. The `onDidDismiss` function can be called to perform an action after the loading indicator is dismissed.\n\n## Customization\n\nLoading uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector.\n\nWe recommend passing a custom class to `cssClass` in the `create` method and using that to add custom styles to the host and inner elements. This property can also accept multiple classes separated by spaces. View the [Usage](#usage) section for an example of how to pass a class using `cssClass`.\n\n```css\n/* DOES NOT WORK - not specific enough */\nion-loading {\n color: green;\n}\n\n/* Works - pass \"my-custom-class\" in cssClass to increase specificity */\n.my-custom-class {\n color: green;\n}\n```\n\nAny of the defined [CSS Custom Properties](#css-custom-properties) can be used to style the Loading without needing to target individual elements:\n\n```css\n.my-custom-class {\n --background: #222;\n --spinner-color: #fff;\n\n color: #fff;\n}\n```\n\n> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.\n\n## Interfaces\n\n### LoadingOptions\n\n```typescript\ninterface LoadingOptions {\n spinner?: SpinnerTypes | null;\n message?: string | IonicSafeString;\n cssClass?: string | string[];\n showBackdrop?: boolean;\n duration?: number;\n translucent?: boolean;\n animated?: boolean;\n backdropDismiss?: boolean;\n mode?: Mode;\n keyboardClose?: boolean;\n id?: string;\n htmlAttributes?: LoadingAttributes;\n\n enterAnimation?: AnimationBuilder;\n leaveAnimation?: AnimationBuilder;\n}\n```\n\n### LoadingAttributes\n\n```typescript\ninterface LoadingAttributes extends JSXBase.HTMLAttributes {}\n```\n", - "docs": "An overlay that can be used to indicate activity while blocking user interaction. The loading indicator appears on top of the app's content, and can be dismissed by the app to resume user interaction with the app. It includes an optional backdrop, which can be disabled by setting `showBackdrop: false` upon creation.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```typescript\nimport { Component } from '@angular/core';\nimport { LoadingController } from '@ionic/angular';\n\n@Component({\n selector: 'loading-example',\n templateUrl: 'loading-example.html',\n styleUrls: ['./loading-example.css']\n})\nexport class LoadingExample {\n constructor(public loadingController: LoadingController) {}\n\n async presentLoading() {\n const loading = await this.loadingController.create({\n cssClass: 'my-custom-class',\n message: 'Please wait...',\n duration: 2000\n });\n await loading.present();\n\n const { role, data } = await loading.onDidDismiss();\n console.log('Loading dismissed!');\n }\n\n async presentLoadingWithOptions() {\n const loading = await this.loadingController.create({\n spinner: null,\n duration: 5000,\n message: 'Click the backdrop to dismiss early...',\n translucent: true,\n cssClass: 'custom-class custom-loading',\n backdropDismiss: true\n });\n await loading.present();\n\n const { role, data } = await loading.onDidDismiss();\n console.log('Loading dismissed with role:', role);\n }\n}\n```\n\n\n### Style Placement\n\nIn Angular, the CSS of a specific page is scoped only to elements of that page. Even though the Loading can be presented from within a page, the `ion-loading` element is appended outside of the current page. This means that any custom styles need to go in a global stylesheet file. In an Ionic Angular starter this can be the `src/global.scss` file or you can register a new global style file by [adding to the `styles` build option in `angular.json`](https://angular.io/guide/workspace-config#style-script-config).\n", - "javascript": "```javascript\nasync function presentLoading() {\n const loading = document.createElement('ion-loading');\n\n loading.cssClass = 'my-custom-class';\n loading.message = 'Please wait...';\n loading.duration = 2000;\n\n document.body.appendChild(loading);\n await loading.present();\n\n const { role, data } = await loading.onDidDismiss();\n console.log('Loading dismissed!');\n}\n\nasync function presentLoadingWithOptions() {\n const loading = document.createElement('ion-loading');\n\n loading.spinner = null;\n loading.duration = 5000;\n loading.message = 'Click the backdrop to dismiss early...';\n loading.translucent = true;\n loading.cssClass = 'custom-class custom-loading';\n loading.backdropDismiss = true;\n\n document.body.appendChild(loading);\n await loading.present();\n\n const { role, data } = await loading.onDidDismiss();\n console.log('Loading dismissed with role:', role);\n}\n```\n", - "react": "```tsx\n/* Using with useIonLoading Hook */\n\nimport React from 'react';\nimport { IonButton, IonContent, IonPage, useIonLoading } from '@ionic/react';\n\ninterface LoadingProps {}\n\nconst LoadingExample: React.FC = () => {\n const [present, dismiss] = useIonLoading();\n /**\n * The recommended way of dismissing is to use the `dismiss` property\n * on `IonLoading`, but the `dismiss` method returned from `useIonLoading`\n * can be used for more complex scenarios.\n */\n return (\n \n \n {\n present({\n message: 'Loading...',\n duration: 3000\n })\n }}\n >\n Show Loading\n \n present('Loading', 2000, 'dots')}\n >\n Show Loading using params\n \n \n \n );\n};\n```\n\n```tsx\n/* Using with IonLoading Component */\n\nimport React, { useState } from 'react';\nimport { IonLoading, IonButton, IonContent } from '@ionic/react';\n\nexport const LoadingExample: React.FC = () => {\n const [showLoading, setShowLoading] = useState(true);\n\n setTimeout(() => {\n setShowLoading(false);\n }, 2000);\n\n return (\n \n setShowLoading(true)}>Show Loading\n setShowLoading(false)}\n message={'Please wait...'}\n duration={5000}\n />\n \n );\n};\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\nimport { loadingController } from '@ionic/core';\n\n@Component({\n tag: 'loading-example',\n styleUrl: 'loading-example.css'\n})\nexport class LoadingExample {\n async presentLoading() {\n const loading = await loadingController.create({\n cssClass: 'my-custom-class',\n message: 'Please wait...',\n duration: 2000\n });\n await loading.present();\n\n const { role, data } = await loading.onDidDismiss();\n console.log('Loading dismissed!', role, data);\n }\n\n async presentLoadingWithOptions() {\n const loading = await loadingController.create({\n spinner: null,\n duration: 5000,\n message: 'Click the backdrop to dismiss early...',\n translucent: true,\n cssClass: 'custom-class custom-loading',\n backdropDismiss: true\n });\n await loading.present();\n\n const { role, data } = await loading.onDidDismiss();\n console.log('Loading dismissed with role:', role, data);\n }\n\n render() {\n return [\n \n this.presentLoading()}>Present Loading\n this.presentLoadingWithOptions()}>Present Loading: Options\n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n\nDevelopers can also use this component directly in their template:\n\n```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the loading indicator will animate.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "backdropDismiss", - "type": "boolean", - "mutable": false, - "attr": "backdrop-dismiss", - "reflectToAttr": false, - "docs": "If `true`, the loading indicator will be dismissed when the backdrop is clicked.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "cssClass", - "type": "string | string[] | undefined", - "mutable": false, - "attr": "css-class", - "reflectToAttr": false, - "docs": "Additional classes to apply for custom CSS. If multiple classes are\nprovided they should be separated by spaces.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "string[]" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "duration", - "type": "number", - "mutable": false, - "attr": "duration", - "reflectToAttr": false, - "docs": "Number of milliseconds to wait before dismissing the loading indicator.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "enterAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the loading indicator is presented.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "htmlAttributes", - "type": "LoadingAttributes | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Additional attributes to pass to the loader.", - "docsTags": [], - "values": [ - { - "type": "LoadingAttributes" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "keyboardClose", - "type": "boolean", - "mutable": false, - "attr": "keyboard-close", - "reflectToAttr": false, - "docs": "If `true`, the keyboard will be automatically dismissed when the overlay is presented.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "leaveAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the loading indicator is dismissed.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "message", - "type": "IonicSafeString | string | undefined", - "mutable": false, - "attr": "message", - "reflectToAttr": false, - "docs": "Optional text content to display in the loading indicator.", - "docsTags": [], - "values": [ - { - "type": "IonicSafeString" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "showBackdrop", - "type": "boolean", - "mutable": false, - "attr": "show-backdrop", - "reflectToAttr": false, - "docs": "If `true`, a backdrop will be displayed behind the loading indicator.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "spinner", - "type": "\"bubbles\" | \"circles\" | \"circular\" | \"crescent\" | \"dots\" | \"lines\" | \"lines-sharp\" | \"lines-sharp-small\" | \"lines-small\" | null | undefined", - "mutable": true, - "attr": "spinner", - "reflectToAttr": false, - "docs": "The name of the spinner to display.", - "docsTags": [], - "values": [ - { - "value": "bubbles", - "type": "string" - }, - { - "value": "circles", - "type": "string" - }, - { - "value": "circular", - "type": "string" - }, - { - "value": "crescent", - "type": "string" - }, - { - "value": "dots", - "type": "string" - }, - { - "value": "lines", - "type": "string" - }, - { - "value": "lines-sharp", - "type": "string" - }, - { - "value": "lines-sharp-small", - "type": "string" - }, - { - "value": "lines-small", - "type": "string" - }, - { - "type": "null" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the loading indicator will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "dismiss", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "dismiss(data?: any, role?: string | undefined) => Promise", - "parameters": [], - "docs": "Dismiss the loading overlay after it has been presented.", - "docsTags": [ - { - "name": "param", - "text": "data Any data to emit in the dismiss events." - }, - { - "name": "param", - "text": "role The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`." - } - ] - }, - { - "name": "onDidDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onDidDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the loading did dismiss.", - "docsTags": [] - }, - { - "name": "onWillDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onWillDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the loading will dismiss.", - "docsTags": [] - }, - { - "name": "present", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "present() => Promise", - "parameters": [], - "docs": "Present the loading overlay after it has been created.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionLoadingDidDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the loading has dismissed.", - "docsTags": [] - }, - { - "event": "ionLoadingDidPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the loading has presented.", - "docsTags": [] - }, - { - "event": "ionLoadingWillDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the loading has dismissed.", - "docsTags": [] - }, - { - "event": "ionLoadingWillPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the loading has presented.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--backdrop-opacity", - "annotation": "prop", - "docs": "Opacity of the backdrop" - }, - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the loading dialog" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "Height of the loading dialog" - }, - { - "name": "--max-height", - "annotation": "prop", - "docs": "Maximum height of the loading dialog" - }, - { - "name": "--max-width", - "annotation": "prop", - "docs": "Maximum width of the loading dialog" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the loading dialog" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the loading dialog" - }, - { - "name": "--spinner-color", - "annotation": "prop", - "docs": "Color of the loading spinner" - }, - { - "name": "--width", - "annotation": "prop", - "docs": "Width of the loading dialog" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [ - "ion-backdrop", - "ion-spinner" - ], - "dependencyGraph": { - "ion-loading": [ - "ion-backdrop", - "ion-spinner" - ] - } - }, - { - "filePath": "./src/components/menu/menu.tsx", - "encapsulation": "shadow", - "tag": "ion-menu", - "readme": "# ion-menu\n\nThe Menu component is a navigation drawer that slides in from the side of the current view.\nBy default, it slides in from the left, but the side can be overridden.\nThe menu will be displayed differently based on the mode, however the display type can be changed to any of the available menu types.\nThe menu element should be a sibling to the root content element.\nThere can be any number of menus attached to the content.\nThese can be controlled from the templates, or programmatically using the MenuController.\n\n## Interfaces\n\n### MenuCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface MenuCustomEvent extends CustomEvent {\n detail: T;\n target: HTMLIonMenuElement;\n}\n```\n", - "docs": "The Menu component is a navigation drawer that slides in from the side of the current view.\nBy default, it slides in from the left, but the side can be overridden.\nThe menu will be displayed differently based on the mode, however the display type can be changed to any of the available menu types.\nThe menu element should be a sibling to the root content element.\nThere can be any number of menus attached to the content.\nThese can be controlled from the templates, or programmatically using the MenuController.", - "docsTags": [ - { - "name": "part", - "text": "container - The container for the menu content." - }, - { - "name": "part", - "text": "backdrop - The backdrop that appears over the main content when the menu is open." - } - ], - "usage": { - "angular": "```html\n\n \n \n Start Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n\n\n\n \n \n Custom Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n\n\n\n \n \n End Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n\n\n\n```\n\n```typescript\nimport { Component } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\n\n@Component({\n selector: 'menu-example',\n templateUrl: 'menu-example.html',\n styleUrls: ['./menu-example.css'],\n})\nexport class MenuExample {\n\nconstructor(private menu: MenuController) { }\n\n openFirst() {\n this.menu.enable(true, 'first');\n this.menu.open('first');\n }\n\n openEnd() {\n this.menu.open('end');\n }\n\n openCustom() {\n this.menu.enable(true, 'custom');\n this.menu.open('custom');\n }\n}\n```\n\n```css\n.my-custom-menu {\n --width: 500px;\n}\n```", - "javascript": "```html\n\n \n \n \n Start Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n \n\n \n \n \n Custom Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n \n\n \n \n \n End Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n \n\n
\n \n \n Menu - Basic\n \n \n \n Open Start Menu\n Open End Menu\n Open Custom Menu\n \n
\n\n
\n```\n\n```javascript\n\n \n\n```\n\n```css\n.my-custom-menu {\n --width: 500px;\n}\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonMenu, IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonRouterOutlet } from '@ionic/react';\n\nexport const MenuExample: React.FC = () => (\n <>\n \n \n \n Start Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n \n\n \n \n \n Custom Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n \n\n \n \n \n End Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\nimport { menuController } from '@ionic/core';\n\n@Component({\n tag: 'menu-example',\n styleUrl: 'menu-example.css'\n})\nexport class MenuExample {\n openFirst() {\n menuController.enable(true, 'first');\n menuController.open('first');\n }\n\n openEnd() {\n menuController.open('end');\n }\n\n openCustom() {\n menuController.enable(true, 'custom');\n menuController.open('custom');\n }\n\n render() {\n return [\n \n \n \n Start Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n ,\n\n \n \n \n Custom Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n ,\n\n \n \n \n End Menu\n \n \n \n \n Menu Item\n Menu Item\n Menu Item\n Menu Item\n Menu Item\n \n \n ,\n\n // A router outlet can be placed here instead\n \n this.openFirst()}>Open Start Menu\n this.openEnd()}>Open End Menu\n this.openCustom()}>Open Custom Menu\n \n ];\n }\n}\n```\n\n```css\n.my-custom-menu {\n --width: 500px;\n}\n```", - "vue": "```html\n\n\n\n\n```" - }, - "props": [ - { - "name": "contentId", - "type": "string | undefined", - "mutable": false, - "attr": "content-id", - "reflectToAttr": true, - "docs": "The `id` of the main content. When using\na router this is typically `ion-router-outlet`.\nWhen not using a router, this is typically\nyour main view's `ion-content`. This is not the\nid of the `ion-content` inside of your `ion-menu`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": true, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the menu is disabled.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "maxEdgeStart", - "type": "number", - "mutable": false, - "attr": "max-edge-start", - "reflectToAttr": false, - "docs": "The edge threshold for dragging the menu open.\nIf a drag/swipe happens over this value, the menu is not triggered.", - "docsTags": [], - "default": "50", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "menuId", - "type": "string | undefined", - "mutable": false, - "attr": "menu-id", - "reflectToAttr": true, - "docs": "An id for the menu.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "side", - "type": "\"end\" | \"start\"", - "mutable": false, - "attr": "side", - "reflectToAttr": true, - "docs": "Which side of the view the menu should be placed.", - "docsTags": [], - "default": "'start'", - "values": [ - { - "value": "end", - "type": "string" - }, - { - "value": "start", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "swipeGesture", - "type": "boolean", - "mutable": false, - "attr": "swipe-gesture", - "reflectToAttr": false, - "docs": "If `true`, swiping the menu is enabled.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "string | undefined", - "mutable": true, - "attr": "type", - "reflectToAttr": false, - "docs": "The display type of the menu.\nAvailable options: `\"overlay\"`, `\"reveal\"`, `\"push\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "close", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "close(animated?: boolean) => Promise", - "parameters": [], - "docs": "Closes the menu. If the menu is already closed or it can't be closed,\nit returns `false`.", - "docsTags": [] - }, - { - "name": "isActive", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "isActive() => Promise", - "parameters": [], - "docs": "Returns `true` is the menu is active.\n\nA menu is active when it can be opened or closed, meaning it's enabled\nand it's not part of a `ion-split-pane`.", - "docsTags": [] - }, - { - "name": "isOpen", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "isOpen() => Promise", - "parameters": [], - "docs": "Returns `true` is the menu is open.", - "docsTags": [] - }, - { - "name": "open", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "open(animated?: boolean) => Promise", - "parameters": [], - "docs": "Opens the menu. If the menu is already open or it can't be opened,\nit returns `false`.", - "docsTags": [] - }, - { - "name": "setOpen", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "setOpen(shouldOpen: boolean, animated?: boolean) => Promise", - "parameters": [], - "docs": "Opens or closes the button.\nIf the operation can't be completed successfully, it returns `false`.", - "docsTags": [] - }, - { - "name": "toggle", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "toggle(animated?: boolean) => Promise", - "parameters": [], - "docs": "Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.\nIf the operation can't be completed successfully, it returns `false`.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionDidClose", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the menu is closed.", - "docsTags": [] - }, - { - "event": "ionDidOpen", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the menu is open.", - "docsTags": [] - }, - { - "event": "ionWillClose", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the menu is about to be closed.", - "docsTags": [] - }, - { - "event": "ionWillOpen", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the menu is about to be opened.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "ionSplitPaneVisible", - "target": "body", - "capture": false, - "passive": false - }, - { - "event": "click", - "capture": true, - "passive": false - }, - { - "event": "keydown", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the menu" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "Height of the menu" - }, - { - "name": "--max-height", - "annotation": "prop", - "docs": "Maximum height of the menu" - }, - { - "name": "--max-width", - "annotation": "prop", - "docs": "Maximum width of the menu" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the menu" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the menu" - }, - { - "name": "--width", - "annotation": "prop", - "docs": "Width of the menu" - } - ], - "slots": [], - "parts": [ - { - "name": "backdrop", - "docs": "The backdrop that appears over the main content when the menu is open." - }, - { - "name": "container", - "docs": "The container for the menu content." - } - ], - "dependents": [], - "dependencies": [ - "ion-backdrop" - ], - "dependencyGraph": { - "ion-menu": [ - "ion-backdrop" - ] - } - }, - { - "filePath": "./src/components/menu-button/menu-button.tsx", - "encapsulation": "shadow", - "tag": "ion-menu-button", - "readme": "# ion-menu-button\n\nMenu Button is component that automatically creates the icon and functionality to open a menu on a page.\n\n", - "docs": "Menu Button is component that automatically creates the icon and functionality to open a menu on a page.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "native - The native HTML button element that wraps all child elements." - }, - { - "name": "part", - "text": "icon - The menu button icon (uses ion-icon)." - } - ], - "usage": {}, - "props": [ - { - "name": "autoHide", - "type": "boolean", - "mutable": false, - "attr": "auto-hide", - "reflectToAttr": false, - "docs": "Automatically hides the menu button when the corresponding menu is not active", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the menu button.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "menu", - "type": "string | undefined", - "mutable": false, - "attr": "menu", - "reflectToAttr": false, - "docs": "Optional property that maps to a Menu's `menuId` prop. Can also be `start` or `end` for the menu side. This is used to find the correct menu to toggle", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [ - { - "event": "ionMenuChange", - "target": "body", - "capture": false, - "passive": false - }, - { - "event": "ionSplitPaneVisible", - "target": "body", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the menu button" - }, - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background of the menu button when focused with the tab key" - }, - { - "name": "--background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the menu button background when focused with the tab key" - }, - { - "name": "--background-hover", - "annotation": "prop", - "docs": "Background of the menu button on hover" - }, - { - "name": "--background-hover-opacity", - "annotation": "prop", - "docs": "Opacity of the background on hover" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the menu button" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the menu button" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Color of the menu button when focused with the tab key" - }, - { - "name": "--color-hover", - "annotation": "prop", - "docs": "Color of the menu button on hover" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the button" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the button" - } - ], - "slots": [], - "parts": [ - { - "name": "icon", - "docs": "The menu button icon (uses ion-icon)." - }, - { - "name": "native", - "docs": "The native HTML button element that wraps all child elements." - } - ], - "dependents": [], - "dependencies": [ - "ion-icon", - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-menu-button": [ - "ion-icon", - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/menu-toggle/menu-toggle.tsx", - "encapsulation": "shadow", - "tag": "ion-menu-toggle", - "readme": "# ion-menu-toggle\n\nThe MenuToggle component can be used to toggle a menu open or closed.\n\nBy default, it's only visible when the selected menu is active. A menu is active when it can be opened/closed. If the menu is disabled or it's being presented as a split-pane, the menu is marked as non-active and ion-menu-toggle hides itself.\n\nIn case it's desired to keep `ion-menu-toggle` always visible, the `autoHide` property can be set to `false`.\n", - "docs": "The MenuToggle component can be used to toggle a menu open or closed.\n\nBy default, it's only visible when the selected menu is active. A menu is active when it can be opened/closed. If the menu is disabled or it's being presented as a split-pane, the menu is marked as non-active and ion-menu-toggle hides itself.\n\nIn case it's desired to keep `ion-menu-toggle` always visible, the `autoHide` property can be set to `false`.", - "docsTags": [ - { - "name": "slot", - "text": "- Content is placed inside the toggle to act as the click target." - } - ], - "usage": { - "angular": "```html\n\n \n \n \n Example Menu\n \n \n \n \n Menu Item\n \n \n \n
\n \n \n Toggle Menu\n \n \n
\n
\n```\n\n", - "javascript": "```html\n\n \n \n \n Example Menu\n \n \n \n \n Menu Item\n \n \n \n
\n \n \n Toggle Menu\n \n \n
\n
\n```\n\n", - "react": "```tsx\nimport React from 'react';\nimport { IonMenu, IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonMenuToggle, IonButton, IonPage } from '@ionic/react';\n\nexport const MenuExample: React.FC = () => (\n <>\n \n \n \n Example Menu\n \n \n \n \n Menu Item\n \n \n \n \n \n \n Toggle Menu\n \n \n \n \n);\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "autoHide", - "type": "boolean", - "mutable": false, - "attr": "auto-hide", - "reflectToAttr": false, - "docs": "Automatically hides the content when the corresponding menu is not active.\n\nBy default, it's `true`. Change it to `false` in order to\nkeep `ion-menu-toggle` always visible regardless the state of the menu.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "menu", - "type": "string | undefined", - "mutable": false, - "attr": "menu", - "reflectToAttr": false, - "docs": "Optional property that maps to a Menu's `menuId` prop.\nCan also be `start` or `end` for the menu side.\nThis is used to find the correct menu to toggle.\n\nIf this property is not used, `ion-menu-toggle` will toggle the\nfirst menu that is active.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [ - { - "event": "ionMenuChange", - "target": "body", - "capture": false, - "passive": false - }, - { - "event": "ionSplitPaneVisible", - "target": "body", - "capture": false, - "passive": false - } - ], - "styles": [], - "slots": [ - { - "name": "", - "docs": "Content is placed inside the toggle to act as the click target." - } - ], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/modal/modal.tsx", - "encapsulation": "shadow", - "tag": "ion-modal", - "readme": "# ion-modal\n\nA Modal is a dialog that appears on top of the app's content, and must be dismissed by the app before interaction can resume. It is useful as a select component when there are a lot of options to choose from, or when filtering items in a list, as well as many other use cases.\n\n## Presenting\n\nThere are two ways to use `ion-modal`: inline or via the `modalController`. Each method comes with different considerations, so be sure to use the approach that best fits your use case.\n\n## Inline Modals\n\n`ion-modal` can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the modal. See [Usage](#usage) for an example of how to write a modal inline. \n\nWhen using `ion-modal` with Angular, React, or Vue, the component you pass in will be destroyed when the modal is dismissed. As this functionality is provided by the JavaScript framework, using `ion-modal` without a JavaScript framework will not destroy the component you passed in. If this is a needed functionality, we recommend using the `modalController` instead.\n\n### Angular \n\nSince the component you passed in needs to be created when the modal is presented and destroyed when the modal is dismissed, we are unable to project the content using `` internally. Instead, we use `` which expects an `` to be passed in. As a result, when passing in your component you will need to wrap it in an ``:\n\n```html\n\n \n \n \n\n```\n\n### When to use\n\nUsing a modal inline is useful when you do not want to explicitly wire up click events to open the modal. For example, you can use the `is-open` property to easily present or dismiss a modal based on some state in your application.\n\nIf you need fine grained control over when the modal is presented and dismissed, we recommend you use the `modalController`. \n\n## Controller Modals\n\n`ion-modal` can also be presented programmatically by using the `modalController` imported from Ionic Framework. This allows you to have complete control over when a modal is presented above and beyond the customization that inline modals give you. See [Usage](#usage) for an example of how to use the `modalController`.\n\n### When to use\n\nWe typically recommend that you write your modals inline as it streamlines the amount of code in your application. You should only use the `modalController` for complex use cases where writing a modal inline is impractical.\n\n## Card Modal\n\nDevelopers can create a card modal effect where the modal appears as a card stacked on top of your app's main content. To create a card modal, developers need to set the `presentingElement` property and the `swipeToClose` properties on `ion-modal`.\n\nThe `presentingElement` property accepts a reference to the element that should display under your modal. This is typically a reference to `ion-router-outlet`.\n\nThe `swipeToClose` property can be used to control whether or not the card modal can be swiped to close.\n\nSee [Usage](#usage) for examples on how to use the sheet modal.\n\n## Sheet Modal\n\nDevelopers can create a sheet modal effect similar to the drawer components available in maps applications. To create a sheet modal, developers need to set the `breakpoints` and `initialBreakpoint` properties on `ion-modal`.\n\nThe `breakpoints` property accepts an array which states each breakpoint that the sheet can snap to when swiped. A `breakpoints` property of `[0, 0.5, 1]` would indicate that the sheet can be swiped to show 0% of the modal, 50% of the modal, and 100% of the modal. When the modal is swiped to 0%, the modal will be automatically dismissed.\n\nThe `initialBreakpoint` property is required so that the sheet modal knows which breakpoint to start at when presenting. The `initalBreakpoint` value must also exist in the `breakpoints` array. Given a `breakpoints` value of `[0, 0.5, 1]`, an `initialBreakpoint` value of `0.5` would be valid as `0.5` is in the `breakpoints` array. An `initialBreakpoint` value of `0.25` would not be valid as `0.25` does not exist in the `breakpoints` array.\n\nThe `backdropBreakpoint` property can be used to customize the point at which the `ion-backdrop` will begin to fade in. This is useful when creating interfaces that have content underneath the sheet that should remain interactive. A common use case is a sheet modal that overlays a map where the map is interactive until the sheet is fully expanded.\n\nSee [Usage](#usage) for examples on how to use the sheet modal.\n\n> Note: The `swipeToClose` property has no effect when using a sheet modal as sheet modals must be swipeable in order to be usable.\n\n## Interfaces\n\nBelow you will find all of the options available to you when using the `modalController`. These options should be supplied when calling `modalController.create()`.\n\n```typescript\ninterface ModalOptions {\n component: any;\n componentProps?: { [key: string]: any };\n presentingElement?: HTMLElement;\n showBackdrop?: boolean;\n backdropDismiss?: boolean;\n cssClass?: string | string[];\n animated?: boolean;\n swipeToClose?: boolean;\n\n mode?: 'ios' | 'md';\n keyboardClose?: boolean;\n id?: string;\n\n enterAnimation?: AnimationBuilder;\n leaveAnimation?: AnimationBuilder;\n}\n```\n\n## Dismissing\n\nThe modal can be dismissed after creation by calling the `dismiss()` method on the modal controller. The `onDidDismiss` function can be called to perform an action after the modal is dismissed.\n\n## Styling\n\nModals are presented at the root of your application so they overlay your entire app. This behavior applies to both inline modals and modals presented from a controller. As a result, custom modal styles can not be scoped to a particular component as they will not apply to the modal. Instead, styles must be applied globally. For most developers, placing the custom styles in `global.css` is sufficient.\n\n> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.\n\n> `ion-modal` works under the assumption that stacked modals are the same size. As a result, each subsequent modal will have no box shadow and a backdrop opacity of `0`. This is to avoid the effect of shadows and backdrops getting darker with each added modal. This can be changed by setting the `--box-shadow` and `--backdrop-opacity` CSS variables:\n``` \nion-modal.stack-modal {\n --box-shadow: 0 28px 48px rgba(0, 0, 0, 0.4);\n --backdrop-opacity: var(--ion-backdrop-opacity, 0.32);\n}\n```\n\n## Interfaces\n\n### ModalOptions\n\n```typescript\ninterface ModalOptions {\n component: T;\n componentProps?: ComponentProps;\n presentingElement?: HTMLElement;\n showBackdrop?: boolean;\n backdropDismiss?: boolean;\n cssClass?: string | string[];\n animated?: boolean;\n swipeToClose?: boolean;\n\n mode?: Mode;\n keyboardClose?: boolean;\n id?: string;\n htmlAttributes?: ModalAttributes;\n\n enterAnimation?: AnimationBuilder;\n leaveAnimation?: AnimationBuilder;\n\n breakpoints?: number[];\n initialBreakpoint?: number;\n backdropBreakpoint?: number;\n handle?: boolean;\n}\n```\n\n### ModalAttributes\n\n```typescript\ninterface ModalAttributes extends JSXBase.HTMLAttributes {}\n```\n\n## Accessibility\n\n### Keyboard Navigation\n\n| Key | Function |\n| ----- | ------------------- |\n| `Esc` | Dismisses the modal |\n\n### Screen Readers\n\nModals have the `aria-modal` attribute applied. This attribute can cause assistive technologies to limit navigation to the modal element's contents. As a result, using gestures that move to the next or previous items may not focus elements outside of the modal. This applies even when the backdrop is disabled in sheet modals using the `backdropBreakpoint` property.\n\nAssistive technologies will not limit navigation to the modal element's contents if developers manually move focus. However, manually moving focus outside of a modal is not supported in Ionic for modals that have focus trapping enabled.\n\nSee https://w3c.github.io/aria/#aria-modal for more information.\n\n### Focus Trapping\n\nWhen a modal is presented, focus will be trapped inside of the presented modal. Users can focus other interactive elements inside the modal but will never be able to focus interactive elements outside the modal while the modal is presented. For applications that present multiple stacked modals, focus will be trapped on the modal that was presented last.\n\nSheet modals that have had their backdrop disabled by the `backdropBreakpoint` property are not subject to focus trapping.\n\n### Sheet Modals\n\nSheet modals allow users to interact with content behind the modal when the `backdropBreakpoint` property is used. The backdrop will be disabled up to and including the specified `backdropBreakpoint` and will be enabled after it.\n\nWhen the backdrop is disabled, users will be able to interact with elements outside the sheet modal using a pointer or keyboard. Assistive technologies may not focus outside the sheet modal by default due to the usage of `aria-modal`. We recommend avoiding features such as autofocus here as it can cause assistive technologies to jump between two interactive contexts without warning the user. \n", - "docs": "A Modal is a dialog that appears on top of the app's content, and must be dismissed by the app before interaction can resume. It is useful as a select component when there are a lot of options to choose from, or when filtering items in a list, as well as many other use cases.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "- Content is placed inside of the `.modal-content` element." - }, - { - "name": "part", - "text": "backdrop - The `ion-backdrop` element." - }, - { - "name": "part", - "text": "content - The wrapper element for the default slot." - }, - { - "name": "part", - "text": "handle - The handle that is displayed at the top of the sheet modal when `handle=\"true\"`." - } - ], - "usage": { - "angular": "### Inline Modal\n\n```html\n\n\n \n Modal Content\n \n\n\n\nClick to open modal\n\n \n Modal Content\n \n\n\n\n\n \n Modal Content\n \n\n\n\n\n \n Modal Content\n \n\n\n\n\n \n \n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\nimport { IonRouterOutlet } from '@ionic/angular';\n\n@Component({\n selector: 'modal-example',\n templateUrl: 'modal-example.html',\n styleUrls: ['./modal-example.css']\n})\nexport class ModalExample {\n constructor(public routerOutlet: IonRouterOutlet) {}\n}\n```\n\n### Modal Controller\n\n```typescript\nimport { Component } from '@angular/core';\nimport { ModalController } from '@ionic/angular';\nimport { ModalPage } from '../modal/modal.page';\n\n@Component({\n selector: 'modal-example',\n templateUrl: 'modal-example.html',\n styleUrls: ['./modal-example.css']\n})\nexport class ModalExample {\n constructor(public modalController: ModalController) {\n\n }\n\n async presentModal() {\n const modal = await this.modalController.create({\n component: ModalPage,\n cssClass: 'my-custom-class'\n });\n return await modal.present();\n }\n}\n```\n\n```typescript\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'modal-page',\n})\nexport class ModalPage {\n\n constructor() {}\n\n}\n```\n\n> If you need a wrapper element inside of your modal component, we recommend using a `
` so that the component dimensions are still computed properly.\n\n#### Passing Data\n\nDuring creation of a modal, data can be passed in through the `componentProps`.\nThe previous example can be written to include data:\n\n```typescript\nasync presentModal() {\n const modal = await this.modalController.create({\n component: ModalPage,\n cssClass: 'my-custom-class',\n componentProps: {\n 'firstName': 'Douglas',\n 'lastName': 'Adams',\n 'middleInitial': 'N'\n }\n });\n return await modal.present();\n}\n```\n\nTo get the data passed into the `componentProps`, set it as an `@Input`:\n\n```typescript\nexport class ModalPage {\n\n // Data passed in by componentProps\n @Input() firstName: string;\n @Input() lastName: string;\n @Input() middleInitial: string;\n\n}\n```\n\n#### Dismissing a Modal\n\nA modal can be dismissed by calling the dismiss method on the modal controller and optionally passing any data from the modal.\n\n```javascript\nexport class ModalPage {\n ...\n\n dismiss() {\n // using the injected ModalController this page\n // can \"dismiss\" itself and optionally pass back data\n this.modalController.dismiss({\n 'dismissed': true\n });\n }\n}\n```\n\nAfter being dismissed, the data can be read in through the `onWillDismiss` or `onDidDismiss` attached to the modal after creation:\n\n```javascript\nconst { data } = await modal.onWillDismiss();\nconsole.log(data);\n```\n\n\n#### Lazy Loading\n\nWhen lazy loading a modal, it's important to note that the modal will not be loaded when it is opened, but rather when the module that imports the modal's module is loaded.\n\nFor example, say there exists a `CalendarComponent` and an `EventModal`. The modal is presented by clicking a button in the `CalendarComponent`. In Angular, the `EventModalModule` would need to be included in the `CalendarComponentModule` since the modal is created in the `CalendarComponent`:\n\n```typescript\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IonicModule } from '@ionic/angular';\n\nimport { CalendarComponent } from './calendar.component';\nimport { EventModalModule } from '../modals/event/event.module';\n\n@NgModule({\n declarations: [\n CalendarComponent\n ],\n imports: [\n IonicModule,\n CommonModule,\n EventModalModule\n ],\n exports: [\n CalendarComponent\n ]\n})\n\nexport class CalendarComponentModule {}\n```\n\n#### Card Modals\n\nModals in iOS mode have the ability to be presented in a card-style and swiped to close. The card-style presentation and swipe to close gesture are not mutually exclusive, meaning you can pick and choose which features you want to use. For example, you can have a card-style modal that cannot be swiped or a full sized modal that can be swiped.\n\n> Card style modals when running on iPhone-sized devices do not have backdrops. As a result, the `--backdrop-opacity` variable will not have any effect.\n\nIf you are creating an application that uses `ion-tabs`, it is recommended that you get the parent `ion-router-outlet` using `this.routerOutlet.parentOutlet.nativeEl`, otherwise the tabbar will not scale down when the modal opens.\n\n```javascript\nimport { IonRouterOutlet } from '@ionic/angular';\n\nconstructor(private routerOutlet: IonRouterOutlet) {}\n\nasync presentModal() {\n const modal = await this.modalController.create({\n component: ModalPage,\n cssClass: 'my-custom-class',\n swipeToClose: true,\n presentingElement: this.routerOutlet.nativeEl\n });\n return await modal.present();\n}\n```\n\nIn most scenarios, using the `ion-router-outlet` element as the `presentingElement` is fine. In cases where you are presenting a card-style modal from within another modal, you should pass in the top-most `ion-modal` element as the `presentingElement`.\n\n```javascript\nimport { ModalController } from '@ionic/angular';\n\nconstructor(private modalController: ModalController) {}\n\nasync presentModal() {\n const modal = await this.modalController.create({\n component: ModalPage,\n cssClass: 'my-custom-class',\n swipeToClose: true,\n presentingElement: await this.modalController.getTop() // Get the top-most ion-modal\n });\n return await modal.present();\n}\n```\n\n#### Sheet Modals\n\n```javascript\nimport { IonRouterOutlet } from '@ionic/angular';\n\nconstructor(private routerOutlet: IonRouterOutlet) {}\n\nasync presentModal() {\n const modal = await this.modalController.create({\n component: ModalPage,\n initialBreakpoint: 0.5,\n breakpoints: [0, 0.5, 1]\n });\n return await modal.present();\n}\n```\n\n### Style Placement\n\nIn Angular, the CSS of a specific page is scoped only to elements of that page. Even though the Modal can be presented from within a page, the `ion-modal` element is appended outside of the current page. This means that any custom styles need to go in a global stylesheet file. In an Ionic Angular starter this can be the `src/global.scss` file or you can register a new global style file by [adding to the `styles` build option in `angular.json`](https://angular.io/guide/workspace-config#style-script-config).\n", - "javascript": "### Inline Modal\n\n```html\n\n\n Modal Content\n\n\n\nClick to open modal\n\n Modal Content\n\n\n\n\n Modal Content\n\n\n\n\n Modal Content\n\n\n\n```\n\n### Using JavaScript\n\n```javascript\ncustomElements.define('modal-page', class extends HTMLElement {\n connectedCallback() {\n this.innerHTML = `\n\n \n Modal Header\n \n \n \n \n \n \n\n\n Modal Content\n`;\n }\n});\n\nfunction presentModal() {\n // create the modal with the `modal-page` component\n const modalElement = document.createElement('ion-modal');\n modalElement.component = 'modal-page';\n modalElement.cssClass = 'my-custom-class';\n\n // present the modal\n document.body.appendChild(modalElement);\n return modalElement.present();\n}\n```\n\n> If you need a wrapper element inside of your modal component, we recommend using a `
` so that the component dimensions are still computed properly.\n\n### Passing Data\n\nDuring creation of a modal, data can be passed in through the `componentProps`. The previous example can be written to include data:\n\n```javascript\nconst modalElement = document.createElement('ion-modal');\nmodalElement.component = 'modal-page';\nmodalElement.cssClass = 'my-custom-class';\nmodalElement.componentProps = {\n 'firstName': 'Douglas',\n 'lastName': 'Adams',\n 'middleInitial': 'N'\n};\n```\n\nTo get the data passed into the `componentProps`, query for the modal in the `modal-page`:\n\n```js\ncustomElements.define('modal-page', class extends HTMLElement {\n connectedCallback() {\n const modalElement = document.querySelector('ion-modal');\n console.log(modalElement.componentProps.firstName);\n\n ...\n }\n}\n```\n\n\n### Dismissing a Modal\n\nA modal can be dismissed by calling the dismiss method and optionally passing any data from the modal.\n\n```javascript\nasync function dismissModal() {\n await modal.dismiss({\n 'dismissed': true\n });\n}\n```\n\nAfter being dismissed, the data can be read in through the `onWillDismiss` or `onDidDismiss` attached to the modal after creation:\n\n```javascript\nconst { data } = await modalElement.onWillDismiss();\nconsole.log(data);\n```\n\n\n### Card Modals\n\nModals in iOS mode have the ability to be presented in a card-style and swiped to close. The card-style presentation and swipe to close gesture are not mutually exclusive, meaning you can pick and choose which features you want to use. For example, you can have a card-style modal that cannot be swiped or a full sized modal that can be swiped.\n\n> Card style modals when running on iPhone-sized devices do not have backdrops. As a result, the `--backdrop-opacity` variable will not have any effect.\n\n```javascript\nconst modalElement = document.createElement('ion-modal');\nmodalElement.component = 'modal-page';\nmodalElement.cssClass = 'my-custom-class';\nmodalElement.swipeToClose = true;\nmodalElement.presentingElement = document.querySelector('ion-nav');\n```\n\nIn most scenarios, using the `ion-nav` element as the `presentingElement` is fine. In cases where you are presenting a card-style modal from within a modal, you should pass in the top-most `ion-modal` element as the `presentingElement`.\n\n```javascript\nconst modalElement = document.createElement('ion-modal');\nmodalElement.component = 'modal-page';\nmodalElement.cssClass = 'my-custom-class';\nmodalElement.swipeToClose = true;\nmodalElement.presentingElement = await modalController.getTop(); // Get the top-most ion-modal\n```\n\n### Sheet Modals\n\n```javascript\nconst modalElement = document.createElement('ion-modal');\nmodalElement.component = 'modal-page';\nmodalElement.initialBreakpoint = 0.5;\nmodalElement.breakpoints = [0, 0.5, 1];\n```", - "react": "### Inline Modal\n\n```tsx\nimport { React, useRef } from 'react';\nconst App: React.FC = () => {\n const routerRef = useRef(null);\n \n return (\n \n \n \n } exact={true} />\n \n \n \n )\n};\n\n...\n\ninterface Props {\n router: HTMLIonRouterOutletElement | null;\n}\n\nimport React from 'react';\nimport AppReactComponent from './AppReactComponent';\nimport { IonModal, IonContent, IonButton } from '@ionic/react';\nexport const ModalExample: React.FC = ({ router }) => {\n return (\n <>\n {/* Default */}\n \n Modal Content\n \n \n {/* Use a trigger */}\n Click to open modal\n \n Modal Content\n \n \n {/* Sheet Modal */}\n \n Modal Content\n \n \n {/* Card Modal */}\n \n Modal Content\n \n \n {/* Passing Props */}\n \n \n \n \n );\n};\n```\n\n\n### useIonModal Hook\n\n> `useIonModal` requires being a descendant of ``. If you need to use a modal outside of an ``, consider using the component method instead.\n\n\n```tsx\n/* Using with useIonModal Hook */ \n\nimport React, { useState } from 'react';\nimport { IonButton, IonContent, IonPage, useIonModal } from '@ionic/react';\n\nconst Body: React.FC<{\n count: number;\n onDismiss: () => void;\n onIncrement: () => void;\n}> = ({ count, onDismiss, onIncrement }) => (\n
\n count: {count}\n onIncrement()}>\n Increment Count\n \n onDismiss()}>\n Close\n \n
\n);\n\nconst ModalExample: React.FC = () => {\n const [count, setCount] = useState(0);\n\n const handleIncrement = () => {\n setCount(count + 1);\n };\n\n const handleDismiss = () => {\n dismiss();\n };\n\n /**\n * First parameter is the component to show, second is the props to pass\n */\n const [present, dismiss] = useIonModal(Body, {\n count,\n onDismiss: handleDismiss,\n onIncrement: handleIncrement,\n });\n\n return (\n \n \n {\n present({\n cssClass: 'my-class',\n });\n }}\n >\n Show Modal\n \n
Count: {count}
\n
\n
\n );\n};\n```\n\n```tsx\n/* Using with IonModal Component */\n\nimport React, { useState } from 'react';\nimport { IonModal, IonButton, IonContent } from '@ionic/react';\n\nexport const ModalExample: React.FC = () => {\n const [showModal, setShowModal] = useState(false);\n\n return (\n \n \n

This is modal content

\n setShowModal(false)}>Close Modal\n
\n setShowModal(true)}>Show Modal\n
\n );\n};\n```\n\n#### Card Modals\n\nModals in iOS mode have the ability to be presented in a card-style and swiped to close. The card-style presentation and swipe to close gesture are not mutually exclusive, meaning you can pick and choose which features you want to use. For example, you can have a card-style modal that cannot be swiped or a full sized modal that can be swiped.\n\n> Card style modals when running on iPhone-sized devices do not have backdrops. As a result, the `--backdrop-opacity` variable will not have any effect.\n\n```tsx\nconst App: React.FC = () => {\n const routerRef = useRef(null);\n \n return (\n \n \n \n } exact={true} />\n \n \n \n )\n};\n\n...\n\ninterface HomePageProps {\n router: HTMLIonRouterOutletElement | null;\n}\n\nconst Home: React.FC = ({ router }) => {\n const [showModal, setShowModal] = useState(false);\n \n return (\n \n \n setShowModal(false)}>\n

This is modal content

\n \n
\n
\n );\n};\n\n```\n\nIn most scenarios, setting a ref on `IonRouterOutlet` and passing that ref's `current` value to `presentingElement` is fine. In cases where you are presenting a card-style modal from within another modal, you should pass in the top-most `IonModal` ref as the `presentingElement`.\n\n```tsx\n setShowModal(false)}>\n

This is modal content

\n setShow2ndModal(true)}>Show 2nd Modal\n setShowModal(false)}>Close Modal\n\n setShow2ndModal(false)}>\n

This is more modal content

\n setShow2ndModal(false)}>Close Modal\n\n```\n\n\n#### Sheet Modals\n\n```tsx\nconst App: React.FC = () => {\n const routerRef = useRef(null);\n \n return (\n \n \n \n } exact={true} />\n \n \n \n )\n};\n\n...\n\nconst Home: React.FC = () => {\n const [showModal, setShowModal] = useState(false);\n \n return (\n \n \n setShowModal(false)}>\n

This is modal content

\n \n
\n
\n );\n};\n\n```\n", - "stencil": "### Inline Modal\n\n```tsx\nimport { Component, Element, h } from '@stencil/core';\n\n@Component({\n tag: 'modal-example',\n styleUrl: 'modal-example.css'\n})\nexport class ModalExample {\n @Element() el: any;\n \n componentDidLoad() {\n this.routerOutlet = this.el.closest('ion-router-outlet');\n }\n \n render() {\n return (\n
\n {/* Default */}\n \n Modal Content\n \n \n {/* Use a trigger */}\n Click to open modal\n \n Modal Content\n \n \n {/* Sheet Modal */}\n \n Modal Content\n \n \n {/* Card Modal */}\n \n Modal Content\n \n \n {/* Passing Props */}\n \n \n \n
\n )\n }\n}\n```\n\n### Modal Controller \n\n```tsx\nimport { Component, h } from '@stencil/core';\n\nimport { modalController } from '@ionic/core';\n\n@Component({\n tag: 'modal-example',\n styleUrl: 'modal-example.css'\n})\nexport class ModalExample {\n async presentModal() {\n const modal = await modalController.create({\n component: 'page-modal',\n cssClass: 'my-custom-class'\n });\n await modal.present();\n }\n}\n```\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'page-modal',\n styleUrl: 'page-modal.css',\n})\nexport class PageModal {\n render() {\n return [\n \n \n Documentation\n \n \n Feedback\n \n \n Settings\n \n \n ];\n }\n}\n```\n\n> If you need a wrapper element inside of your modal component, we recommend using a `
` so that the component dimensions are still computed properly.\n\n### Passing Data\n\nDuring creation of a modal, data can be passed in through the `componentProps`.\nThe previous example can be written to include data:\n\n```tsx\nasync presentModal() {\n const modal = await modalController.create({\n component: 'page-modal',\n cssClass: 'my-custom-class',\n componentProps: {\n 'firstName': 'Douglas',\n 'lastName': 'Adams',\n 'middleInitial': 'N'\n }\n });\n await modal.present();\n}\n```\n\nTo get the data passed into the `componentProps`, set each one as a `@Prop`:\n\n```tsx\nimport { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'page-modal',\n styleUrl: 'page-modal.css',\n})\nexport class PageModal {\n // Data passed in by componentProps\n @Prop() firstName: string;\n @Prop() lastName: string;\n @Prop() middleInitial: string;\n}\n```\n\n### Dismissing a Modal\n\nA modal can be dismissed by calling the dismiss method on the modal controller and optionally passing any data from the modal.\n\n```tsx\nexport class ModalPage {\n ...\n\n dismiss(data?: any) {\n // dismiss the closest modal and optionally pass back data\n (this.el.closest('ion-modal') as any).dismiss({\n 'dismissed': true\n });\n }\n}\n```\n\nAfter being dismissed, the data can be read in through the `onWillDismiss` or `onDidDismiss` attached to the modal after creation:\n\n```tsx\nconst { data } = await modal.onWillDismiss();\nconsole.log(data);\n```\n\n### Card Modals\n\nModals in iOS mode have the ability to be presented in a card-style and swiped to close. The card-style presentation and swipe to close gesture are not mutually exclusive, meaning you can pick and choose which features you want to use. For example, you can have a card-style modal that cannot be swiped or a full sized modal that can be swiped.\n\n> Card style modals when running on iPhone-sized devices do not have backdrops. As a result, the `--backdrop-opacity` variable will not have any effect.\n\n```tsx\nimport { Component, Element, h } from '@stencil/core';\n\nimport { modalController } from '@ionic/core';\n\n@Component({\n tag: 'modal-example',\n styleUrl: 'modal-example.css'\n})\nexport class ModalExample {\n @Element() el: any;\n\n async presentModal() {\n const modal = await modalController.create({\n component: 'page-modal',\n cssClass: 'my-custom-class',\n swipeToClose: true,\n presentingElement: this.el.closest('ion-router-outlet'),\n });\n await modal.present();\n }\n\n}\n```\n\nIn most scenarios, using the `ion-router-outlet` element as the `presentingElement` is fine. In cases where you are presenting a card-style modal from within another modal, you should pass in the top-most `ion-modal` element as the `presentingElement`.\n\n```tsx\nasync presentModal() {\n const modal = await modalController.create({\n component: 'page-modal',\n cssClass: 'my-custom-class',\n swipeToClose: true,\n presentingElement: await modalController.getTop() // Get the top-most ion-modal\n });\n await modal.present();\n}\n```\n\n\n### Sheet Modals\n\n**Controller**\n```tsx\nimport { Component, Element, h } from '@stencil/core';\n\nimport { modalController } from '@ionic/core';\n\n@Component({\n tag: 'modal-example',\n styleUrl: 'modal-example.css'\n})\nexport class ModalExample {\n @Element() el: any;\n\n async presentModal() {\n const modal = await modalController.create({\n component: 'page-modal',\n initialBreakpoint: 0.5,\n breakpoints: [0, 0.5, 1]\n \n });\n await modal.present();\n }\n}\n```\n\n**Inline**\n```tsx\nimport { Component, State, h } from '@stencil/core';\n\n@Component({\n tag: 'modal-example',\n styleUrl: 'modal-example.css'\n})\nexport class ModalExample {\n @State() isModalOpen: boolean = false;\n\n render() {\n return [\n \n \n \n ]\n }\n}\n```\n", - "vue": "### Inline Modal\n\n```html\n\n\n Modal Content\n\n\n\nClick to open modal\n\n Modal Content\n\n\n\n\n Modal Content\n\n\n\n\n Modal Content\n\n\n\n\n \n\n\n\n```\n\n### Modal Controller\n\n```html\n\n\n\n```\n\n```html\n\n\n\n```\n\nDevelopers can also use this component directly in their template:\n\n```html\n\n\n\n```\n\n> If you need a wrapper element inside of your modal component, we recommend using an `` so that the component dimensions are still computed properly.\n\n#### Card Modals\n\nModals in iOS mode have the ability to be presented in a card-style and swiped to close. The card-style presentation and swipe to close gesture are not mutually exclusive, meaning you can pick and choose which features you want to use. For example, you can have a card-style modal that cannot be swiped or a full sized modal that can be swiped.\n\n> Card style modals when running on iPhone-sized devices do not have backdrops. As a result, the `--backdrop-opacity` variable will not have any effect.\n\n```html\n\n\n\n```\n\n#### Sheet Modals\n\n```html\n\n\n\n```" - }, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the modal will animate.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "backdropBreakpoint", - "type": "number", - "mutable": false, - "attr": "backdrop-breakpoint", - "reflectToAttr": false, - "docs": "A decimal value between 0 and 1 that indicates the\npoint after which the backdrop will begin to fade in\nwhen using a sheet modal. Prior to this point, the\nbackdrop will be hidden and the content underneath\nthe sheet can be interacted with. This value is exclusive\nmeaning the backdrop will become active after the value\nspecified.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "backdropDismiss", - "type": "boolean", - "mutable": false, - "attr": "backdrop-dismiss", - "reflectToAttr": false, - "docs": "If `true`, the modal will be dismissed when the backdrop is clicked.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "breakpoints", - "type": "number[] | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "The breakpoints to use when creating a sheet modal. Each value in the\narray must be a decimal between 0 and 1 where 0 indicates the modal is fully\nclosed and 1 indicates the modal is fully open. Values are relative\nto the height of the modal, not the height of the screen. One of the values in this\narray must be the value of the `initialBreakpoint` property.\nFor example: [0, .25, .5, 1]", - "docsTags": [], - "values": [ - { - "type": "number[]" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "enterAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the modal is presented.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "handle", - "type": "boolean | undefined", - "mutable": false, - "attr": "handle", - "reflectToAttr": false, - "docs": "The horizontal line that displays at the top of a sheet modal. It is `true` by default when\nsetting the `breakpoints` and `initialBreakpoint` properties.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "htmlAttributes", - "type": "ModalAttributes | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Additional attributes to pass to the modal.", - "docsTags": [], - "values": [ - { - "type": "ModalAttributes" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "initialBreakpoint", - "type": "number | undefined", - "mutable": false, - "attr": "initial-breakpoint", - "reflectToAttr": false, - "docs": "A decimal value between 0 and 1 that indicates the\ninitial point the modal will open at when creating a\nsheet modal. This value must also be listed in the\n`breakpoints` array.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "isOpen", - "type": "boolean", - "mutable": false, - "attr": "is-open", - "reflectToAttr": false, - "docs": "If `true`, the modal will open. If `false`, the modal will close.\nUse this if you need finer grained control over presentation, otherwise\njust use the modalController or the `trigger` property.\nNote: `isOpen` will not automatically be set back to `false` when\nthe modal dismisses. You will need to do that in your code.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "keyboardClose", - "type": "boolean", - "mutable": false, - "attr": "keyboard-close", - "reflectToAttr": false, - "docs": "If `true`, the keyboard will be automatically dismissed when the overlay is presented.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "leaveAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the modal is dismissed.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "presentingElement", - "type": "HTMLElement | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "The element that presented the modal. This is used for card presentation effects\nand for stacking multiple modals on top of each other. Only applies in iOS mode.", - "docsTags": [], - "values": [ - { - "type": "HTMLElement" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "showBackdrop", - "type": "boolean", - "mutable": false, - "attr": "show-backdrop", - "reflectToAttr": false, - "docs": "If `true`, a backdrop will be displayed behind the modal.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "swipeToClose", - "type": "boolean", - "mutable": false, - "attr": "swipe-to-close", - "reflectToAttr": false, - "docs": "If `true`, the modal can be swiped to dismiss. Only applies in iOS mode.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "trigger", - "type": "string | undefined", - "mutable": false, - "attr": "trigger", - "reflectToAttr": false, - "docs": "An ID corresponding to the trigger element that\ncauses the modal to open when clicked.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "dismiss", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "dismiss(data?: any, role?: string | undefined) => Promise", - "parameters": [], - "docs": "Dismiss the modal overlay after it has been presented.", - "docsTags": [ - { - "name": "param", - "text": "data Any data to emit in the dismiss events." - }, - { - "name": "param", - "text": "role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'." - } - ] - }, - { - "name": "onDidDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onDidDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the modal did dismiss.", - "docsTags": [] - }, - { - "name": "onWillDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onWillDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the modal will dismiss.", - "docsTags": [] - }, - { - "name": "present", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "present() => Promise", - "parameters": [], - "docs": "Present the modal overlay after it has been created.", - "docsTags": [] - } - ], - "events": [ - { - "event": "didDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the modal has dismissed.\nShorthand for ionModalDidDismiss.", - "docsTags": [] - }, - { - "event": "didPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the modal has presented.\nShorthand for ionModalWillDismiss.", - "docsTags": [] - }, - { - "event": "ionModalDidDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the modal has dismissed.", - "docsTags": [] - }, - { - "event": "ionModalDidPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the modal has presented.", - "docsTags": [] - }, - { - "event": "ionModalWillDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the modal has dismissed.", - "docsTags": [] - }, - { - "event": "ionModalWillPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the modal has presented.", - "docsTags": [] - }, - { - "event": "willDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the modal has dismissed.\nShorthand for ionModalWillDismiss.", - "docsTags": [] - }, - { - "event": "willPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the modal has presented.\nShorthand for ionModalWillPresent.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--backdrop-opacity", - "annotation": "prop", - "docs": "Opacity of the backdrop" - }, - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the modal content" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Border color of the modal content" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the modal content" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Border style of the modal content" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Border width of the modal content" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "Height of the modal" - }, - { - "name": "--max-height", - "annotation": "prop", - "docs": "Maximum height of the modal" - }, - { - "name": "--max-width", - "annotation": "prop", - "docs": "Maximum width of the modal" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the modal" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the modal" - }, - { - "name": "--width", - "annotation": "prop", - "docs": "Width of the modal" - } - ], - "slots": [ - { - "name": "", - "docs": "Content is placed inside of the `.modal-content` element." - } - ], - "parts": [ - { - "name": "backdrop", - "docs": "The `ion-backdrop` element." - }, - { - "name": "content", - "docs": "The wrapper element for the default slot." - }, - { - "name": "handle", - "docs": "The handle that is displayed at the top of the sheet modal when `handle=\"true\"`." - } - ], - "dependents": [], - "dependencies": [ - "ion-backdrop" - ], - "dependencyGraph": { - "ion-modal": [ - "ion-backdrop" - ] - } - }, - { - "filePath": "./src/components/nav/nav.tsx", - "encapsulation": "shadow", - "tag": "ion-nav", - "readme": "# ion-nav\n\nNav is a standalone component for loading arbitrary components and pushing new components on to the stack.\n\nUnlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL.\n\n## Interfaces\n\n### NavCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface NavCustomEvent extends CustomEvent {\n target: HTMLIonNavElement;\n}\n```\n", - "docs": "Nav is a standalone component for loading arbitrary components and pushing new components on to the stack.\n\nUnlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the nav should animate the transition of components.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "animation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "By default `ion-nav` animates transition between pages based in the mode (ios or material design).\nHowever, this property allows to create custom transition using `AnimateBuilder` functions.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "root", - "type": "Function | HTMLElement | ViewController | null | string | undefined", - "mutable": false, - "attr": "root", - "reflectToAttr": false, - "docs": "Root NavComponent to load", - "docsTags": [], - "values": [ - { - "type": "Function" - }, - { - "type": "HTMLElement" - }, - { - "type": "ViewController" - }, - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "rootParams", - "type": "undefined | { [key: string]: any; }", - "mutable": false, - "reflectToAttr": false, - "docs": "Any parameters for the root component", - "docsTags": [], - "values": [ - { - "type": "undefined" - }, - { - "type": "{ [key: string]: any; }" - } - ], - "optional": true, - "required": false - }, - { - "name": "swipeGesture", - "type": "boolean | undefined", - "mutable": true, - "attr": "swipe-gesture", - "reflectToAttr": false, - "docs": "If the nav component should allow for swipe-to-go-back.", - "docsTags": [], - "values": [ - { - "type": "boolean" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "canGoBack", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "canGoBack(view?: ViewController | undefined) => Promise", - "parameters": [], - "docs": "Returns `true` if the current view can go back.", - "docsTags": [ - { - "name": "param", - "text": "view The view to check." - } - ] - }, - { - "name": "getActive", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getActive() => Promise", - "parameters": [], - "docs": "Get the active view.", - "docsTags": [] - }, - { - "name": "getByIndex", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getByIndex(index: number) => Promise", - "parameters": [], - "docs": "Get the view at the specified index.", - "docsTags": [ - { - "name": "param", - "text": "index The index of the view." - } - ] - }, - { - "name": "getPrevious", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getPrevious(view?: ViewController | undefined) => Promise", - "parameters": [], - "docs": "Get the previous view.", - "docsTags": [ - { - "name": "param", - "text": "view The view to get." - } - ] - }, - { - "name": "insert", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "insert(insertIndex: number, component: T, componentProps?: ComponentProps | null | undefined, opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Inserts a component into the navigation stack at the specified index.\nThis is useful to add a component at any point in the navigation stack.", - "docsTags": [ - { - "name": "param", - "text": "insertIndex The index to insert the component at in the stack." - }, - { - "name": "param", - "text": "component The component to insert into the navigation stack." - }, - { - "name": "param", - "text": "componentProps Any properties of the component." - }, - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "insertPages", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "insertPages(insertIndex: number, insertComponents: NavComponent[] | NavComponentWithProps[], opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Inserts an array of components into the navigation stack at the specified index.\nThe last component in the array will become instantiated as a view, and animate\nin to become the active view.", - "docsTags": [ - { - "name": "param", - "text": "insertIndex The index to insert the components at in the stack." - }, - { - "name": "param", - "text": "insertComponents The components to insert into the navigation stack." - }, - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "pop", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "pop(opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Pop a component off of the navigation stack. Navigates back from the current\ncomponent.", - "docsTags": [ - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "popTo", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "popTo(indexOrViewCtrl: number | ViewController, opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Pop to a specific index in the navigation stack.", - "docsTags": [ - { - "name": "param", - "text": "indexOrViewCtrl The index or view controller to pop to." - }, - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "popToRoot", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "popToRoot(opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Navigate back to the root of the stack, no matter how far back that is.", - "docsTags": [ - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "push", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "push(component: T, componentProps?: ComponentProps | null | undefined, opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Push a new component onto the current navigation stack. Pass any additional\ninformation along as an object. This additional information is accessible\nthrough NavParams.", - "docsTags": [ - { - "name": "param", - "text": "component The component to push onto the navigation stack." - }, - { - "name": "param", - "text": "componentProps Any properties of the component." - }, - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "removeIndex", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "removeIndex(startIndex: number, removeCount?: number, opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Removes a component from the navigation stack at the specified index.", - "docsTags": [ - { - "name": "param", - "text": "startIndex The number to begin removal at." - }, - { - "name": "param", - "text": "removeCount The number of components to remove." - }, - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "setPages", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "setPages(views: NavComponent[] | NavComponentWithProps[], opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Set the views of the current navigation stack and navigate to the last view.\nBy default animations are disabled, but they can be enabled by passing options\nto the navigation controller. Navigation parameters can also be passed to the\nindividual pages in the array.", - "docsTags": [ - { - "name": "param", - "text": "views The list of views to set as the navigation stack." - }, - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - }, - { - "name": "setRoot", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "setRoot(component: T, componentProps?: ComponentProps | null | undefined, opts?: NavOptions | null | undefined, done?: TransitionDoneFn | undefined) => Promise", - "parameters": [], - "docs": "Set the root for the current navigation stack to a component.", - "docsTags": [ - { - "name": "param", - "text": "component The component to set as the root of the navigation stack." - }, - { - "name": "param", - "text": "componentProps Any properties of the component." - }, - { - "name": "param", - "text": "opts The navigation options." - }, - { - "name": "param", - "text": "done The transition complete function." - } - ] - } - ], - "events": [ - { - "event": "ionNavDidChange", - "detail": "void", - "bubbles": false, - "cancelable": true, - "composed": true, - "docs": "Event fired when the nav has changed components", - "docsTags": [] - }, - { - "event": "ionNavWillChange", - "detail": "void", - "bubbles": false, - "cancelable": true, - "composed": true, - "docs": "Event fired when the nav will change components", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/nav-link/nav-link.tsx", - "encapsulation": "none", - "tag": "ion-nav-link", - "readme": "# ion-nav-link\n\nA navigation link is used to navigate to a specified component. The component can be navigated to by going `forward`, `back` or as a `root` component.\n\nIt is the element form of calling the `push()`, `pop()`, and `setRoot()` methods on the navigation controller.\n\n", - "docs": "A navigation link is used to navigate to a specified component. The component can be navigated to by going `forward`, `back` or as a `root` component.\n\nIt is the element form of calling the `push()`, `pop()`, and `setRoot()` methods on the navigation controller.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "component", - "type": "Function | HTMLElement | ViewController | null | string | undefined", - "mutable": false, - "attr": "component", - "reflectToAttr": false, - "docs": "Component to navigate to. Only used if the `routerDirection` is `\"forward\"` or `\"root\"`.", - "docsTags": [], - "values": [ - { - "type": "Function" - }, - { - "type": "HTMLElement" - }, - { - "type": "ViewController" - }, - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "componentProps", - "type": "undefined | { [key: string]: any; }", - "mutable": false, - "reflectToAttr": false, - "docs": "Data you want to pass to the component as props. Only used if the `\"routerDirection\"` is `\"forward\"` or `\"root\"`.", - "docsTags": [], - "values": [ - { - "type": "undefined" - }, - { - "type": "{ [key: string]: any; }" - } - ], - "optional": true, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "The transition animation when navigating to another page.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "routerDirection", - "type": "\"back\" | \"forward\" | \"root\"", - "mutable": false, - "attr": "router-direction", - "reflectToAttr": false, - "docs": "The transition direction when navigating to another page.", - "docsTags": [], - "default": "'forward'", - "values": [ - { - "value": "back", - "type": "string" - }, - { - "value": "forward", - "type": "string" - }, - { - "value": "root", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/note/note.tsx", - "encapsulation": "shadow", - "tag": "ion-note", - "readme": "# ion-note\n\nNotes are text elements generally used as subtitles that provide more information. Notes are styled to appear grey by default. Notes can be used in an item as metadata text.\n\n", - "docs": "Notes are text elements generally used as subtitles that provide more information. Notes are styled to appear grey by default. Notes can be used in an item as metadata text.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\nDefault Note\n\n\nPrimary Note\nSecondary Note\nDanger Note\nLight Note\nDark Note\n\n\n\n \n Note (End)\n On\n \n\n \n Off\n Note (Start)\n \n\n```\n", - "javascript": "```html\n\nDefault Note\n\n\nPrimary Note\nSecondary Note\nDanger Note\nLight Note\nDark Note\n\n\n\n \n Note (End)\n On\n \n\n \n Off\n Note (Start)\n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonNote, IonList, IonItem, IonLabel, IonContent } from '@ionic/react';\n\nexport const NoteExample: React.FC = () => (\n \n {/*-- Default Note --*/}\n Default Note
\n\n {/*-- Note Colors --*/}\n Primary Note
\n Secondary Note
\n Danger Note
\n Light Note
\n Dark Note
\n\n {/*-- Notes in a List --*/}\n \n \n Note (End)\n On\n \n\n \n Off\n Note (Start)\n \n \n
\n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'note-example',\n styleUrl: 'note-example.css'\n})\nexport class NoteExample {\n render() {\n return [\n // Default Note\n Default Note,\n\n // Note Colors\n Primary Note,\n Secondary Note,\n Danger Note,\n Light Note,\n Dark Note,\n\n // Notes in a List\n \n \n Note (End)\n On\n \n\n \n Off\n Note (Start)\n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the note" - } - ], - "slots": [], - "parts": [], - "dependents": [ - "ion-item" - ], - "dependencies": [], - "dependencyGraph": { - "ion-item": [ - "ion-note" - ] - } - }, - { - "filePath": "./src/components/picker/picker.tsx", - "encapsulation": "scoped", - "tag": "ion-picker", - "readme": "# ion-picker\n\nA Picker is a dialog that displays a row of buttons and columns underneath. It appears on top of the app's content, and at the bottom of the viewport.\n\n## Interfaces\n\n### PickerButton\n\n```typescript\ninterface PickerButton {\n text?: string;\n role?: string;\n cssClass?: string | string[];\n handler?: (value: any) => boolean | void;\n}\n```\n\n### PickerColumn\n\n```typescript\ninterface PickerColumn {\n name: string;\n align?: string;\n selectedIndex?: number;\n prevSelected?: number;\n prefix?: string;\n suffix?: string;\n options: PickerColumnOption[];\n cssClass?: string | string[];\n columnWidth?: string;\n prefixWidth?: string;\n suffixWidth?: string;\n optionsWidth?: string;\n refresh?: () => void;\n}\n```\n\n### PickerColumnOption\n\n```typescript\ninterface PickerColumnOption {\n text?: string;\n value?: any;\n disabled?: boolean;\n duration?: number;\n transform?: string;\n selected?: boolean;\n}\n```\n\n### PickerOptions\n\n```typescript\ninterface PickerOptions {\n columns: PickerColumn[];\n buttons?: PickerButton[];\n cssClass?: string | string[];\n showBackdrop?: boolean;\n backdropDismiss?: boolean;\n animated?: boolean;\n\n mode?: Mode;\n keyboardClose?: boolean;\n id?: string;\n htmlAttributes?: PickerAttributes;\n\n enterAnimation?: AnimationBuilder;\n leaveAnimation?: AnimationBuilder;\n}\n```\n\n### PickerAttributes\n\n```typescript\ninterface PickerAttributes extends JSXBase.HTMLAttributes {}\n```\n", - "docs": "A Picker is a dialog that displays a row of buttons and columns underneath. It appears on top of the app's content, and at the bottom of the viewport.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "react": "```tsx\n/* Using with useIonPicker Hook */\n\nimport React, { useState } from 'react';\nimport { IonButton, IonContent, IonPage, useIonPicker } from '@ionic/react';\n\nconst PickerExample: React.FC = () => {\n const [present] = useIonPicker();\n const [value, setValue] = useState('');\n return (\n \n \n \n present({\n buttons: [\n {\n text: 'Confirm',\n handler: (selected) => {\n setValue(selected.animal.value)\n },\n },\n ],\n columns: [\n {\n name: 'animal',\n options: [\n { text: 'Dog', value: 'dog' },\n { text: 'Cat', value: 'cat' },\n { text: 'Bird', value: 'bird' },\n ],\n },\n ],\n })\n }\n >\n Show Picker\n \n \n present(\n [\n {\n name: 'animal',\n options: [\n { text: 'Dog', value: 'dog' },\n { text: 'Cat', value: 'cat' },\n { text: 'Bird', value: 'bird' },\n ],\n },\n {\n name: 'vehicle',\n options: [\n { text: 'Car', value: 'car' },\n { text: 'Truck', value: 'truck' },\n { text: 'Bike', value: 'bike' },\n ],\n },\n ],\n [\n {\n text: 'Confirm',\n handler: (selected) => {\n setValue(`${selected.animal.value}, ${selected.vehicle.value}`)\n },\n },\n ]\n )\n }\n >\n Show Picker using params\n \n {value && (\n
Selected Value: {value}
\n )}\n
\n
\n );\n};\n```", - "vue": "```vue\n\n\n\n```\n" - }, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the picker will animate.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "backdropDismiss", - "type": "boolean", - "mutable": false, - "attr": "backdrop-dismiss", - "reflectToAttr": false, - "docs": "If `true`, the picker will be dismissed when the backdrop is clicked.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "buttons", - "type": "PickerButton[]", - "mutable": false, - "reflectToAttr": false, - "docs": "Array of buttons to be displayed at the top of the picker.", - "docsTags": [], - "default": "[]", - "values": [ - { - "type": "PickerButton[]" - } - ], - "optional": false, - "required": false - }, - { - "name": "columns", - "type": "PickerColumn[]", - "mutable": false, - "reflectToAttr": false, - "docs": "Array of columns to be displayed in the picker.", - "docsTags": [], - "default": "[]", - "values": [ - { - "type": "PickerColumn[]" - } - ], - "optional": false, - "required": false - }, - { - "name": "cssClass", - "type": "string | string[] | undefined", - "mutable": false, - "attr": "css-class", - "reflectToAttr": false, - "docs": "Additional classes to apply for custom CSS. If multiple classes are\nprovided they should be separated by spaces.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "string[]" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "duration", - "type": "number", - "mutable": false, - "attr": "duration", - "reflectToAttr": false, - "docs": "Number of milliseconds to wait before dismissing the picker.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "enterAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the picker is presented.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "htmlAttributes", - "type": "PickerAttributes | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Additional attributes to pass to the picker.", - "docsTags": [], - "values": [ - { - "type": "PickerAttributes" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "keyboardClose", - "type": "boolean", - "mutable": false, - "attr": "keyboard-close", - "reflectToAttr": false, - "docs": "If `true`, the keyboard will be automatically dismissed when the overlay is presented.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "leaveAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the picker is dismissed.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "showBackdrop", - "type": "boolean", - "mutable": false, - "attr": "show-backdrop", - "reflectToAttr": false, - "docs": "If `true`, a backdrop will be displayed behind the picker.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "dismiss", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "dismiss(data?: any, role?: string | undefined) => Promise", - "parameters": [], - "docs": "Dismiss the picker overlay after it has been presented.", - "docsTags": [ - { - "name": "param", - "text": "data Any data to emit in the dismiss events." - }, - { - "name": "param", - "text": "role The role of the element that is dismissing the picker.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the picker.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`." - } - ] - }, - { - "name": "getColumn", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getColumn(name: string) => Promise", - "parameters": [], - "docs": "Get the column that matches the specified name.", - "docsTags": [ - { - "name": "param", - "text": "name The name of the column." - } - ] - }, - { - "name": "onDidDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onDidDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the picker did dismiss.", - "docsTags": [] - }, - { - "name": "onWillDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onWillDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the picker will dismiss.", - "docsTags": [] - }, - { - "name": "present", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "present() => Promise", - "parameters": [], - "docs": "Present the picker overlay after it has been created.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionPickerDidDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the picker has dismissed.", - "docsTags": [] - }, - { - "event": "ionPickerDidPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the picker has presented.", - "docsTags": [] - }, - { - "event": "ionPickerWillDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the picker has dismissed.", - "docsTags": [] - }, - { - "event": "ionPickerWillPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the picker has presented.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--backdrop-opacity", - "annotation": "prop", - "docs": "Opacity of the backdrop" - }, - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the picker" - }, - { - "name": "--background-rgb", - "annotation": "prop", - "docs": "Background of the picker in rgb format" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Border color of the picker" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the picker" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Border style of the picker" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Border width of the picker" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "Height of the picker" - }, - { - "name": "--max-height", - "annotation": "prop", - "docs": "Maximum height of the picker" - }, - { - "name": "--max-width", - "annotation": "prop", - "docs": "Maximum width of the picker" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the picker" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the picker" - }, - { - "name": "--width", - "annotation": "prop", - "docs": "Width of the picker" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [ - "ion-backdrop", - "ion-picker-column" - ], - "dependencyGraph": { - "ion-picker": [ - "ion-backdrop", - "ion-picker-column" - ] - } - }, - { - "filePath": "./src/components/popover/popover.tsx", - "encapsulation": "shadow", - "tag": "ion-popover", - "readme": "# ion-popover\n\nA Popover is a dialog that appears on top of the current page. It can be used for anything, but generally it is used for overflow actions that don't fit in the navigation bar.\n\nThere are two ways to use `ion-popover`: inline or via the `popoverController`. Each method comes with different considerations, so be sure to use the approach that best fits your use case.\n\n## Inline Popovers\n\n`ion-popover` can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the popover. See [Usage](#usage) for an example of how to write a popover inline. \n\nWhen using `ion-popover` with Angular, React, or Vue, the component you pass in will be destroyed when the popover is dismissed. As this functionality is provided by the JavaScript framework, using `ion-popover` without a JavaScript framework will not destroy the component you passed in. If this is a needed functionality, we recommend using the `popoverController` instead.\n\n### Angular \n\nSince the component you passed in needs to be created when the popover is presented and destroyed when the popover is dismissed, we are unable to project the content using `` internally. Instead, we use `` which expects an `` to be passed in. As a result, when passing in your component you will need to wrap it in an ``:\n\n```html\n\n \n \n \n\n```\n\n### When to use\n\nUsing a popover inline is useful when you do not want to explicitly wire up click events to open the popover. For example, you can use the `trigger` property to designate a button that should present the popover when clicked. You can also use the `trigger-action` property to customize whether the popover should be presented when the trigger is left clicked, right clicked, or hovered over.\n\nIf you need fine grained control over when the popover is presented and dismissed, we recommend you use the `popoverController`. \n\n## Controller Popovers\n\n`ion-popover` can also be presented programmatically by using the `popoverController` imported from Ionic Framework. This allows you to have complete control over when a popover is presented above and beyond the customization that inline popovers give you. See [Usage](#usage) for an example of how to use the `popoverController`.\n\n### When to use\n\nWe typically recommend that you write your popovers inline as it streamlines the amount of code in your application. You should only use the `popoverController` for complex use cases where writing a popover inline is impractical. When using a controller, your popover is not created ahead of time, so properties such as `trigger` and `trigger-action` are not applicable here. In addition, nested popovers are not compatible with the controller approach because the popover is automatically added to the root of your application when the `create` method is called.\n\n\n## Styling\n\nPopovers are presented at the root of your application so they overlay your entire app. This behavior applies to both inline popovers and popovers presented from a controller. As a result, custom popover styles can not be scoped to a particular component as they will not apply to the popover. Instead, styles must be applied globally. For most developers, placing the custom styles in `global.css` is sufficient.\n\n> If you are building an Ionic Angular app, the styles need to be added to a global stylesheet file. Read [Style Placement](#style-placement) in the Angular section below for more information.\n\n\n## Triggers\n\nA trigger for an `ion-popover` is the element that will open a popover when interacted with. The interaction behavior can be customized by setting the `trigger-action` property. Note that `trigger-action=\"context-menu\"` will prevent your system's default context menu from opening. View the [Usage](#usage) section for an example of how to use triggers.\n\n> Triggers are not applicable when using the `popoverController` because the `ion-popover` is not created ahead of time.\n\n## Positioning\n\n### Reference\n\nWhen presenting a popover, Ionic Framework needs a reference point to present the popover relative to. With `reference=\"event\"`, the popover will be presented relative to the x-y coordinates of the pointer event that was dispatched on your trigger element. With `reference=\"trigger\"`, the popover will be presented relative to the bounding box of your trigger element.\n\n### Side\n\nRegardless of what you choose for your reference point, you can position a popover to the `top`, `right`, `left`, or `bottom` of your reference point by using the `side` property. You can also use the `start` or `end` values if you would like the side to switch based on LTR or RTL modes.\n\n### Alignment\n\nThe `alignment` property allows you to line up an edge of your popover with a corresponding edge on your trigger element. The exact edge that is used depends on the value of the `side` property. \n\n### Offsets\n\nIf you need finer grained control over the positioning of your popover you can use the `--offset-x` and `--offset-y` CSS Variables. For example, `--offset-x: 10px` will move your popover content to the right by `10px`.\n\n## Sizing\n\nWhen making dropdown menus, you may want to have the width of the popover match the width of the trigger element. Doing this without knowing the trigger width ahead of time is tricky. You can set the `size` property to `'cover'` and Ionic Framework will ensure that the width of the popover matches the width of your trigger element. If you are using the `popoverController`, you must provide an event via the `event` option and Ionic Framework will use `event.target` as the reference element.\n\n## Nested Popovers\n\nWhen using `ion-popover` inline, you can nested popovers to create nested dropdown menus. When doing this, only the backdrop on the first popover will appear so that the screen does not get progressively darker as you open more popovers. See the [Usage](./#usage) section for an example on how to write a nested popover.\n\nYou can use the `dismissOnSelect` property to automatically close the popover when the popover content has been clicked. This behavior does not apply when clicking a trigger element for another popover.\n\n> Nested popovers cannot be created when using the `popoverController` because the popover is automatically added to the root of your application when the `create` method is called.\n\n## Interfaces\n\nBelow you will find all of the options available to you when using the `popoverController`. These options should be supplied when calling `popoverController.create()`.\n\n```typescript\ninterface PopoverOptions {\n component: any;\n componentProps?: { [key: string]: any };\n showBackdrop?: boolean;\n backdropDismiss?: boolean;\n translucent?: boolean;\n cssClass?: string | string[];\n event?: Event;\n animated?: boolean;\n\n mode?: 'ios' | 'md';\n keyboardClose?: boolean;\n id?: string;\n htmlAttributes?: PopoverAttributes;\n\n enterAnimation?: AnimationBuilder;\n leaveAnimation?: AnimationBuilder;\n \n size?: PopoverSize;\n dismissOnSelect?: boolean;\n reference?: PositionReference;\n side?: PositionSide;\n alignment?: PositionAlign;\n arrow?: boolean;\n}\n```\n\n### PopoverAttributes\n\n```typescript\ninterface PopoverAttributes extends JSXBase.HTMLAttributes {}\n```\n\n## Types\n\nBelow you will find all of the custom types for `ion-popover`:\n\n```typescript\ntype PopoverSize = 'cover' | 'auto';\ntype TriggerAction = 'click' | 'hover' | 'context-menu';\ntype PositionReference = 'trigger' | 'event';\ntype PositionSide = 'top' | 'right' | 'bottom' | 'left' | 'start' | 'end';\ntype PositionAlign = 'start' | 'center' | 'end';\n```\n\n## Accessibility\n\n### Keyboard Navigation\n\n`ion-popover` has basic keyboard support for navigating between focusable elements inside of the popover. The following table details what each key does:\n\n| Key | Function |\n| ------------------ | ------------------------------------------------------------ |\n| `Tab` | Moves focus to the next focusable element. |\n| `Shift` + `Tab` | Moves focus to the previous focusable element. |\n| `Esc` | Closes the popover. |\n| `Space` or `Enter` | Clicks the focusable element. |\n\n\n`ion-popover` has full arrow key support for navigating between `ion-item` elements with the `button` property. The most common use case for this is as a dropdown menu in a desktop-focused application. In addition to the basic keyboard support, the following table details arrow key support for dropdown menus:\n\n| Key | Function |\n| ------------------ | -------------------------------------------------------------- |\n| `ArrowUp` | Moves focus to the previous focusable element. |\n| `ArrowDown` | Moves focus to the next focusable element. |\n| `Home` | Moves focus to the first focusable element. |\n| `End` | Moves focus to the last focusable element. |\n| `ArrowLeft` | When used in a child popover, closes the popover and returns focus to the parent popover. |\n| `Space`, `Enter`, and `ArrowRight` | When focusing a trigger element, opens the associated popover. |\n", - "docs": "A Popover is a dialog that appears on top of the current page. It can be used for anything, but generally it is used for overflow actions that don't fit in the navigation bar.\n\nThere are two ways to use `ion-popover`: inline or via the `popoverController`. Each method comes with different considerations, so be sure to use the approach that best fits your use case.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "- Content is placed inside of the `.popover-content` element." - }, - { - "name": "part", - "text": "backdrop - The `ion-backdrop` element." - }, - { - "name": "part", - "text": "arrow - The arrow that points to the reference element. Only applies on `ios` mode." - }, - { - "name": "part", - "text": "content - The wrapper element for the default slot." - } - ], - "usage": { - "angular": "### Inline Popover\n\n```html\n\n\n \n Popover Content\n \n\n\n\n\n \n Popover Content\n \n\n\n\nClick to open popover\n\n \n Popover Content\n \n\n\n\nHover to open popover\n\n \n Popover Content\n \n\n\n\nClick to open popover\n\n \n Popover Content\n \n\n\n\nClick to open popover\n\n \n Popover Content\n \n\n\n\nClick to open popover\n\n \n Popover Content\n \n\n\n\nClick to open popover\n\n \n Popover Content\n \n\n\n\nClick to open popover\n\n \n \n \n \n Option 1\n \n \n Option 2\n \n \n Option 3\n \n \n \n \n \n \n Nested Option\n \n \n \n \n \n \n \n\n```\n\n### Popover Controller\n\n```typescript\nimport { Component } from '@angular/core';\nimport { PopoverController } from '@ionic/angular';\nimport { PopoverComponent } from '../../component/popover/popover.component';\n\n@Component({\n selector: 'popover-example',\n templateUrl: 'popover-example.html',\n styleUrls: ['./popover-example.css']\n})\nexport class PopoverExample {\n constructor(public popoverController: PopoverController) {}\n\n async presentPopover(ev: any) {\n const popover = await this.popoverController.create({\n component: PopoverComponent,\n cssClass: 'my-custom-class',\n event: ev,\n translucent: true\n });\n await popover.present();\n \n const { role } = await popover.onDidDismiss();\n console.log('onDidDismiss resolved with role', role);\n }\n}\n```\n\n\n### Style Placement\n\nIn Angular, the CSS of a specific page is scoped only to elements of that page. Even though the Popover can be presented from within a page, the `ion-popover` element is appended outside of the current page. This means that any custom styles need to go in a global stylesheet file. In an Ionic Angular starter this can be the `src/global.scss` file or you can register a new global style file by [adding to the `styles` build option in `angular.json`](https://angular.io/guide/workspace-config#style-script-config).\n", - "javascript": "### Inline Popover\n\n```html\n\n\n Popover Content\n\n\n\n\n Popover Content\n\n\n\nClick to open popover\n\n Popover Content\n\n\n\nHover to open popover\n\n Popover Content\n\n\n\nClick to open popover\n\n Popover Content\n\n\n\nClick to open popover\n\n Popover Content\n\n\n\nClick to open popover\n\n Popover Content\n\n\n\nClick to open popover\n\n Popover Content\n\n\n\nClick to open popover\n\n \n \n \n Option 1\n \n \n Option 2\n \n \n Option 3\n \n \n \n \n \n Nested Option\n \n \n \n \n \n\n```\n\n### Using JavaScript\n\n```javascript\nclass PopoverExamplePage extends HTMLElement {\n constructor() {\n super();\n }\n\n connectedCallback() {\n this.innerHTML = `\n \n \n Ionic\n Item 0\n Item 1\n Item 2\n Item 3\n \n \n `;\n }\n}\n\ncustomElements.define('popover-example-page', PopoverExamplePage);\n\nasync function presentPopover(ev) {\n const popover = Object.assign(document.createElement('ion-popover'), {\n component: 'popover-example-page',\n cssClass: 'my-custom-class',\n event: ev,\n translucent: true\n });\n document.body.appendChild(popover);\n\n await popover.present();\n\n const { role } = await popover.onDidDismiss();\n console.log('onDidDismiss resolved with role', role);\n}\n```\n", - "react": "### Inline Popover\n\n```tsx\nimport React, { useState } from 'react';\nimport { IonPopover, IonContent, IonItem, IonLabel, IonButton } from '@ionic/react';\n\nexport const PopoverExample: React.FC = () => {\n return (\n <>\n {/* Default */}\n \n Popover Content\n \n \n {/* No Arrow */}\n \n Popover Content\n \n \n {/* Use a trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Hover over trigger to open */}\n Hover to open popover\n \n Popover Content\n \n \n {/* Show popover above trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Align popover to end of trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Make popover the same size as the trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Make popover show relative to click coordinates rather than trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Nested Popover */}\n Click to open popover\n \n \n \n \n Option 1\n \n \n Option 2\n \n \n Option 3\n \n \n \n \n \n Nested Option\n \n \n \n \n \n \n \n );\n};\n```\n\n### Inline Popover with State\n\n```tsx\nimport React, { useState } from 'react';\nimport { IonPopover, IonButton } from '@ionic/react';\n\nexport const PopoverExample: React.FC = () => {\n const [popoverState, setShowPopover] = useState({ showPopover: false, event: undefined });\n\n return (\n <>\n setShowPopover({ showPopover: false, event: undefined })}\n >\n

This is popover content

\n \n {\n e.persist();\n setShowPopover({ showPopover: true, event: e })\n }}\n >\n Show Popover\n \n \n );\n};\n```\n\n### useIonPopover Hook\n\n> `useIonPopover` requires being a descendant of ``. If you need to use a popover outside of an ``, consider using the component method instead.\n\n```tsx\nimport React from 'react';\nimport {\n IonButton,\n IonContent,\n IonItem,\n IonList,\n IonListHeader,\n IonPage,\n useIonPopover,\n} from '@ionic/react';\n\nconst PopoverList: React.FC<{\n onHide: () => void;\n}> = ({ onHide }) => (\n \n Ionic\n Learn Ionic\n Documentation\n Showcase\n GitHub Repo\n \n Close\n \n \n);\n\nconst PopoverExample: React.FC = () => {\n const [present, dismiss] = useIonPopover(PopoverList, { onHide: () => dismiss() });\n \n return (\n \n \n \n present({\n event: e.nativeEvent,\n })\n }\n >\n Show Popover\n \n \n \n );\n};\n```", - "stencil": "### Inline Popover\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'popover-example',\n styleUrl: 'popover-example.css'\n})\nexport class PopoverExample {\n render() {\n return [\n \n {/* Default */}\n \n Popover Content\n \n \n {/* No Arrow */}\n \n Popover Content\n \n \n {/* Use a trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Hover over trigger to open */}\n Hover to open popover\n \n Popover Content\n \n \n {/* Show popover above trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Align popover to end of trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Make popover the same size as the trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Make popover show relative to click coordinates rather than trigger */}\n Click to open popover\n \n Popover Content\n \n \n {/* Nested Popover */}\n Click to open popover\n \n \n \n \n Option 1\n \n \n Option 2\n \n \n Option 3\n \n \n \n \n \n Nested Option\n \n \n \n \n \n \n \n ];\n }\n}\n```\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'page-popover',\n styleUrl: 'page-popover.css',\n})\nexport class PagePopover {\n render() {\n return [\n \n \n Documentation\n \n \n Feedback\n \n \n Settings\n \n \n ];\n }\n}\n```\n\n### Popover Controller\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\nimport { popoverController } from '@ionic/core';\n\n@Component({\n tag: 'popover-example',\n styleUrl: 'popover-example.css'\n})\nexport class PopoverExample {\n async presentPopover(ev: any) {\n const popover = await popoverController.create({\n component: 'page-popover',\n cssClass: 'my-custom-class',\n event: ev,\n translucent: true\n });\n await popover.present();\n \n const { role } = await popover.onDidDismiss();\n console.log('onDidDismiss resolved with role', role);\n }\n\n render() {\n return [\n \n this.presentPopover(ev)}>Present Popover\n \n ];\n }\n}\n```\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'page-popover',\n styleUrl: 'page-popover.css',\n})\nexport class PagePopover {\n render() {\n return [\n \n \n Documentation\n \n \n Feedback\n \n \n Settings\n \n \n ];\n }\n}\n```", - "vue": "### Inline Popover\n\n```html\n\n\n\n```\n\n\n### Inline Popover with State\n\n```html\n\n\n\n```\n\n### Popover Controller\n\n```html\n\n\n\n```\n\n```html\n\n\n\n```" - }, - "props": [ - { - "name": "alignment", - "type": "\"center\" | \"end\" | \"start\" | undefined", - "mutable": true, - "attr": "alignment", - "reflectToAttr": false, - "docs": "Describes how to align the popover content with the `reference` point.\nDefaults to `'center'` for `ios` mode, and `'start'` for `md` mode.", - "docsTags": [], - "values": [ - { - "value": "center", - "type": "string" - }, - { - "value": "end", - "type": "string" - }, - { - "value": "start", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the popover will animate.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "arrow", - "type": "boolean", - "mutable": false, - "attr": "arrow", - "reflectToAttr": false, - "docs": "If `true`, the popover will display an arrow\nthat points at the `reference` when running in `ios` mode\non mobile. Does not apply in `md` mode or on desktop.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "backdropDismiss", - "type": "boolean", - "mutable": false, - "attr": "backdrop-dismiss", - "reflectToAttr": false, - "docs": "If `true`, the popover will be dismissed when the backdrop is clicked.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "component", - "type": "Function | HTMLElement | null | string | undefined", - "mutable": false, - "attr": "component", - "reflectToAttr": false, - "docs": "The component to display inside of the popover.\nYou only need to use this if you are not using\na JavaScript framework. Otherwise, you can just\nslot your component inside of `ion-popover`.", - "docsTags": [], - "values": [ - { - "type": "Function" - }, - { - "type": "HTMLElement" - }, - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "componentProps", - "type": "undefined | { [key: string]: any; }", - "mutable": false, - "reflectToAttr": false, - "docs": "The data to pass to the popover component.\nYou only need to use this if you are not using\na JavaScript framework. Otherwise, you can just\nset the props directly on your component.", - "docsTags": [], - "values": [ - { - "type": "undefined" - }, - { - "type": "{ [key: string]: any; }" - } - ], - "optional": true, - "required": false - }, - { - "name": "dismissOnSelect", - "type": "boolean", - "mutable": false, - "attr": "dismiss-on-select", - "reflectToAttr": false, - "docs": "If `true`, the popover will be automatically\ndismissed when the content has been clicked.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "enterAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the popover is presented.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "event", - "type": "any", - "mutable": false, - "attr": "event", - "reflectToAttr": false, - "docs": "The event to pass to the popover animation.", - "docsTags": [], - "values": [ - { - "type": "any" - } - ], - "optional": false, - "required": false - }, - { - "name": "htmlAttributes", - "type": "PopoverAttributes | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Additional attributes to pass to the popover.", - "docsTags": [], - "values": [ - { - "type": "PopoverAttributes" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "isOpen", - "type": "boolean", - "mutable": false, - "attr": "is-open", - "reflectToAttr": false, - "docs": "If `true`, the popover will open. If `false`, the popover will close.\nUse this if you need finer grained control over presentation, otherwise\njust use the popoverController or the `trigger` property.\nNote: `isOpen` will not automatically be set back to `false` when\nthe popover dismisses. You will need to do that in your code.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "keyboardClose", - "type": "boolean", - "mutable": false, - "attr": "keyboard-close", - "reflectToAttr": false, - "docs": "If `true`, the keyboard will be automatically dismissed when the overlay is presented.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "leaveAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "Animation to use when the popover is dismissed.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "reference", - "type": "\"event\" | \"trigger\"", - "mutable": false, - "attr": "reference", - "reflectToAttr": false, - "docs": "Describes what to position the popover relative to.\nIf `'trigger'`, the popover will be positioned relative\nto the trigger button. If passing in an event, this is\ndetermined via event.target.\nIf `'event'`, the popover will be positioned relative\nto the x/y coordinates of the trigger action. If passing\nin an event, this is determined via event.clientX and event.clientY.", - "docsTags": [], - "default": "'trigger'", - "values": [ - { - "value": "event", - "type": "string" - }, - { - "value": "trigger", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "showBackdrop", - "type": "boolean", - "mutable": false, - "attr": "show-backdrop", - "reflectToAttr": false, - "docs": "If `true`, a backdrop will be displayed behind the popover.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "side", - "type": "\"bottom\" | \"end\" | \"left\" | \"right\" | \"start\" | \"top\"", - "mutable": false, - "attr": "side", - "reflectToAttr": false, - "docs": "Describes which side of the `reference` point to position\nthe popover on. The `'start'` and `'end'` values are RTL-aware,\nand the `'left'` and `'right'` values are not.", - "docsTags": [], - "default": "'bottom'", - "values": [ - { - "value": "bottom", - "type": "string" - }, - { - "value": "end", - "type": "string" - }, - { - "value": "left", - "type": "string" - }, - { - "value": "right", - "type": "string" - }, - { - "value": "start", - "type": "string" - }, - { - "value": "top", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "size", - "type": "\"auto\" | \"cover\"", - "mutable": false, - "attr": "size", - "reflectToAttr": false, - "docs": "Describes how to calculate the popover width.\nIf `'cover'`, the popover width will match the width of the trigger.\nIf `'auto'`, the popover width will be determined by the content in\nthe popover.", - "docsTags": [], - "default": "'auto'", - "values": [ - { - "value": "auto", - "type": "string" - }, - { - "value": "cover", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the popover will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "trigger", - "type": "string | undefined", - "mutable": false, - "attr": "trigger", - "reflectToAttr": false, - "docs": "An ID corresponding to the trigger element that\ncauses the popover to open. Use the `trigger-action`\nproperty to customize the interaction that results in\nthe popover opening.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "triggerAction", - "type": "\"click\" | \"context-menu\" | \"hover\"", - "mutable": false, - "attr": "trigger-action", - "reflectToAttr": false, - "docs": "Describes what kind of interaction with the trigger that\nshould cause the popover to open. Does not apply when the `trigger`\nproperty is `undefined`.\nIf `'click'`, the popover will be presented when the trigger is left clicked.\nIf `'hover'`, the popover will be presented when a pointer hovers over the trigger.\nIf `'context-menu'`, the popover will be presented when the trigger is right\nclicked on desktop and long pressed on mobile. This will also prevent your\ndevice's normal context menu from appearing.", - "docsTags": [], - "default": "'click'", - "values": [ - { - "value": "click", - "type": "string" - }, - { - "value": "context-menu", - "type": "string" - }, - { - "value": "hover", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "dismiss", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "dismiss(data?: any, role?: string | undefined, dismissParentPopover?: boolean) => Promise", - "parameters": [], - "docs": "Dismiss the popover overlay after it has been presented.", - "docsTags": [ - { - "name": "param", - "text": "data Any data to emit in the dismiss events." - }, - { - "name": "param", - "text": "role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'." - }, - { - "name": "param", - "text": "dismissParentPopover If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true`." - } - ] - }, - { - "name": "onDidDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onDidDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the popover did dismiss.", - "docsTags": [] - }, - { - "name": "onWillDismiss", - "returns": { - "type": "Promise>", - "docs": "" - }, - "signature": "onWillDismiss() => Promise>", - "parameters": [], - "docs": "Returns a promise that resolves when the popover will dismiss.", - "docsTags": [] - }, - { - "name": "present", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "present(event?: MouseEvent | TouchEvent | PointerEvent | CustomEvent | undefined) => Promise", - "parameters": [], - "docs": "Present the popover overlay after it has been created.\nDevelopers can pass a mouse, touch, or pointer event\nto position the popover relative to where that event\nwas dispatched.", - "docsTags": [] - } - ], - "events": [ - { - "event": "didDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the popover has dismissed.\nShorthand for ionPopoverDidDismiss.", - "docsTags": [] - }, - { - "event": "didPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the popover has presented.\nShorthand for ionPopoverWillDismiss.", - "docsTags": [] - }, - { - "event": "ionPopoverDidDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the popover has dismissed.", - "docsTags": [] - }, - { - "event": "ionPopoverDidPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the popover has presented.", - "docsTags": [] - }, - { - "event": "ionPopoverWillDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the popover has dismissed.", - "docsTags": [] - }, - { - "event": "ionPopoverWillPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the popover has presented.", - "docsTags": [] - }, - { - "event": "willDismiss", - "detail": "OverlayEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the popover has dismissed.\nShorthand for ionPopoverWillDismiss.", - "docsTags": [] - }, - { - "event": "willPresent", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the popover has presented.\nShorthand for ionPopoverWillPresent.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--backdrop-opacity", - "annotation": "prop", - "docs": "Opacity of the backdrop" - }, - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the popover" - }, - { - "name": "--box-shadow", - "annotation": "prop", - "docs": "Box shadow of the popover" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "Height of the popover" - }, - { - "name": "--max-height", - "annotation": "prop", - "docs": "Maximum height of the popover" - }, - { - "name": "--max-width", - "annotation": "prop", - "docs": "Maximum width of the popover" - }, - { - "name": "--min-height", - "annotation": "prop", - "docs": "Minimum height of the popover" - }, - { - "name": "--min-width", - "annotation": "prop", - "docs": "Minimum width of the popover" - }, - { - "name": "--offset-x", - "annotation": "prop", - "docs": "The amount to move the popover by on the x-axis" - }, - { - "name": "--offset-y", - "annotation": "prop", - "docs": "The amount to move the popover by on the y-axis" - }, - { - "name": "--width", - "annotation": "prop", - "docs": "Width of the popover" - } - ], - "slots": [ - { - "name": "", - "docs": "Content is placed inside of the `.popover-content` element." - } - ], - "parts": [ - { - "name": "arrow", - "docs": "The arrow that points to the reference element. Only applies on `ios` mode." - }, - { - "name": "backdrop", - "docs": "The `ion-backdrop` element." - }, - { - "name": "content", - "docs": "The wrapper element for the default slot." - } - ], - "dependents": [ - "ion-datetime", - "ion-select" - ], - "dependencies": [ - "ion-backdrop" - ], - "dependencyGraph": { - "ion-popover": [ - "ion-backdrop" - ], - "ion-datetime": [ - "ion-popover" - ], - "ion-select": [ - "ion-popover" - ] - } - }, - { - "filePath": "./src/components/progress-bar/progress-bar.tsx", - "encapsulation": "shadow", - "tag": "ion-progress-bar", - "readme": "# ion-progress-bar\n\nProgress bars inform users about the status of ongoing processes, such as loading an app, submitting a form, or saving updates. There are two types of progress bars: `determinate` and `indeterminate`.\n\n## Progress Type\n\n### Determinate\n\nDeterminate is the default type. It should be used when the percentage of an operation is known. The progress is represented by setting the `value` property. This can be used to show the progress increasing from 0 to 100% of the track.\n\nIf the `buffer` property is set, a buffer stream will show with animated circles to indicate activity. The value of the `buffer` property will also be represented by how much visible track there is. If the value of `buffer` is less than the `value` property, there will be no visible track. If `buffer` is equal to `1` then the buffer stream will be hidden.\n\n### Indeterminate\n\nThe indeterminate type should be used when it is unknown how long the process will take. The progress bar is not tied to the `value`, instead it continually slides along the track until the process is complete.\n", - "docs": "Progress bars inform users about the status of ongoing processes, such as loading an app, submitting a form, or saving updates. There are two types of progress bars: `determinate` and `indeterminate`.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "progress - The progress bar that shows the current value when `type` is `\"determinate\"` and slides back and forth when `type` is `\"indeterminate\"`." - }, - { - "name": "part", - "text": "stream - The animated circles that appear while buffering. This only shows when `buffer` is set and `type` is `\"determinate\"`." - }, - { - "name": "part", - "text": "track - The track bar behind the progress bar. If the `buffer` property is set and `type` is `\"determinate\"` the track will be the\nwidth of the `buffer` value." - } - ], - "usage": { - "angular": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n```\n", - "javascript": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonProgressBar, IonContent } from '@ionic/react';\n\nexport const ProgressbarExample: React.FC = () => (\n \n {/*-- Default Progressbar --*/}\n
\n\n {/*-- Default Progressbar with 50 percent --*/}\n
\n\n {/*-- Colorize Progressbar --*/}\n
\n
\n\n {/*-- Other types --*/}\n
\n
\n
\n
\n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'progress-bar-example',\n styleUrl: 'progress-bar-example.css'\n})\nexport class ProgressBarExample {\n render() {\n return [\n // Default Progressbar\n ,\n\n // Default Progressbar with 50 percent\n ,\n\n // Colorize Progressbar\n ,\n ,\n\n // Other types\n ,\n ,\n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "buffer", - "type": "number", - "mutable": false, - "attr": "buffer", - "reflectToAttr": false, - "docs": "If the buffer and value are smaller than 1, the buffer circles will show.\nThe buffer should be between [0, 1].", - "docsTags": [], - "default": "1", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "reversed", - "type": "boolean", - "mutable": false, - "attr": "reversed", - "reflectToAttr": false, - "docs": "If true, reverse the progress bar direction.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "\"determinate\" | \"indeterminate\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The state of the progress bar, based on if the time the process takes is known or not.\nDefault options are: `\"determinate\"` (no animation), `\"indeterminate\"` (animate from left to right).", - "docsTags": [], - "default": "'determinate'", - "values": [ - { - "value": "determinate", - "type": "string" - }, - { - "value": "indeterminate", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "number", - "mutable": false, - "attr": "value", - "reflectToAttr": false, - "docs": "The value determines how much of the active bar should display when the\n`type` is `\"determinate\"`.\nThe value should be between [0, 1].", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the progress track, or the buffer bar if `buffer` is set" - }, - { - "name": "--buffer-background", - "annotation": "prop", - "docs": "DEPRECATED, use `--background` instead" - }, - { - "name": "--progress-background", - "annotation": "prop", - "docs": "Background of the progress bar representing the current value" - } - ], - "slots": [], - "parts": [ - { - "name": "progress", - "docs": "The progress bar that shows the current value when `type` is `\"determinate\"` and slides back and forth when `type` is `\"indeterminate\"`." - }, - { - "name": "stream", - "docs": "The animated circles that appear while buffering. This only shows when `buffer` is set and `type` is `\"determinate\"`." - }, - { - "name": "track", - "docs": "The track bar behind the progress bar. If the `buffer` property is set and `type` is `\"determinate\"` the track will be the\nwidth of the `buffer` value." - } - ], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/radio/radio.tsx", - "encapsulation": "shadow", - "tag": "ion-radio", - "readme": "# ion-radio\n\nRadios should be used inside of an [`ion-radio-group`](../radio-group). Pressing on a radio will check it. They can also be checked programmatically by setting the value property of the parent `ion-radio-group` to the value of the radio.\n\nWhen radios are inside of a radio group, only one radio in the group will be checked at any time. Pressing a radio will check it and uncheck the previously selected radio, if there is one. If a radio is not in a group with another radio, then both radios will have the ability to be checked at the same time.\n\n\n\n", - "docs": "Radios should be used inside of an [`ion-radio-group`](../radio-group). Pressing on a radio will check it. They can also be checked programmatically by setting the value property of the parent `ion-radio-group` to the value of the radio.\n\nWhen radios are inside of a radio group, only one radio in the group will be checked at any time. Pressing a radio will check it and uncheck the previously selected radio, if there is one. If a radio is not in a group with another radio, then both radios will have the ability to be checked at the same time.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "container - The container for the radio mark." - }, - { - "name": "part", - "text": "mark - The checkmark or dot used to indicate the checked state." - } - ], - "usage": { - "angular": "```html\n\n \n \n Name\n \n\n \n Biff\n \n \n\n \n Griff\n \n \n\n \n Buford\n \n \n \n\n```\n", - "javascript": "```html\n\n \n \n Name\n \n\n \n Biff\n \n \n\n \n Griff\n \n \n\n \n Buford\n \n \n \n\n```\n", - "react": "```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonList, IonRadioGroup, IonListHeader, IonLabel, IonItem, IonRadio, IonItemDivider } from '@ionic/react';\n\nexport const RadioExamples: React.FC = () => {\n const [selected, setSelected] = useState('biff');\n return (\n \n \n \n Radio Examples\n \n \n \n \n setSelected(e.detail.value)}>\n \n Name\n \n\n \n Biff\n \n \n\n \n Griff\n \n \n\n \n Buford\n \n \n \n Your Selection\n {selected ?? '(none selected'}\n \n \n \n );\n};\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'radio-example',\n styleUrl: 'radio-example.css'\n})\nexport class RadioExample {\n render() {\n return [\n \n \n \n Name\n \n\n \n Biff\n \n \n\n \n Griff\n \n \n\n \n Buford\n \n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the radio.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "this.inputId", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "any", - "mutable": false, - "attr": "value", - "reflectToAttr": false, - "docs": "the value of the radio.", - "docsTags": [], - "values": [ - { - "type": "any" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the radio button loses focus.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the radio button has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the radio" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the radio" - }, - { - "name": "--color-checked", - "annotation": "prop", - "docs": "Color of the checked radio" - }, - { - "name": "--inner-border-radius", - "annotation": "prop", - "docs": "Border radius of the inner checked radio" - } - ], - "slots": [], - "parts": [ - { - "name": "container", - "docs": "The container for the radio mark." - }, - { - "name": "mark", - "docs": "The checkmark or dot used to indicate the checked state." - } - ], - "dependents": [ - "ion-select-popover" - ], - "dependencies": [], - "dependencyGraph": { - "ion-select-popover": [ - "ion-radio" - ] - } - }, - { - "filePath": "./src/components/radio-group/radio-group.tsx", - "encapsulation": "none", - "tag": "ion-radio-group", - "readme": "# ion-radio-group\n\nA radio group is a group of [radio buttons](../radio). It allows\na user to select at most one radio button from a set. Checking one radio\nbutton that belongs to a radio group unchecks any previous checked\nradio button within the same group.\n\n## Interfaces\n\n### RadioGroupChangeEventDetail\n\n```typescript\ninterface RadioGroupChangeEventDetail {\n value: T;\n}\n```\n\n### RadioGroupCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface RadioGroupCustomEvent extends CustomEvent {\n detail: RadioGroupChangeEventDetail;\n target: HTMLIonRadioGroupElement;\n}\n```\n", - "docs": "A radio group is a group of [radio buttons](../radio). It allows\na user to select at most one radio button from a set. Checking one radio\nbutton that belongs to a radio group unchecks any previous checked\nradio button within the same group.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n \n \n Auto Manufacturers\n \n \n\n \n Cord\n \n \n\n \n Duesenberg\n \n \n\n \n Hudson\n \n \n\n \n Packard\n \n \n\n \n Studebaker\n \n \n \n\n```\n", - "javascript": "```html\n\n \n \n \n Auto Manufacturers\n \n \n\n \n Cord\n \n \n\n \n Duesenberg\n \n \n\n \n Hudson\n \n \n\n \n Packard\n \n \n\n \n Studebaker\n \n \n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonList, IonRadioGroup, IonListHeader, IonLabel, IonRadio, IonItem, IonContent } from '@ionic/react';\n\nexport const RadioGroupExample: React.FC = () => (\n \n \n \n \n \n Auto Manufacturers\n \n \n\n \n Cord\n \n \n\n \n Duesenberg\n \n \n\n \n Hudson\n \n \n\n \n Packard\n \n \n\n \n Studebaker\n \n \n \n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'radio-group-example',\n styleUrl: 'radio-group-example.css'\n})\nexport class RadioGroupExample {\n render() {\n return [\n \n \n \n \n Auto Manufacturers\n \n \n\n \n Cord\n \n \n\n \n Duesenberg\n \n \n\n \n Hudson\n \n \n\n \n Packard\n \n \n\n \n Studebaker\n \n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "allowEmptySelection", - "type": "boolean", - "mutable": false, - "attr": "allow-empty-selection", - "reflectToAttr": false, - "docs": "If `true`, the radios can be deselected.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "this.inputId", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "any", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "the value of the radio group.", - "docsTags": [], - "values": [ - { - "type": "any" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionChange", - "detail": "RadioGroupChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value has changed.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "keydown", - "target": "document", - "capture": false, - "passive": false - } - ], - "styles": [], - "slots": [], - "parts": [], - "dependents": [ - "ion-select-popover" - ], - "dependencies": [], - "dependencyGraph": { - "ion-select-popover": [ - "ion-radio-group" - ] - } - }, - { - "filePath": "./src/components/range/range.tsx", - "encapsulation": "shadow", - "tag": "ion-range", - "readme": "# ion-range\n\nThe Range slider lets users select from a range of values by moving\nthe slider knob. It can accept dual knobs, but by default one knob\ncontrols the value of the range.\n\n## Range Labels\n\nLabels can be placed on either side of the range by adding the\n`slot=\"start\"` or `slot=\"end\"` to the element. The element doesn't have to\nbe an `ion-label`, it can be added to any element to place it to the\nleft or right of the range.\n\n## Custom Pin Formatters\n\nWhen using a pin, the default behavior is to round the value that gets displayed using `Math.round()`. This behavior can be customized by passing in a formatter function to the `pinFormatter` property. See the [Usage](#usage) section for an example.\n\n## Interfaces\n\n### RangeChangeEventDetail\n\n```typescript\ninterface RangeChangeEventDetail {\n value: RangeValue;\n}\n```\n\n### RangeCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface RangeCustomEvent extends CustomEvent {\n detail: RangeChangeEventDetail;\n target: HTMLIonRangeElement;\n}\n```\n\n## Types\n\n### RangeValue\n\n```typescript\ntype RangeValue = number | { lower: number, upper: number };\n```\n", - "docs": "The Range slider lets users select from a range of values by moving\nthe slider knob. It can accept dual knobs, but by default one knob\ncontrols the value of the range.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "slot", - "text": "start - Content is placed to the left of the range slider in LTR, and to the right in RTL." - }, - { - "name": "slot", - "text": "end - Content is placed to the right of the range slider in LTR, and to the left in RTL." - }, - { - "name": "part", - "text": "tick - An inactive tick mark." - }, - { - "name": "part", - "text": "tick-active - An active tick mark." - }, - { - "name": "part", - "text": "pin - The counter that appears above a knob." - }, - { - "name": "part", - "text": "knob - The handle that is used to drag the range." - }, - { - "name": "part", - "text": "bar - The inactive part of the bar." - }, - { - "name": "part", - "text": "bar-active - The active part of the bar." - } - ], - "usage": { - "angular": "```html\n\n \n \n \n\n \n \n -200\n 200\n \n \n\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({…})\nexport class MyComponent {\n constructor() {}\n \n public customFormatter(value: number) {\n return `${value}%`\n }\n}\n```", - "javascript": "```html\n\n \n \n \n\n \n \n -200\n 200\n \n \n\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n\n\n\n```\n", - "react": "```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonList, IonItem, IonRange, IonLabel, IonIcon, IonItemDivider } from '@ionic/react';\nimport { sunny } from 'ionicons/icons';\nimport { RangeValue } from '@ionic/core';\n\nexport const RangeExamples: React.FC = () => {\n\n const [value, setValue] = useState(0);\n const [rangeValue, setRangeValue] = useState<{\n lower: number;\n upper: number;\n }>({ lower: 0, upper: 0 });\n \n const customFormatter = (value: number) => `${value}%`;\n\n return (\n \n \n \n IonRange Examples\n \n \n \n \n Default\n \n setValue(e.detail.value as number)} />\n \n \n Value: {value}\n \n\n Min & Max\n \n \n -200\n 200\n \n \n\n Icons\n \n \n \n \n \n \n\n With Snaps & Ticks\n \n \n \n\n With Snaps & No Ticks\n \n \n \n\n Dual Knobs\n \n setRangeValue(e.detail.value as any)} />\n \n \n Value: lower: {rangeValue.lower} upper: {rangeValue.upper}\n \n \n \n \n \n \n \n \n );\n};\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'range-example',\n styleUrl: 'range-example.css'\n})\nexport class RangeExample {\n private customFormatter = (value: number) => `${value}%`;\n \n render() {\n return [\n \n \n \n \n\n \n \n -200\n 200\n \n \n\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "debounce", - "type": "number", - "mutable": false, - "attr": "debounce", - "reflectToAttr": false, - "docs": "How long, in milliseconds, to wait to trigger the\n`ionChange` event after each change in the range value.\nThis also impacts form bindings such as `ngModel` or `v-model`.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the range.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "dualKnobs", - "type": "boolean", - "mutable": false, - "attr": "dual-knobs", - "reflectToAttr": false, - "docs": "Show two knobs.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "max", - "type": "number", - "mutable": false, - "attr": "max", - "reflectToAttr": false, - "docs": "Maximum integer value of the range.", - "docsTags": [], - "default": "100", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "min", - "type": "number", - "mutable": false, - "attr": "min", - "reflectToAttr": false, - "docs": "Minimum integer value of the range.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "''", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "pin", - "type": "boolean", - "mutable": false, - "attr": "pin", - "reflectToAttr": false, - "docs": "If `true`, a pin with integer value is shown when the knob\nis pressed.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "pinFormatter", - "type": "(value: number) => string | number", - "mutable": false, - "reflectToAttr": false, - "docs": "A callback used to format the pin text.\nBy default the pin text is set to `Math.round(value)`.", - "docsTags": [], - "default": "(value: number): number => Math.round(value)", - "values": [ - { - "type": "(value: number) => string" - }, - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "snaps", - "type": "boolean", - "mutable": false, - "attr": "snaps", - "reflectToAttr": false, - "docs": "If `true`, the knob snaps to tick marks evenly spaced based\non the step property value.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "step", - "type": "number", - "mutable": false, - "attr": "step", - "reflectToAttr": false, - "docs": "Specifies the value granularity.", - "docsTags": [], - "default": "1", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "ticks", - "type": "boolean", - "mutable": false, - "attr": "ticks", - "reflectToAttr": false, - "docs": "If `true`, tick marks are displayed based on the step value.\nOnly applies when `snaps` is `true`.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "number | { lower: number; upper: number; }", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "the value of the range.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - }, - { - "type": "{ lower: number; upper: number; }" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the range loses focus.", - "docsTags": [] - }, - { - "event": "ionChange", - "detail": "RangeChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value property has changed.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the range has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--bar-background", - "annotation": "prop", - "docs": "Background of the range bar" - }, - { - "name": "--bar-background-active", - "annotation": "prop", - "docs": "Background of the active range bar" - }, - { - "name": "--bar-border-radius", - "annotation": "prop", - "docs": "Border radius of the range bar" - }, - { - "name": "--bar-height", - "annotation": "prop", - "docs": "Height of the range bar" - }, - { - "name": "--height", - "annotation": "prop", - "docs": "Height of the range" - }, - { - "name": "--knob-background", - "annotation": "prop", - "docs": "Background of the range knob" - }, - { - "name": "--knob-border-radius", - "annotation": "prop", - "docs": "Border radius of the range knob" - }, - { - "name": "--knob-box-shadow", - "annotation": "prop", - "docs": "Box shadow of the range knob" - }, - { - "name": "--knob-size", - "annotation": "prop", - "docs": "Size of the range knob" - }, - { - "name": "--pin-background", - "annotation": "prop", - "docs": "Background of the range pin" - }, - { - "name": "--pin-color", - "annotation": "prop", - "docs": "Color of the range pin" - } - ], - "slots": [ - { - "name": "end", - "docs": "Content is placed to the right of the range slider in LTR, and to the left in RTL." - }, - { - "name": "start", - "docs": "Content is placed to the left of the range slider in LTR, and to the right in RTL." - } - ], - "parts": [ - { - "name": "bar", - "docs": "The inactive part of the bar." - }, - { - "name": "bar-active", - "docs": "The active part of the bar." - }, - { - "name": "knob", - "docs": "The handle that is used to drag the range." - }, - { - "name": "pin", - "docs": "The counter that appears above a knob." - }, - { - "name": "tick", - "docs": "An inactive tick mark." - }, - { - "name": "tick-active", - "docs": "An active tick mark." - } - ], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/refresher/refresher.tsx", - "encapsulation": "none", - "tag": "ion-refresher", - "readme": "# ion-refresher\n\nThe refresher provides pull-to-refresh functionality on a content component.\nThe pull-to-refresh pattern lets a user pull down on a list of data using touch\nin order to retrieve more data.\n\nData should be modified during the refresher's output events. Once the async\noperation has completed and the refreshing should end, call `complete()` on the\nrefresher.\n\n## Native Refreshers\n\nBoth iOS and Android platforms provide refreshers that take advantage of properties exposed by their respective devices that give pull to refresh a fluid, native-like feel.\n\nCertain properties such as `pullMin` and `snapbackDuration` are not compatible because much of the native refreshers are scroll-based. See [Refresher Properties](#properties) for more information.\n\n### iOS Usage\n\nUsing the iOS native `ion-refresher` requires setting the `pullingIcon` property on `ion-refresher-content` to the value of one of the available spinners. See the [Spinner Documentation](../spinner#properties) for accepted values. The `pullingIcon` defaults to the `lines` spinner on iOS. The spinner tick marks will be progressively shown as the user pulls down on the page.\n\nThe iOS native `ion-refresher` relies on rubber band scrolling in order to work properly and is only compatible with iOS devices as a result. We provide a fallback refresher for apps running in iOS mode on devices that do not support rubber band scrolling.\n\n### Android Usage\n\nUsing the MD native `ion-refresher` requires setting the `pullingIcon` property on `ion-refresher-content` to the value of one of the available spinners. See the [ion-spinner Documentation](../spinner#properties) for accepted values. `pullingIcon` defaults to the `circular` spinner on MD.\n\n## Interfaces\n\n### RefresherEventDetail\n\n```typescript\ninterface RefresherEventDetail {\n complete(): void;\n}\n```\n\n### RefresherCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface RefresherCustomEvent extends CustomEvent {\n detail: RefresherEventDetail;\n target: HTMLIonRefresherElement;\n}\n```\n", - "docs": "The refresher provides pull-to-refresh functionality on a content component.\nThe pull-to-refresh pattern lets a user pull down on a list of data using touch\nin order to retrieve more data.\n\nData should be modified during the refresher's output events. Once the async\noperation has completed and the refreshing should end, call `complete()` on the\nrefresher.", - "docsTags": [], - "usage": { - "angular": "```html\n\n\n \n \n \n\n\n\n\n \n \n \n\n\n\n\n \n \n \n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'refresher-example',\n templateUrl: 'refresher-example.html',\n styleUrls: ['./refresher-example.css'],\n})\nexport class RefresherExample {\n constructor() {}\n\n doRefresh(event) {\n console.log('Begin async operation');\n\n setTimeout(() => {\n console.log('Async operation has ended');\n event.target.complete();\n }, 2000);\n }\n}\n```", - "javascript": "```html\n\n\n \n \n \n\n\n\n\n \n \n \n\n\n\n\n \n \n \n \n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonRefresher, IonRefresherContent } from '@ionic/react';\nimport { RefresherEventDetail } from '@ionic/core';\nimport { chevronDownCircleOutline } from 'ionicons/icons';\n\nfunction doRefresh(event: CustomEvent) {\n console.log('Begin async operation');\n\n setTimeout(() => {\n console.log('Async operation has ended');\n event.detail.complete();\n }, 2000);\n}\n\nexport const RefresherExample: React.FC = () => (\n \n {/*-- Default Refresher --*/}\n \n \n \n \n \n\n {/*-- Custom Refresher Properties --*/}\n \n \n \n \n \n\n {/*-- Custom Refresher Content --*/}\n \n \n \n \n \n \n \n);\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'refresher-example',\n styleUrl: 'refresher-example.css'\n})\nexport class RefresherExample {\n doRefresh(ev: any) {\n console.log('Begin async operation');\n\n setTimeout(() => {\n console.log('Async operation has ended');\n ev.target.complete();\n }, 2000);\n }\n\n render() {\n return [\n // Default Refresher\n \n this.doRefresh(ev)}>\n \n \n ,\n\n // Custom Refresher Properties\n \n \n \n \n ,\n\n // Custom Refresher Content\n \n this.doRefresh(ev)}>\n \n \n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "closeDuration", - "type": "string", - "mutable": false, - "attr": "close-duration", - "reflectToAttr": false, - "docs": "Time it takes to close the refresher.\nDoes not apply when the refresher content uses a spinner,\nenabling the native refresher.", - "docsTags": [], - "default": "'280ms'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the refresher will be hidden.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "pullFactor", - "type": "number", - "mutable": false, - "attr": "pull-factor", - "reflectToAttr": false, - "docs": "How much to multiply the pull speed by. To slow the pull animation down,\npass a number less than `1`. To speed up the pull, pass a number greater\nthan `1`. The default value is `1` which is equal to the speed of the cursor.\nIf a negative value is passed in, the factor will be `1` instead.\n\nFor example: If the value passed is `1.2` and the content is dragged by\n`10` pixels, instead of `10` pixels the content will be pulled by `12` pixels\n(an increase of 20 percent). If the value passed is `0.8`, the dragged amount\nwill be `8` pixels, less than the amount the cursor has moved.\n\nDoes not apply when the refresher content uses a spinner,\nenabling the native refresher.", - "docsTags": [], - "default": "1", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "pullMax", - "type": "number", - "mutable": false, - "attr": "pull-max", - "reflectToAttr": false, - "docs": "The maximum distance of the pull until the refresher\nwill automatically go into the `refreshing` state.\nDefaults to the result of `pullMin + 60`.\nDoes not apply when the refresher content uses a spinner,\nenabling the native refresher.", - "docsTags": [], - "default": "this.pullMin + 60", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "pullMin", - "type": "number", - "mutable": false, - "attr": "pull-min", - "reflectToAttr": false, - "docs": "The minimum distance the user must pull down until the\nrefresher will go into the `refreshing` state.\nDoes not apply when the refresher content uses a spinner,\nenabling the native refresher.", - "docsTags": [], - "default": "60", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "snapbackDuration", - "type": "string", - "mutable": false, - "attr": "snapback-duration", - "reflectToAttr": false, - "docs": "Time it takes the refresher to snap back to the `refreshing` state.\nDoes not apply when the refresher content uses a spinner,\nenabling the native refresher.", - "docsTags": [], - "default": "'280ms'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "cancel", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "cancel() => Promise", - "parameters": [], - "docs": "Changes the refresher's state from `refreshing` to `cancelling`.", - "docsTags": [] - }, - { - "name": "complete", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "complete() => Promise", - "parameters": [], - "docs": "Call `complete()` when your async operation has completed.\nFor example, the `refreshing` state is while the app is performing\nan asynchronous operation, such as receiving more data from an\nAJAX request. Once the data has been received, you then call this\nmethod to signify that the refreshing has completed and to close\nthe refresher. This method also changes the refresher's state from\n`refreshing` to `completing`.", - "docsTags": [] - }, - { - "name": "getProgress", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getProgress() => Promise", - "parameters": [], - "docs": "A number representing how far down the user has pulled.\nThe number `0` represents the user hasn't pulled down at all. The\nnumber `1`, and anything greater than `1`, represents that the user\nhas pulled far enough down that when they let go then the refresh will\nhappen. If they let go and the number is less than `1`, then the\nrefresh will not happen, and the content will return to it's original\nposition.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionPull", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted while the user is pulling down the content and exposing the refresher.", - "docsTags": [] - }, - { - "event": "ionRefresh", - "detail": "RefresherEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the user lets go of the content and has pulled down\nfurther than the `pullMin` or pulls the content down and exceeds the pullMax.\nUpdates the refresher state to `refreshing`. The `complete()` method should be\ncalled when the async operation has completed.", - "docsTags": [] - }, - { - "event": "ionStart", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the user begins to start pulling down.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/refresher-content/refresher-content.tsx", - "encapsulation": "none", - "tag": "ion-refresher-content", - "readme": "# ion-refresher-content\n\nThe refresher content contains the text, icon and spinner to display during a pull-to-refresh. Ionic provides the pulling icon and refreshing spinner based on the platform. However, the default icon, spinner, and text can be customized based on the state of the refresher.\n\n\n", - "docs": "The refresher content contains the text, icon and spinner to display during a pull-to-refresh. Ionic provides the pulling icon and refreshing spinner based on the platform. However, the default icon, spinner, and text can be customized based on the state of the refresher.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "pullingIcon", - "type": "null | string | undefined", - "mutable": true, - "attr": "pulling-icon", - "reflectToAttr": false, - "docs": "A static icon or a spinner to display when you begin to pull down.\nA spinner name can be provided to gradually show tick marks\nwhen pulling down on iOS devices.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "pullingText", - "type": "IonicSafeString | string | undefined", - "mutable": false, - "attr": "pulling-text", - "reflectToAttr": false, - "docs": "The text you want to display when you begin to pull down.\n`pullingText` can accept either plaintext or HTML as a string.\nTo display characters normally reserved for HTML, they\nmust be escaped. For example `` would become\n`<Ionic>`\n\nFor more information: [Security Documentation](https://ionicframework.com/docs/faq/security)", - "docsTags": [], - "values": [ - { - "type": "IonicSafeString" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "refreshingSpinner", - "type": "\"bubbles\" | \"circles\" | \"circular\" | \"crescent\" | \"dots\" | \"lines\" | \"lines-sharp\" | \"lines-sharp-small\" | \"lines-small\" | null | undefined", - "mutable": true, - "attr": "refreshing-spinner", - "reflectToAttr": false, - "docs": "An animated SVG spinner that shows when refreshing begins", - "docsTags": [], - "values": [ - { - "value": "bubbles", - "type": "string" - }, - { - "value": "circles", - "type": "string" - }, - { - "value": "circular", - "type": "string" - }, - { - "value": "crescent", - "type": "string" - }, - { - "value": "dots", - "type": "string" - }, - { - "value": "lines", - "type": "string" - }, - { - "value": "lines-sharp", - "type": "string" - }, - { - "value": "lines-sharp-small", - "type": "string" - }, - { - "value": "lines-small", - "type": "string" - }, - { - "type": "null" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "refreshingText", - "type": "IonicSafeString | string | undefined", - "mutable": false, - "attr": "refreshing-text", - "reflectToAttr": false, - "docs": "The text you want to display when performing a refresh.\n`refreshingText` can accept either plaintext or HTML as a string.\nTo display characters normally reserved for HTML, they\nmust be escaped. For example `` would become\n`<Ionic>`\n\nFor more information: [Security Documentation](https://ionicframework.com/docs/faq/security)", - "docsTags": [], - "values": [ - { - "type": "IonicSafeString" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [ - "ion-spinner", - "ion-icon" - ], - "dependencyGraph": { - "ion-refresher-content": [ - "ion-spinner", - "ion-icon" - ] - } - }, - { - "filePath": "./src/components/reorder/reorder.tsx", - "encapsulation": "shadow", - "tag": "ion-reorder", - "readme": "# ion-reorder\n\nReorder is a component that allows an item in a group of items to be dragged to change its order within that group. It must be used within an `ion-reorder-group` to provide a visual drag and drop interface.\n\n`ion-reorder` is the anchor used to drag and drop the items inside of the `ion-reorder-group`. See the [Reorder Group](../reorder-group) for more information on how to complete the reorder operation.\n\n", - "docs": "Reorder is a component that allows an item in a group of items to be dragged to change its order within that group. It must be used within an `ion-reorder-group` to provide a visual drag and drop interface.\n\n`ion-reorder` is the anchor used to drag and drop the items inside of the `ion-reorder-group`. See the [Reorder Group](../reorder-group) for more information on how to complete the reorder operation.", - "docsTags": [ - { - "name": "part", - "text": "icon - The icon of the reorder handle (uses ion-icon)." - } - ], - "usage": { - "angular": "\n```html\n\n\n \n \n \n Item 1\n \n \n \n\n \n \n Item 2\n \n \n \n\n \n \n \n \n Item 3\n \n \n\n \n \n \n Item 4\n \n \n\n \n \n \n Item 5\n \n \n \n \n \n\n \n \n Item 6\n \n \n \n \n \n\n \n \n \n \n Item 7\n \n \n \n\n \n \n \n Item 8\n \n \n \n\n```", - "javascript": "\n```html\n\n\n \n \n \n Item 1\n \n \n \n\n \n \n Item 2\n \n \n \n\n \n \n \n \n Item 3\n \n \n\n \n \n \n Item 4\n \n \n\n \n \n \n Item 5\n \n \n \n \n \n\n \n \n Item 6\n \n \n \n \n \n\n \n \n \n \n Item 7\n \n \n \n\n \n \n \n Item 8\n \n \n \n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonIcon, IonItem, IonLabel, IonReorder, IonReorderGroup, IonContent } from '@ionic/react';\nimport { pizza } from 'ionicons/icons';\n\nexport const ReorderExample: React.FC = () => (\n \n {/*-- The reorder gesture is disabled by default, enable it to drag and drop items --*/}\n \n {/*-- Default reorder icon, end aligned items --*/}\n \n Item 1\n \n \n\n \n Item 2\n \n \n\n {/*-- Default reorder icon, start aligned items --*/}\n \n \n Item 3\n \n\n \n \n Item 4\n \n\n {/*-- Custom reorder icon end items --*/}\n \n Item 5\n \n \n \n \n\n \n Item 6\n \n \n \n \n\n {/*-- Items wrapped in a reorder, entire item can be dragged --*/}\n \n \n Item 7\n \n \n\n \n \n Item 8\n \n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'reorder-example',\n styleUrl: 'reorder-example.css'\n})\nexport class ReorderExample {\n render() {\n return [\n // The reorder gesture is disabled by default, enable it to drag and drop items\n \n {/* Default reorder icon, end aligned items */}\n \n \n Item 1\n \n \n \n\n \n \n Item 2\n \n \n \n\n {/* Default reorder icon, start aligned items */}\n \n \n \n Item 3\n \n \n\n \n \n \n Item 4\n \n \n\n {/* Custom reorder icon end items */}\n \n \n Item 5\n \n \n \n \n \n\n \n \n Item 6\n \n \n \n \n \n\n {/* Items wrapped in a reorder, entire item can be dragged */}\n \n \n \n Item 7\n \n \n \n\n \n \n \n Item 8\n \n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```" - }, - "props": [], - "methods": [], - "events": [], - "listeners": [ - { - "event": "click", - "capture": true, - "passive": false - } - ], - "styles": [], - "slots": [], - "parts": [ - { - "name": "icon", - "docs": "The icon of the reorder handle (uses ion-icon)." - } - ], - "dependents": [], - "dependencies": [ - "ion-icon" - ], - "dependencyGraph": { - "ion-reorder": [ - "ion-icon" - ] - } - }, - { - "filePath": "./src/components/reorder-group/reorder-group.tsx", - "encapsulation": "none", - "tag": "ion-reorder-group", - "readme": "# ion-reorder-group\n\nThe reorder group is a wrapper component for items using the `ion-reorder` component. See the [Reorder documentation](../reorder/) for further information about the anchor component that is used to drag items within the `ion-reorder-group`.\n\nOnce the user drags an item and drops it in a new position, the `ionItemReorder` event is dispatched. A handler for it should be implemented that calls the `complete()` method.\n\nThe `detail` property of the `ionItemReorder` event includes all of the relevant information about the reorder operation, including the `from` and `to` indexes. In the context of reordering, an item moves `from` an index `to` a new index.\n\n## Interfaces\n\n### ItemReorderEventDetail\n\n```typescript\ninterface ItemReorderEventDetail {\n from: number;\n to: number;\n complete: (data?: boolean | any[]) => any;\n}\n```\n\n### ItemReorderCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface ItemReorderCustomEvent extends CustomEvent {\n detail: ItemReorderEventDetail;\n target: HTMLIonReorderGroupElement;\n}\n```\n", - "docs": "The reorder group is a wrapper component for items using the `ion-reorder` component. See the [Reorder documentation](../reorder/) for further information about the anchor component that is used to drag items within the `ion-reorder-group`.\n\nOnce the user drags an item and drops it in a new position, the `ionItemReorder` event is dispatched. A handler for it should be implemented that calls the `complete()` method.\n\nThe `detail` property of the `ionItemReorder` event includes all of the relevant information about the reorder operation, including the `from` and `to` indexes. In the context of reordering, an item moves `from` an index `to` a new index.", - "docsTags": [], - "usage": { - "angular": "```html\n\n\n \n \n \n Item 1\n \n \n \n\n \n \n Item 2\n \n \n \n\n \n \n \n \n Item 3\n \n \n\n \n \n \n Item 4\n \n \n\n \n \n \n Item 5\n \n \n \n \n \n\n \n \n Item 6\n \n \n \n \n \n\n \n \n \n \n Item 7\n \n \n \n\n \n \n \n Item 8\n \n \n \n\n```\n\n```javascript\nimport { Component, ViewChild } from '@angular/core';\nimport { IonReorderGroup } from '@ionic/angular';\nimport { ItemReorderEventDetail } from '@ionic/core';\n\n@Component({\n selector: 'reorder-group-example',\n templateUrl: 'reorder-group-example.html',\n styleUrls: ['./reorder-group-example.css']\n})\nexport class ReorderGroupExample {\n @ViewChild(IonReorderGroup) reorderGroup: IonReorderGroup;\n\n constructor() {}\n\n doReorder(ev: CustomEvent) {\n // The `from` and `to` properties contain the index of the item\n // when the drag started and ended, respectively\n console.log('Dragged from index', ev.detail.from, 'to', ev.detail.to);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. This method can also be called directly\n // by the reorder group\n ev.detail.complete();\n }\n\n toggleReorderGroup() {\n this.reorderGroup.disabled = !this.reorderGroup.disabled;\n }\n}\n```\n\n### Updating Data\n\n```javascript\nimport { Component, ViewChild } from '@angular/core';\nimport { IonReorderGroup } from '@ionic/angular';\nimport { ItemReorderEventDetail } from '@ionic/core';\n\n@Component({\n selector: 'reorder-group-example',\n templateUrl: 'reorder-group-example.html',\n styleUrls: ['./reorder-group-example.css']\n})\nexport class ReorderGroupExample {\n items = [1, 2, 3, 4, 5];\n\n @ViewChild(IonReorderGroup) reorderGroup: IonReorderGroup;\n\n constructor() {}\n\n doReorder(ev: CustomEvent) {\n // Before complete is called with the items they will remain in the\n // order before the drag\n console.log('Before complete', this.items);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. Update the items variable to the\n // new order of items\n this.items = ev.detail.complete(this.items);\n\n // After complete is called the items will be in the new order\n console.log('After complete', this.items);\n }\n}\n```\n", - "javascript": "```html\n\n\n \n \n \n Item 1\n \n \n \n\n \n \n Item 2\n \n \n \n\n \n \n \n \n Item 3\n \n \n\n \n \n \n Item 4\n \n \n\n \n \n \n Item 5\n \n \n \n \n \n\n \n \n Item 6\n \n \n \n \n \n\n \n \n \n \n Item 7\n \n \n \n\n \n \n \n Item 8\n \n \n \n\n```\n\n```javascript\nconst reorderGroup = document.querySelector('ion-reorder-group');\n\nreorderGroup.addEventListener('ionItemReorder', ({detail}) => {\n // The `from` and `to` properties contain the index of the item\n // when the drag started and ended, respectively\n console.log('Dragged from index', detail.from, 'to', detail.to);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. This method can also be called directly\n // by the reorder group\n detail.complete();\n});\n```\n\n### Updating Data\n\n```javascript\nconst items = [1, 2, 3, 4, 5];\nconst reorderGroup = document.querySelector('ion-reorder-group');\n\nreorderGroup.addEventListener('ionItemReorder', ({detail}) => {\n // Before complete is called with the items they will remain in the\n // order before the drag\n console.log('Before complete', items);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. Update the items variable to the\n // new order of items\n items = detail.complete(items);\n\n // After complete is called the items will be in the new order\n console.log('After complete', items);\n});\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonItem, IonLabel, IonReorder, IonReorderGroup, IonIcon, IonContent } from '@ionic/react';\nimport { ItemReorderEventDetail } from '@ionic/core';\nimport { pizza } from 'ionicons/icons';\n\nfunction doReorder(event: CustomEvent) {\n // The `from` and `to` properties contain the index of the item\n // when the drag started and ended, respectively\n console.log('Dragged from index', event.detail.from, 'to', event.detail.to);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. This method can also be called directly\n // by the reorder group\n event.detail.complete();\n}\n\nexport const ReorderGroupExample: React.FC = () => (\n \n {/*-- The reorder gesture is disabled by default, enable it to drag and drop items --*/}\n \n {/*-- Default reorder icon, end aligned items --*/}\n \n Item 1\n \n \n\n \n Item 2\n \n \n\n {/*-- Default reorder icon, start aligned items --*/}\n \n \n Item 3\n \n\n \n \n Item 4\n \n\n {/*-- Custom reorder icon end items --*/}\n \n Item 5\n \n \n \n \n\n \n Item 6\n \n \n \n \n\n {/*-- Items wrapped in a reorder, entire item can be dragged --*/}\n \n \n Item 7\n \n \n\n \n \n Item 8\n \n \n \n \n);\n```\n\n### Updating Data\n\n```tsx\nconst items = [1, 2, 3, 4, 5];\n\nfunction doReorder(event: CustomEvent) {\n // Before complete is called with the items they will remain in the\n // order before the drag\n console.log('Before complete', this.items);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. Update the items variable to the\n // new order of items\n this.items = event.detail.complete(this.items);\n\n // After complete is called the items will be in the new order\n console.log('After complete', this.items);\n}\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'reorder-group-example',\n styleUrl: 'reorder-group-example.css'\n})\nexport class ReorderGroupExample {\n doReorder(ev: any) {\n // The `from` and `to` properties contain the index of the item\n // when the drag started and ended, respectively\n console.log('Dragged from index', ev.detail.from, 'to', ev.detail.to);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. This method can also be called directly\n // by the reorder group\n ev.detail.complete();\n }\n\n render() {\n return [\n // The reorder gesture is disabled by default, enable it to drag and drop items\n this.doReorder(ev)} disabled={false}>\n {/* Default reorder icon, end aligned items */}\n \n \n Item 1\n \n \n \n\n \n \n Item 2\n \n \n \n\n {/* Default reorder icon, start aligned items */}\n \n \n \n Item 3\n \n \n\n \n \n \n Item 4\n \n \n\n {/* Custom reorder icon end items */}\n \n \n Item 5\n \n \n \n \n \n\n \n \n Item 6\n \n \n \n \n \n\n {/* Items wrapped in a reorder, entire item can be dragged */}\n \n \n \n Item 7\n \n \n \n\n \n \n \n Item 8\n \n \n \n \n ]\n }\n}\n```\n\n### Updating Data\n\n```tsx\nimport { Component, State, h } from '@stencil/core';\n\n@Component({\n tag: 'reorder-group-example',\n styleUrl: 'reorder-group-example.css'\n})\nexport class ReorderGroupExample {\n @State() items = [1, 2, 3, 4, 5];\n\n doReorder(ev: any) {\n // Before complete is called with the items they will remain in the\n // order before the drag\n console.log('Before complete', this.items);\n\n // Finish the reorder and position the item in the DOM based on\n // where the gesture ended. Update the items variable to the\n // new order of items\n this.items = ev.detail.complete(this.items);\n\n // After complete is called the items will be in the new order\n console.log('After complete', this.items);\n }\n\n render() {\n return [\n // The reorder gesture is disabled by default, enable it to drag and drop items\n this.doReorder(ev)} disabled={false}>\n\n {this.items.map(item =>\n \n \n Item { item }\n \n \n \n )}\n\n \n ]\n }\n}\n```", - "vue": "```html\n\n\n\n```\n\n### Updating Data\n\n```html\n\n```\n" - }, - "props": [ - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the reorder will be hidden.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "complete", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "complete(listOrReorder?: boolean | any[] | undefined) => Promise", - "parameters": [], - "docs": "Completes the reorder operation. Must be called by the `ionItemReorder` event.\n\nIf a list of items is passed, the list will be reordered and returned in the\nproper order.\n\nIf no parameters are passed or if `true` is passed in, the reorder will complete\nand the item will remain in the position it was dragged to. If `false` is passed,\nthe reorder will complete and the item will bounce back to its original position.", - "docsTags": [ - { - "name": "param", - "text": "listOrReorder A list of items to be sorted and returned in the new order or a\nboolean of whether or not the reorder should reposition the item." - } - ] - } - ], - "events": [ - { - "event": "ionItemReorder", - "detail": "ItemReorderEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Event that needs to be listened to in order to complete the reorder action.\nOnce the event has been emitted, the `complete()` method then needs\nto be called in order to finalize the reorder action.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/ripple-effect/ripple-effect.tsx", - "encapsulation": "shadow", - "tag": "ion-ripple-effect", - "readme": "# ion-ripple-effect\n\nThe ripple effect component adds the [Material Design ink ripple interaction effect](https://material.io/develop/web/supporting/ripple). This component can only be used inside of an `` and can be added to any component.\n\nIt's important to note that the parent should have [relative positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/position) because the ripple effect is absolutely positioned and will cover the closest parent with relative positioning. The parent element should also be given the `ion-activatable` class, which tells the ripple effect that the element is clickable.\n\nThe default type, `\"bounded\"`, will expand the ripple effect from the click position outwards. To add a ripple effect that always starts in the center of the element and expands in a circle, add an `\"unbounded\"` type. It's recommended to add `overflow: hidden` to the parent element to avoid the ripple overflowing its container, especially with an unbounded ripple.\n", - "docs": "The ripple effect component adds the [Material Design ink ripple interaction effect](https://material.io/develop/web/supporting/ripple). This component can only be used inside of an `` and can be added to any component.\n\nIt's important to note that the parent should have [relative positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/position) because the ripple effect is absolutely positioned and will cover the closest parent with relative positioning. The parent element should also be given the `ion-activatable` class, which tells the ripple effect that the element is clickable.\n\nThe default type, `\"bounded\"`, will expand the ripple effect from the click position outwards. To add a ripple effect that always starts in the center of the element and expands in a circle, add an `\"unbounded\"` type. It's recommended to add `overflow: hidden` to the parent element to avoid the ripple overflowing its container, especially with an unbounded ripple.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n
\n A plain div with a bounded ripple effect\n \n
\n\n \n\n
\n A plain div with an unbounded ripple effect\n \n
\n\n \n
\n
\n```\n\n```css\n.ripple-parent {\n position: relative;\n overflow: hidden;\n}\n```", - "javascript": "```html\n\n \n
\n A plain div with a bounded ripple effect\n \n
\n\n \n\n
\n A plain div with an unbounded ripple effect\n \n
\n\n \n
\n
\n```\n\n```css\n.ripple-parent {\n position: relative;\n overflow: hidden;\n}\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonApp, IonContent, IonRippleEffect } from '@ionic/react';\nimport './RippleEffectExample.css';\n\nexport const RippleExample: React.FC = () => (\n \n \n
\n A plain div with a bounded ripple effect\n \n
\n\n \n\n
\n A plain div with an unbounded ripple effect\n \n
\n\n \n
\n
\n);\n```\n\n```css\n.ripple-parent {\n position: relative;\n overflow: hidden;\n}\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'ripple-effect-example',\n styleUrl: 'ripple-effect-example.css'\n})\nexport class RippleEffectExample {\n render() {\n return [\n \n \n
\n A plain div with a bounded ripple effect\n \n
\n\n \n\n
\n A plain div with an unbounded ripple effect\n \n
\n\n \n
\n
\n ];\n }\n}\n```\n\n```css\n.ripple-parent {\n position: relative;\n overflow: hidden;\n}\n```", - "vue": "```html\n\n\n\n\n\n```" - }, - "props": [ - { - "name": "type", - "type": "\"bounded\" | \"unbounded\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "Sets the type of ripple-effect:\n\n- `bounded`: the ripple effect expands from the user's click position\n- `unbounded`: the ripple effect expands from the center of the button and overflows the container.\n\nNOTE: Surfaces for bounded ripples should have the overflow property set to hidden,\nwhile surfaces for unbounded ripples should have it set to visible.", - "docsTags": [], - "default": "'bounded'", - "values": [ - { - "value": "bounded", - "type": "string" - }, - { - "value": "unbounded", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "addRipple", - "returns": { - "type": "Promise<() => void>", - "docs": "" - }, - "signature": "addRipple(x: number, y: number) => Promise<() => void>", - "parameters": [], - "docs": "Adds the ripple effect to the parent element.", - "docsTags": [ - { - "name": "param", - "text": "x The horizontal coordinate of where the ripple should start." - }, - { - "name": "param", - "text": "y The vertical coordinate of where the ripple should start." - } - ] - } - ], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [ - "ion-action-sheet", - "ion-alert", - "ion-back-button", - "ion-button", - "ion-card", - "ion-chip", - "ion-fab-button", - "ion-item", - "ion-item-option", - "ion-menu-button", - "ion-segment-button", - "ion-tab-button", - "ion-toast" - ], - "dependencies": [], - "dependencyGraph": { - "ion-action-sheet": [ - "ion-ripple-effect" - ], - "ion-alert": [ - "ion-ripple-effect" - ], - "ion-back-button": [ - "ion-ripple-effect" - ], - "ion-button": [ - "ion-ripple-effect" - ], - "ion-card": [ - "ion-ripple-effect" - ], - "ion-chip": [ - "ion-ripple-effect" - ], - "ion-fab-button": [ - "ion-ripple-effect" - ], - "ion-item": [ - "ion-ripple-effect" - ], - "ion-item-option": [ - "ion-ripple-effect" - ], - "ion-menu-button": [ - "ion-ripple-effect" - ], - "ion-segment-button": [ - "ion-ripple-effect" - ], - "ion-tab-button": [ - "ion-ripple-effect" - ], - "ion-toast": [ - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/route/route.tsx", - "encapsulation": "none", - "tag": "ion-route", - "readme": "# ion-route\n\nThe route component takes a component and renders it when the Browser URL matches the url property.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](../router-outlet) and the Angular router.\n\n## Navigation Hooks\n\nNavigation hooks can be used to perform tasks or act as navigation guards. Hooks are used by providing functions to the `beforeEnter` and `beforeLeave` properties on each `ion-route`. Returning `true` allows navigation to proceed, while returning `false` causes it to be cancelled. Returning an object of type `NavigationHookOptions` allows you to redirect navigation to another page.\n\n## Interfaces\n\n```typescript\ninterface NavigationHookOptions {\n /**\n * A valid path to redirect navigation to.\n */\n redirect: string;\n}\n```\n\n", - "docs": "The route component takes a component and renders it when the Browser URL matches the url property.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](../router-outlet) and the Angular router.", - "docsTags": [], - "usage": { - "javascript": "```html\n\n \n \n \n \n\n```\n\n```javascript\nconst dashboardPage = document.querySelector('ion-route[url=\"/dashboard\"]');\ndashboardPage.beforeEnter = isLoggedInGuard;\n\nconst newMessagePage = document.querySelector('ion-route[url=\"/dashboard\"]');\nnewMessagePage.beforeLeave = hasUnsavedDataGuard;\n\nconst isLoggedInGuard = async () => {\n const isLoggedIn = await UserData.isLoggedIn(); // Replace this with actual login validation\n \n if (isLoggedIn) {\n return true;\n } else {\n return { redirect: '/login' }; // If a user is not logged in, they will be redirected to the /login page\n }\n}\n\nconst hasUnsavedDataGuard = async () => {\n const hasUnsavedData = await checkData(); // Replace this with actual validation\n \n if (hasUnsavedData) {\n return await confirmDiscardChanges();\n } else {\n return true;\n }\n}\n\nconst confirmDiscardChanges = async () => {\n const alert = document.createElement('ion-alert');\n alert.header = 'Discard Unsaved Changes?';\n alert.message = 'Are you sure you want to leave? Any unsaved changed will be lost.';\n alert.buttons = [\n {\n text: 'Cancel',\n role: 'Cancel',\n },\n {\n text: 'Discard',\n role: 'destructive',\n }\n ];\n \n document.body.appendChild(alert);\n \n await alert.present();\n \n const { role } = await alert.onDidDismiss();\n \n return (role === 'Cancel') ? false : true;\n}\n```\n", - "stencil": "```typescript\nimport { Component, h } from '@stencil/core';\nimport { alertController } from '@ionic/core';\n\n@Component({\n tag: 'router-example',\n styleUrl: 'router-example.css'\n})\nexport class RouterExample {\n render() {\n return (\n \n \n \n \n \n \n )\n }\n}\n\nconst isLoggedInGuard = async () => {\n const isLoggedIn = await UserData.isLoggedIn(); // Replace this with actual login validation\n \n if (isLoggedIn) {\n return true;\n } else {\n return { redirect: '/login' }; // If a user is not logged in, they will be redirected to the /login page\n }\n}\n\nconst hasUnsavedDataGuard = async () => {\n const hasUnsavedData = await checkData(); // Replace this with actual validation\n \n if (hasUnsavedData) {\n return await confirmDiscardChanges();\n } else {\n return true;\n }\n}\n\nconst confirmDiscardChanges = async () => {\n const alert = await alertController.create({\n header: 'Discard Unsaved Changes?',\n message: 'Are you sure you want to leave? Any unsaved changed will be lost.',\n buttons: [\n {\n text: 'Cancel',\n role: 'Cancel',\n },\n {\n text: 'Discard',\n role: 'destructive',\n }\n ]\n });\n \n await alert.present();\n \n const { role } = await alert.onDidDismiss();\n \n return (role === 'Cancel') ? false : true;\n}\n```\n", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "beforeEnter", - "type": "(() => NavigationHookResult | Promise) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "A navigation hook that is fired when the route tries to enter.\nReturning `true` allows the navigation to proceed, while returning\n`false` causes it to be cancelled. Returning a `NavigationHookOptions`\nobject causes the router to redirect to the path specified.", - "docsTags": [], - "values": [ - { - "type": "(() => NavigationHookResult" - }, - { - "type": "Promise)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "beforeLeave", - "type": "(() => NavigationHookResult | Promise) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "A navigation hook that is fired when the route tries to leave.\nReturning `true` allows the navigation to proceed, while returning\n`false` causes it to be cancelled. Returning a `NavigationHookOptions`\nobject causes the router to redirect to the path specified.", - "docsTags": [], - "values": [ - { - "type": "(() => NavigationHookResult" - }, - { - "type": "Promise)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "component", - "type": "string", - "mutable": false, - "attr": "component", - "reflectToAttr": false, - "docs": "Name of the component to load/select in the navigation outlet (`ion-tabs`, `ion-nav`)\nwhen the route matches.\n\nThe value of this property is not always the tagname of the component to load,\nin `ion-tabs` it actually refers to the name of the `ion-tab` to select.", - "docsTags": [], - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": true - }, - { - "name": "componentProps", - "type": "undefined | { [key: string]: any; }", - "mutable": false, - "reflectToAttr": false, - "docs": "A key value `{ 'red': true, 'blue': 'white'}` containing props that should be passed\nto the defined component when rendered.", - "docsTags": [], - "values": [ - { - "type": "undefined" - }, - { - "type": "{ [key: string]: any; }" - } - ], - "optional": true, - "required": false - }, - { - "name": "url", - "type": "string", - "mutable": false, - "attr": "url", - "reflectToAttr": false, - "docs": "Relative path that needs to match in order for this route to apply.\n\nAccepts paths similar to expressjs so that you can define parameters\nin the url /foo/:bar where bar would be available in incoming props.", - "docsTags": [], - "default": "''", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionRouteDataChanged", - "detail": "any", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Used internally by `ion-router` to know when this route did change.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/route-redirect/route-redirect.tsx", - "encapsulation": "none", - "tag": "ion-route-redirect", - "readme": "# ion-route-redirect\n\nA route redirect can only be used with an `ion-router` as a direct child of it.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](../router-outlet) and the Angular router.\n\nThe route redirect has two configurable properties:\n - `from`\n - `to`\n\nIt redirects \"from\" a URL \"to\" another URL. When the defined `ion-route-redirect` rule matches, the router will redirect from the path specified in the `from` property to the path in the `to` property. In order for a redirect to occur the `from` path needs to be an exact match to the navigated URL.\n\n\n## Multiple Route Redirects\n\nAn arbitrary number of redirect routes can be defined inside an `ion-router`, but only one can match.\n\nA route redirect will never call another redirect after its own redirect, since this could lead to infinite loops.\n\nTake the following two redirects:\n\n```html\n\n \n \n\n```\n\nIf the user navigates to `/admin` the router will redirect to `/login` and stop there. It will never evaluate more than one redirect.\n\n", - "docs": "A route redirect can only be used with an `ion-router` as a direct child of it.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](../router-outlet) and the Angular router.\n\nThe route redirect has two configurable properties:\n - `from`\n - `to`\n\nIt redirects \"from\" a URL \"to\" another URL. When the defined `ion-route-redirect` rule matches, the router will redirect from the path specified in the `from` property to the path in the `to` property. In order for a redirect to occur the `from` path needs to be an exact match to the navigated URL.", - "docsTags": [], - "usage": { - "javascript": "```html\n\n\n\n\n\n```\n\n### Route Redirects as Guards\n\nRedirection routes can work as guards to prevent users from navigating to certain areas of an application based on a given condition, such as if the user is authenticated or not.\n\nA route redirect can be added and removed dynamically to redirect (or guard) some routes from being accessed. In the following example, all urls `*` will be redirected to the `/login` url if `isLoggedIn` is `false`.\n\n```tsx\nconst isLoggedIn = false;\n\nconst router = document.querySelector('ion-router');\nconst routeRedirect = document.createElement('ion-route-redirect');\nrouteRedirect.setAttribute('from', '*');\nrouteRedirect.setAttribute('to', '/login');\n\nif (!isLoggedIn) {\n router.appendChild(routeRedirect);\n}\n```\n\nAlternatively, the value of `to` can be modified based on a condition. In the following example, the route redirect will check if the user is logged in and redirect to the `/login` url if not.\n\n```html\n\n```\n\n```javascript\nconst isLoggedIn = false;\nconst routeRedirect = document.querySelector('#tutorialRedirect');\n\nrouteRedirect.setAttribute('to', isLoggedIn ? undefined : '/login');\n```" - }, - "props": [ - { - "name": "from", - "type": "string", - "mutable": false, - "attr": "from", - "reflectToAttr": false, - "docs": "A redirect route, redirects \"from\" a URL \"to\" another URL. This property is that \"from\" URL.\nIt needs to be an exact match of the navigated URL in order to apply.\n\nThe path specified in this value is always an absolute path, even if the initial `/` slash\nis not specified.", - "docsTags": [], - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": true - }, - { - "name": "to", - "type": "null | string | undefined", - "mutable": false, - "attr": "to", - "reflectToAttr": false, - "docs": "A redirect route, redirects \"from\" a URL \"to\" another URL. This property is that \"to\" URL.\nWhen the defined `ion-route-redirect` rule matches, the router will redirect to the path\nspecified in this property.\n\nThe value of this property is always an absolute path inside the scope of routes defined in\n`ion-router` it can't be used with another router or to perform a redirection to a different domain.\n\nNote that this is a virtual redirect, it will not cause a real browser refresh, again, it's\na redirect inside the context of ion-router.\n\nWhen this property is not specified or his value is `undefined` the whole redirect route is noop,\neven if the \"from\" value matches.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": true - } - ], - "methods": [], - "events": [ - { - "event": "ionRouteRedirectChanged", - "detail": "any", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Internal event that fires when any value of this rule is added/removed from the DOM,\nor any of his public properties changes.\n\n`ion-router` captures this event in order to update his internal registry of router rules.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/router/router.tsx", - "encapsulation": "none", - "tag": "ion-router", - "readme": "# ion-router\n\nThe router is a component for handling routing inside vanilla and Stencil JavaScript projects.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](../router-outlet) and the Angular router.\n\nApps should have a single `ion-router` component in the codebase.\nThis component controls all interactions with the browser history and it aggregates updates through an event system.\n\n`ion-router` is just a URL coordinator for the navigation outlets of ionic: `ion-nav`, `ion-tabs`, and `ion-router-outlet`.\n\nThat means the `ion-router` never touches the DOM, it does NOT show the components or emit any kind of lifecycle events, it just tells `ion-nav`, `ion-tabs`, and `ion-router-outlet` what and when to \"show\" based on the browser's URL.\n\nIn order to configure this relationship between components (to load/select) and URLs, `ion-router` uses a declarative syntax using JSX/HTML to define a tree of routes.\n\n## Interfaces\n\n### RouterEventDetail\n\n```typescript\ninterface RouterEventDetail {\n from: string | null;\n redirectedFrom: string | null;\n to: string;\n}\n```\n\n### RouterCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface RouterCustomEvent extends CustomEvent {\n detail: RouterEventDetail;\n target: HTMLIonRouterElement;\n}\n```\n", - "docs": "The router is a component for handling routing inside vanilla and Stencil JavaScript projects.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use [`ion-router-outlet`](../router-outlet) and the Angular router.\n\nApps should have a single `ion-router` component in the codebase.\nThis component controls all interactions with the browser history and it aggregates updates through an event system.\n\n`ion-router` is just a URL coordinator for the navigation outlets of ionic: `ion-nav`, `ion-tabs`, and `ion-router-outlet`.\n\nThat means the `ion-router` never touches the DOM, it does NOT show the components or emit any kind of lifecycle events, it just tells `ion-nav`, `ion-tabs`, and `ion-router-outlet` what and when to \"show\" based on the browser's URL.\n\nIn order to configure this relationship between components (to load/select) and URLs, `ion-router` uses a declarative syntax using JSX/HTML to define a tree of routes.", - "docsTags": [], - "usage": { - "javascript": "```html\n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n\n\n```\n" - }, - "props": [ - { - "name": "root", - "type": "string", - "mutable": false, - "attr": "root", - "reflectToAttr": false, - "docs": "The root path to use when matching URLs. By default, this is set to \"/\", but you can specify\nan alternate prefix for all URL paths.", - "docsTags": [], - "default": "'/'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "useHash", - "type": "boolean", - "mutable": false, - "attr": "use-hash", - "reflectToAttr": false, - "docs": "The router can work in two \"modes\":\n- With hash: `/index.html#/path/to/page`\n- Without hash: `/path/to/page`\n\nUsing one or another might depend in the requirements of your app and/or where it's deployed.\n\nUsually \"hash-less\" navigation works better for SEO and it's more user friendly too, but it might\nrequires additional server-side configuration in order to properly work.\n\nOn the other side hash-navigation is much easier to deploy, it even works over the file protocol.\n\nBy default, this property is `true`, change to `false` to allow hash-less URLs.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "back", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "back() => Promise", - "parameters": [], - "docs": "Go back to previous page in the window.history.", - "docsTags": [] - }, - { - "name": "push", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "push(path: string, direction?: RouterDirection, animation?: AnimationBuilder | undefined) => Promise", - "parameters": [], - "docs": "Navigate to the specified path.", - "docsTags": [ - { - "name": "param", - "text": "path The path to navigate to." - }, - { - "name": "param", - "text": "direction The direction of the animation. Defaults to `\"forward\"`." - } - ] - } - ], - "events": [ - { - "event": "ionRouteDidChange", - "detail": "RouterEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the route had changed", - "docsTags": [] - }, - { - "event": "ionRouteWillChange", - "detail": "RouterEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Event emitted when the route is about to change", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "popstate", - "target": "window", - "capture": false, - "passive": false - }, - { - "event": "ionBackButton", - "target": "document", - "capture": false, - "passive": false - } - ], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/router-link/router-link.tsx", - "encapsulation": "shadow", - "tag": "ion-router-link", - "readme": "# ion-router-link\n\nThe router link component is used for navigating to a specified link. Similar to the browser's anchor tag, it can accept a href for the location, and a direction for the transition animation.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use an `` and `routerLink` with the Angular router.\n", - "docs": "The router link component is used for navigating to a specified link. Similar to the browser's anchor tag, it can accept a href for the location, and a direction for the transition animation.\n\n> Note: this component should only be used with vanilla and Stencil JavaScript projects. For Angular projects, use an `` and `routerLink` with the Angular router.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerAnimation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition animation when navigating to\nanother page using `href`.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "routerDirection", - "type": "\"back\" | \"forward\" | \"root\"", - "mutable": false, - "attr": "router-direction", - "reflectToAttr": false, - "docs": "When using a router, it specifies the transition direction when navigating to\nanother page using `href`.", - "docsTags": [], - "default": "'forward'", - "values": [ - { - "value": "back", - "type": "string" - }, - { - "value": "forward", - "type": "string" - }, - { - "value": "root", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the router link" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Text color of the router link" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/router-outlet/route-outlet.tsx", - "encapsulation": "shadow", - "tag": "ion-router-outlet", - "readme": "# ion-router-outlet\n\nThe router outlet behaves in a similar way to Angular's built-in router outlet component and Vue's router view component, but contains the logic for providing a stacked navigation, and animating views in and out.\n\nAlthough router outlet has methods for navigating around, it's recommended to use the navigation methods in your framework's router.\n\n## Life Cycle Hooks\n\nRoutes rendered in a Router Outlet have access to specific Ionic events that are wired up to animations\n\n\n| Event Name | Trigger |\n|--------------------|--------------------------------------------------------------------|\n| `ionViewWillEnter` | Fired when the component routing to is about to animate into view. |\n| `ionViewDidEnter` | Fired when the component routing to has finished animating. |\n| `ionViewWillLeave` | Fired when the component routing from is about to animate. |\n| `ionViewDidLeave` | Fired when the component routing to has finished animating. |\n\n\nThese event tie into Ionic's animation system and can be used to coordinate parts of your app when a Components is done with its animation. These events are not a replacement for your framework's own event system, but an addition.\n\nFor handling Router Guards, the older `ionViewCanEnter` and `ionViewCanLeave` have been replaced with their framework specific equivalent. For Angular, there are [Router Guards](https://angular.io/guide/router#milestone-5-route-guards).\n\n", - "docs": "The router outlet behaves in a similar way to Angular's built-in router outlet component and Vue's router view component, but contains the logic for providing a stacked navigation, and animating views in and out.\n\nAlthough router outlet has methods for navigating around, it's recommended to use the navigation methods in your framework's router.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the router-outlet should animate the transition of components.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "animation", - "type": "((baseEl: any, opts?: any) => Animation) | undefined", - "mutable": false, - "reflectToAttr": false, - "docs": "This property allows to create custom transition using AnimateBuilder functions.", - "docsTags": [], - "values": [ - { - "type": "((baseEl: any, opts?: any) => Animation)" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": true, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "default": "getIonMode(this)", - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/row/row.tsx", - "encapsulation": "shadow", - "tag": "ion-row", - "readme": "# ion-row\n\nRows are horizontal components of the [grid](../grid) system and contain varying numbers of\n[columns](../col). They ensure the columns are positioned properly.\n\nSee [Grid Layout](/docs/layout/grid) for more information.\n\n\n## Row Alignment\n\nBy default, columns will stretch to fill the entire height of the row and wrap when necessary. Rows are [flex containers](https://developer.mozilla.org/en-US/docs/Glossary/Flex_Container), so there are several [CSS classes](/docs/layout/css-utilities#flex-container-properties) that can be applied to a row to customize this behavior.\n\n", - "docs": "Rows are horizontal components of the [grid](../grid) system and contain varying numbers of\n[columns](../col). They ensure the columns are positioned properly.\n\nSee [Grid Layout](/docs/layout/grid) for more information.", - "docsTags": [], - "usage": {}, - "props": [], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/searchbar/searchbar.tsx", - "encapsulation": "scoped", - "tag": "ion-searchbar", - "readme": "# ion-searchbar\n\nSearchbars represent a text field that can be used to search through a collection. They can be displayed inside of a toolbar or the main content.\n\nA Searchbar should be used instead of an input to search lists. A clear button is displayed upon entering input in the searchbar's text field. Clicking on the clear button will erase the text field and the input will remain focused. A cancel button can be enabled which will clear the input and lose the focus upon click.\n\n## Keyboard Display\n\n### Android\n\nBy default, tapping the input will cause the keyboard to appear with a magnifying glass icon on the submit button. You can optionally set the `inputmode` property to `\"search\"`, which will change the icon from a magnifying glass to a carriage return.\n\n### iOS\n\nBy default, tapping the input will cause the keyboard to appear with the text \"return\" on a gray submit button. You can optionally set the `inputmode` property to `\"search\"`, which will change the text from \"return\" to \"go\", and change the button color from gray to blue. Alternatively, you can wrap the `ion-searchbar` in a `form` element with an `action` property. This will cause the keyboard to appear with a blue submit button that says \"search\".\n\n## Interfaces\n\n### SearchbarChangeEventDetail\n\n```typescript\ninterface SearchbarChangeEventDetail {\n value?: string;\n}\n```\n\n### SearchbarCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface SearchbarCustomEvent extends CustomEvent {\n detail: SearchbarChangeEventDetail;\n target: HTMLIonSearchbarElement;\n}\n```\n", - "docs": "Searchbars represent a text field that can be used to search through a collection. They can be displayed inside of a toolbar or the main content.\n\nA Searchbar should be used instead of an input to search lists. A clear button is displayed upon entering input in the searchbar's text field. Clicking on the clear button will erase the text field and the input will remain focused. A cancel button can be enabled which will clear the input and lose the focus upon click.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n```", - "javascript": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n```", - "react": "```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonSearchbar, IonFooter } from '@ionic/react';\n\nexport const SearchBarExamples: React.FC = () => {\n const [searchText, setSearchText] = useState('');\n return (\n \n \n \n IonSearchBar Examples\n \n \n \n

Default Searchbar

\n setSearchText(e.detail.value!)}>\n\n

Searchbar with cancel button always shown

\n setSearchText(e.detail.value!)} showCancelButton=\"always\">\n\n

Searchbar with cancel button never shown

\n setSearchText(e.detail.value!)} showCancelButton=\"never\">\n\n

Searchbar with cancel button shown on focus

\n setSearchText(e.detail.value!)} showCancelButton=\"focus\">\n\n

Searchbar with danger color

\n setSearchText(e.detail.value!)} color=\"danger\">\n\n

Searchbar with telephone type

\n setSearchText(e.detail.value!)} type=\"tel\">\n\n

Searchbar with numeric inputmode

\n setSearchText(e.detail.value!)} inputmode=\"numeric\">\n\n

Searchbar disabled

\n setSearchText(e.detail.value!)} disabled={true}>\n\n

Searchbar with a cancel button and custom cancel button text

\n setSearchText(e.detail.value!)} showCancelButton=\"focus\" cancelButtonText=\"Custom Cancel\">\n\n

Searchbar with a custom debounce - Note: debounce only works on onIonChange event

\n setSearchText(e.detail.value!)} debounce={1000}>\n\n

Animated Searchbar

\n setSearchText(e.detail.value!)} animated>\n\n

Searchbar with a placeholder

\n setSearchText(e.detail.value!)} placeholder=\"Filter Schedules\">\n\n

Searchbar in a Toolbar

\n \n setSearchText(e.detail.value!)}>\n \n\n
\n \n \n Search Text: {searchText ?? '(none)'}\n \n \n
\n );\n};\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchbar-example',\n styleUrl: 'searchbar-example.css'\n})\nexport class SearchbarExample {\n render() {\n return [\n // Default Searchbar\n ,\n\n // Searchbar with cancel button always shown\n ,\n\n // Searchbar with cancel button never shown\n ,\n\n // Searchbar with cancel button shown on focus\n ,\n\n // Searchbar with danger color\n ,\n\n // Searchbar with value\n ,\n\n // Searchbar with telephone type\n ,\n\n // Searchbar with numeric inputmode\n ,\n\n // Searchbar disabled\n ,\n\n // Searchbar with a cancel button and custom cancel button text\n ,\n\n // Searchbar with a custom debounce\n ,\n\n // Animated Searchbar\n ,\n\n // Searchbar with a placeholder\n ,\n\n // Searchbar in a Toolbar\n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, enable searchbar animation.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "autocomplete", - "type": "\"off\" | \"on\" | \"name\" | \"honorific-prefix\" | \"given-name\" | \"additional-name\" | \"family-name\" | \"honorific-suffix\" | \"nickname\" | \"email\" | \"username\" | \"new-password\" | \"current-password\" | \"one-time-code\" | \"organization-title\" | \"organization\" | \"street-address\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"address-level4\" | \"address-level3\" | \"address-level2\" | \"address-level1\" | \"country\" | \"country-name\" | \"postal-code\" | \"cc-name\" | \"cc-given-name\" | \"cc-additional-name\" | \"cc-family-name\" | \"cc-number\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-csc\" | \"cc-type\" | \"transaction-currency\" | \"transaction-amount\" | \"language\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"sex\" | \"tel\" | \"tel-country-code\" | \"tel-national\" | \"tel-area-code\" | \"tel-local\" | \"tel-extension\" | \"impp\" | \"url\" | \"photo\"", - "mutable": false, - "attr": "autocomplete", - "reflectToAttr": false, - "docs": "Set the input's autocomplete property.", - "docsTags": [], - "default": "'off'", - "values": [ - { - "value": "off", - "type": "string" - }, - { - "value": "on", - "type": "string" - }, - { - "value": "name", - "type": "string" - }, - { - "value": "honorific-prefix", - "type": "string" - }, - { - "value": "given-name", - "type": "string" - }, - { - "value": "additional-name", - "type": "string" - }, - { - "value": "family-name", - "type": "string" - }, - { - "value": "honorific-suffix", - "type": "string" - }, - { - "value": "nickname", - "type": "string" - }, - { - "value": "email", - "type": "string" - }, - { - "value": "username", - "type": "string" - }, - { - "value": "new-password", - "type": "string" - }, - { - "value": "current-password", - "type": "string" - }, - { - "value": "one-time-code", - "type": "string" - }, - { - "value": "organization-title", - "type": "string" - }, - { - "value": "organization", - "type": "string" - }, - { - "value": "street-address", - "type": "string" - }, - { - "value": "address-line1", - "type": "string" - }, - { - "value": "address-line2", - "type": "string" - }, - { - "value": "address-line3", - "type": "string" - }, - { - "value": "address-level4", - "type": "string" - }, - { - "value": "address-level3", - "type": "string" - }, - { - "value": "address-level2", - "type": "string" - }, - { - "value": "address-level1", - "type": "string" - }, - { - "value": "country", - "type": "string" - }, - { - "value": "country-name", - "type": "string" - }, - { - "value": "postal-code", - "type": "string" - }, - { - "value": "cc-name", - "type": "string" - }, - { - "value": "cc-given-name", - "type": "string" - }, - { - "value": "cc-additional-name", - "type": "string" - }, - { - "value": "cc-family-name", - "type": "string" - }, - { - "value": "cc-number", - "type": "string" - }, - { - "value": "cc-exp", - "type": "string" - }, - { - "value": "cc-exp-month", - "type": "string" - }, - { - "value": "cc-exp-year", - "type": "string" - }, - { - "value": "cc-csc", - "type": "string" - }, - { - "value": "cc-type", - "type": "string" - }, - { - "value": "transaction-currency", - "type": "string" - }, - { - "value": "transaction-amount", - "type": "string" - }, - { - "value": "language", - "type": "string" - }, - { - "value": "bday", - "type": "string" - }, - { - "value": "bday-day", - "type": "string" - }, - { - "value": "bday-month", - "type": "string" - }, - { - "value": "bday-year", - "type": "string" - }, - { - "value": "sex", - "type": "string" - }, - { - "value": "tel", - "type": "string" - }, - { - "value": "tel-country-code", - "type": "string" - }, - { - "value": "tel-national", - "type": "string" - }, - { - "value": "tel-area-code", - "type": "string" - }, - { - "value": "tel-local", - "type": "string" - }, - { - "value": "tel-extension", - "type": "string" - }, - { - "value": "impp", - "type": "string" - }, - { - "value": "url", - "type": "string" - }, - { - "value": "photo", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "autocorrect", - "type": "\"off\" | \"on\"", - "mutable": false, - "attr": "autocorrect", - "reflectToAttr": false, - "docs": "Set the input's autocorrect property.", - "docsTags": [], - "default": "'off'", - "values": [ - { - "value": "off", - "type": "string" - }, - { - "value": "on", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "cancelButtonIcon", - "type": "string", - "mutable": false, - "attr": "cancel-button-icon", - "reflectToAttr": false, - "docs": "Set the cancel button icon. Only applies to `md` mode.\nDefaults to `arrow-back-sharp`.", - "docsTags": [], - "default": "config.get('backButtonIcon', arrowBackSharp) as string", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "cancelButtonText", - "type": "string", - "mutable": false, - "attr": "cancel-button-text", - "reflectToAttr": false, - "docs": "Set the the cancel button text. Only applies to `ios` mode.", - "docsTags": [], - "default": "'Cancel'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "clearIcon", - "type": "string | undefined", - "mutable": false, - "attr": "clear-icon", - "reflectToAttr": false, - "docs": "Set the clear icon. Defaults to `close-circle` for `ios` and `close-sharp` for `md`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "debounce", - "type": "number", - "mutable": false, - "attr": "debounce", - "reflectToAttr": false, - "docs": "Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.", - "docsTags": [], - "default": "250", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the input.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "enterkeyhint", - "type": "\"done\" | \"enter\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined", - "mutable": false, - "attr": "enterkeyhint", - "reflectToAttr": false, - "docs": "A hint to the browser for which enter key to display.\nPossible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n`\"previous\"`, `\"search\"`, and `\"send\"`.", - "docsTags": [], - "values": [ - { - "value": "done", - "type": "string" - }, - { - "value": "enter", - "type": "string" - }, - { - "value": "go", - "type": "string" - }, - { - "value": "next", - "type": "string" - }, - { - "value": "previous", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "send", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "inputmode", - "type": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\" | undefined", - "mutable": false, - "attr": "inputmode", - "reflectToAttr": false, - "docs": "A hint to the browser for which keyboard to display.\nPossible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n`\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.", - "docsTags": [], - "values": [ - { - "value": "decimal", - "type": "string" - }, - { - "value": "email", - "type": "string" - }, - { - "value": "none", - "type": "string" - }, - { - "value": "numeric", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "tel", - "type": "string" - }, - { - "value": "text", - "type": "string" - }, - { - "value": "url", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "placeholder", - "type": "string", - "mutable": false, - "attr": "placeholder", - "reflectToAttr": false, - "docs": "Set the input's placeholder.\n`placeholder` can accept either plaintext or HTML as a string.\nTo display characters normally reserved for HTML, they\nmust be escaped. For example `` would become\n`<Ionic>`\n\nFor more information: [Security Documentation](https://ionicframework.com/docs/faq/security)", - "docsTags": [], - "default": "'Search'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "searchIcon", - "type": "string | undefined", - "mutable": false, - "attr": "search-icon", - "reflectToAttr": false, - "docs": "The icon to use as the search icon. Defaults to `search-outline` in\n`ios` mode and `search-sharp` in `md` mode.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "showCancelButton", - "type": "\"always\" | \"focus\" | \"never\"", - "mutable": false, - "attr": "show-cancel-button", - "reflectToAttr": false, - "docs": "Sets the behavior for the cancel button. Defaults to `\"never\"`.\nSetting to `\"focus\"` shows the cancel button on focus.\nSetting to `\"never\"` hides the cancel button.\nSetting to `\"always\"` shows the cancel button regardless\nof focus state.", - "docsTags": [], - "default": "'never'", - "values": [ - { - "value": "always", - "type": "string" - }, - { - "value": "focus", - "type": "string" - }, - { - "value": "never", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "showClearButton", - "type": "\"always\" | \"focus\" | \"never\"", - "mutable": false, - "attr": "show-clear-button", - "reflectToAttr": false, - "docs": "Sets the behavior for the clear button. Defaults to `\"focus\"`.\nSetting to `\"focus\"` shows the clear button on focus if the\ninput is not empty.\nSetting to `\"never\"` hides the clear button.\nSetting to `\"always\"` shows the clear button regardless\nof focus state, but only if the input is not empty.", - "docsTags": [], - "default": "'always'", - "values": [ - { - "value": "always", - "type": "string" - }, - { - "value": "focus", - "type": "string" - }, - { - "value": "never", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "spellcheck", - "type": "boolean", - "mutable": false, - "attr": "spellcheck", - "reflectToAttr": false, - "docs": "If `true`, enable spellcheck on the input.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "type", - "type": "\"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "Set the type of the input.", - "docsTags": [], - "default": "'search'", - "values": [ - { - "value": "email", - "type": "string" - }, - { - "value": "number", - "type": "string" - }, - { - "value": "password", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "tel", - "type": "string" - }, - { - "value": "text", - "type": "string" - }, - { - "value": "url", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "null | string | undefined", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "the value of the searchbar.", - "docsTags": [], - "default": "''", - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "getInputElement", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getInputElement() => Promise", - "parameters": [], - "docs": "Returns the native `` element used under the hood.", - "docsTags": [] - }, - { - "name": "setFocus", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "setFocus() => Promise", - "parameters": [], - "docs": "Sets focus on the specified `ion-searchbar`. Use this method instead of the global\n`input.focus()`.", - "docsTags": [] - } - ], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the input loses focus.", - "docsTags": [] - }, - { - "event": "ionCancel", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the cancel button is clicked.", - "docsTags": [] - }, - { - "event": "ionChange", - "detail": "SearchbarChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value has changed.", - "docsTags": [] - }, - { - "event": "ionClear", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the clear input button is clicked.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the input has focus.", - "docsTags": [] - }, - { - "event": "ionInput", - "detail": "KeyboardEvent", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when a keyboard input occurred.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the searchbar input" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the searchbar input" - }, - { - "name": "--box-shadow", - "annotation": "prop", - "docs": "Box shadow of the searchbar input" - }, - { - "name": "--cancel-button-color", - "annotation": "prop", - "docs": "Color of the searchbar cancel button" - }, - { - "name": "--clear-button-color", - "annotation": "prop", - "docs": "Color of the searchbar clear button" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the searchbar text" - }, - { - "name": "--icon-color", - "annotation": "prop", - "docs": "Color of the searchbar icon" - }, - { - "name": "--placeholder-color", - "annotation": "prop", - "docs": "Color of the searchbar placeholder" - }, - { - "name": "--placeholder-font-style", - "annotation": "prop", - "docs": "Font style of the searchbar placeholder" - }, - { - "name": "--placeholder-font-weight", - "annotation": "prop", - "docs": "Font weight of the searchbar placeholder" - }, - { - "name": "--placeholder-opacity", - "annotation": "prop", - "docs": "Opacity of the searchbar placeholder" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [ - "ion-icon" - ], - "dependencyGraph": { - "ion-searchbar": [ - "ion-icon" - ] - } - }, - { - "filePath": "./src/components/segment/segment.tsx", - "encapsulation": "shadow", - "tag": "ion-segment", - "readme": "# ion-segment\n\nSegments display a group of related buttons, sometimes known as segmented controls, in a horizontal row. They can be displayed inside of a toolbar or the main content.\n\nTheir functionality is similar to tabs, where selecting one will deselect all others. Segments are useful for toggling between different views inside of the content. Tabs should be used instead of a segment when clicking on a control should navigate between pages.\n\n## Scrollable Segments\n\nSegments are not scrollable by default. Each segment button has a fixed width, and the width is determined by dividing the number of segment buttons by the screen width. This ensures that each segment button can be displayed on the screen without having to scroll. As a result, some segment buttons with longer labels may get cut off. To avoid this we recommend either using a shorter label or switching to a scrollable segment by setting the `scrollable` property to `true`. This will cause the segment to scroll horizontally, but will allow each segment button to have a variable width.\n\n## Accessibility\n\n### Keyboard Navigation\n\nThe component has full keyboard support for navigating between and selecting `ion-segment-button` elements. By default, keyboard navigation will only focus `ion-segment-button` elements, but you can use the `selectOnFocus` property to ensure that they get selected on focus as well. The following table details what each key does:\n\n| Key | Function |\n| ------------------ | -------------------------------------------------------------- |\n| `ArrowRight` | Focuses the next focusable element. |\n| `ArrowLeft` | Focuses the previous focusable element. |\n| `Home` | Focuses the first focusable element. |\n| `End` | Focuses the last focusable element. |\n| `Space` or `Enter` | Selects the element that is currently focused. |\n\n## Interfaces\n\n### SegmentChangeEventDetail\n\n```typescript\ninterface SegmentChangeEventDetail {\n value?: string;\n}\n```\n\n### SegmentCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface SegmentCustomEvent extends CustomEvent {\n target: HTMLIonSegmentElement;\n detail: SegmentChangeEventDetail;\n}\n```\n", - "docs": "Segments display a group of related buttons, sometimes known as segmented controls, in a horizontal row. They can be displayed inside of a toolbar or the main content.\n\nTheir functionality is similar to tabs, where selecting one will deselect all others. Segments are useful for toggling between different views inside of the content. Tabs should be used instead of a segment when clicking on a control should navigate between pages.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n\n \n Friends\n \n \n Enemies\n \n\n\n\n\n \n Sunny\n \n \n Rainy\n \n\n\n\n\n \n Dogs\n \n \n Cats\n \n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\n \n Standard\n \n \n Hybrid\n \n \n Satellite\n \n\n\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n \n Python\n \n \n Javascript\n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'segment-example',\n templateUrl: 'segment-example.html',\n styleUrls: ['./segment-example.css'],\n})\nexport class SegmentExample {\n segmentChanged(ev: any) {\n console.log('Segment changed', ev);\n }\n}\n```\n", - "javascript": "```html\n\n\n \n Friends\n \n \n Enemies\n \n\n\n\n\n \n Sunny\n \n \n Rainy\n \n\n\n\n\n \n Dogs\n \n \n Cats\n \n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\n \n Standard\n \n \n Hybrid\n \n \n Satellite\n \n\n\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n \n Python\n \n \n Javascript\n \n\n```\n\n```javascript\n// Listen for ionChange on all segments\nconst segments = document.querySelectorAll('ion-segment')\nfor (let i = 0; i < segments.length; i++) {\n segments[i].addEventListener('ionChange', (ev) => {\n console.log('Segment changed', ev);\n })\n}\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonSegment, IonSegmentButton, IonLabel, IonIcon } from '@ionic/react';\nimport { call, home, heart, pin, star, globe, basket, camera, bookmark } from 'ionicons/icons';\n\nexport const SegmentExamples: React.FC = () => {\n return (\n \n \n \n SegmentExamples\n \n \n \n {/*-- Default Segment --*/}\n console.log('Segment selected', e.detail.value)}>\n \n Friends\n \n \n Enemies\n \n \n\n {/*-- Disabled Segment --*/}\n console.log('Segment selected', e.detail.value)} disabled value=\"sunny\">\n \n Sunny\n \n \n Rainy\n \n \n\n {/*-- Segment with anchors --*/}\n console.log('Segment selected', e.detail.value)}>\n \n Dogs\n \n \n Cats\n \n \n\n {/*-- Scrollable Segment --*/}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n {/*-- Segment with secondary color --*/}\n console.log('Segment selected', e.detail.value)} color=\"secondary\">\n \n Standard\n \n \n Hybrid\n \n \n Satellite\n \n \n\n {/*-- Segment in a toolbar --*/}\n \n console.log('Segment selected', e.detail.value)}>\n \n \n \n \n \n \n \n \n\n {/*-- Segment with default selection --*/}\n console.log('Segment selected', e.detail.value)} value=\"javascript\">\n \n Python\n \n \n Javascript\n \n \n \n \n );\n};\n\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'segment-example',\n styleUrl: 'segment-example.css'\n})\nexport class SegmentExample {\n segmentChanged(ev: any) {\n console.log('Segment changed', ev);\n }\n\n render() {\n return [\n // Default Segment\n this.segmentChanged(ev)}>\n \n Friends\n \n \n Enemies\n \n ,\n\n // Disabled Segment\n this.segmentChanged(ev)} disabled={true} value=\"sunny\">\n \n Sunny\n \n \n Rainy\n \n ,\n\n // Segment with anchors\n this.segmentChanged(ev)}>\n \n Dogs\n \n \n Cats\n \n ,\n\n // Scrollable Segment\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n\n // Segment with secondary color\n this.segmentChanged(ev)} color=\"secondary\">\n \n Standard\n \n \n Hybrid\n \n \n Satellite\n \n ,\n\n // Segment in a toolbar\n \n this.segmentChanged(ev)}>\n \n \n \n \n \n \n \n ,\n\n // Segment with default selection\n this.segmentChanged(ev)} value=\"javascript\">\n \n Python\n \n \n Javascript\n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the segment.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "scrollable", - "type": "boolean", - "mutable": false, - "attr": "scrollable", - "reflectToAttr": false, - "docs": "If `true`, the segment buttons will overflow and the user can swipe to see them.\nIn addition, this will disable the gesture to drag the indicator between the buttons\nin order to swipe to see hidden buttons.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "selectOnFocus", - "type": "boolean", - "mutable": false, - "attr": "select-on-focus", - "reflectToAttr": false, - "docs": "If `true`, navigating to an `ion-segment-button` with the keyboard will focus and select the element.\nIf `false`, keyboard navigation will only focus the `ion-segment-button` element.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "swipeGesture", - "type": "boolean", - "mutable": false, - "attr": "swipe-gesture", - "reflectToAttr": false, - "docs": "If `true`, users will be able to swipe between segment buttons to activate them.", - "docsTags": [], - "default": "true", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "null | string | undefined", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "the value of the segment.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionChange", - "detail": "SegmentChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value property has changed and any\ndragging pointer has been released from `ion-segment`.", - "docsTags": [] - } - ], - "listeners": [ - { - "event": "keydown", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the segment button" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/segment-button/segment-button.tsx", - "encapsulation": "shadow", - "tag": "ion-segment-button", - "readme": "# ion-segment-button\n\nSegment buttons are groups of related buttons inside of a [Segment](../segment). They are displayed in a horizontal row. A segment button can be checked by default by setting the `value` of the segment to the `value` of the segment button. Only one segment button can be selected at a time.\n\n", - "docs": "Segment buttons are groups of related buttons inside of a [Segment](../segment). They are displayed in a horizontal row. A segment button can be checked by default by setting the `value` of the segment to the `value` of the segment button. Only one segment button can be selected at a time.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "native - The native HTML button element that wraps all child elements." - }, - { - "name": "part", - "text": "indicator - The indicator displayed on the checked segment button." - }, - { - "name": "part", - "text": "indicator-background - The background element for the indicator displayed on the checked segment button." - } - ], - "usage": { - "angular": "```html\n\n\n \n Friends\n \n \n Enemies\n \n\n\n\n\n \n Paid\n \n \n Free\n \n \n Top\n \n\n\n\n\n \n \n \n \n \n \n\n\n\n\n \n Bookmarks\n \n \n Reading List\n \n \n Shared Links\n \n\n\n\n\n \n Item One\n \n \n Item Two\n \n \n Item Three\n \n\n\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n\n\n\n\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n\n\n\n\n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n\n\n\n\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'segment-button-example',\n templateUrl: 'segment-button-example.html',\n styleUrls: ['./segment-button-example.css'],\n})\nexport class SegmentButtonExample {\n segmentChanged(ev: any) {\n console.log('Segment changed', ev);\n }\n}\n```", - "javascript": "```html\n\n\n \n Friends\n \n \n Enemies\n \n\n\n\n\n \n Paid\n \n \n Free\n \n \n Top\n \n\n\n\n\n \n \n \n \n \n \n\n\n\n\n \n Bookmarks\n \n \n Reading List\n \n \n Shared Links\n \n\n\n\n\n \n Item One\n \n \n Item Two\n \n \n Item Three\n \n\n\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n\n\n\n\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n\n\n\n\n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n\n\n\n\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n\n```\n\n```javascript\n// Listen for ionChange on segment\nconst segment = document.querySelector('ion-segment');\nsegment.addEventListener('ionChange', (ev) => {\n console.log('Segment changed', ev);\n})\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonSegment, IonSegmentButton, IonLabel, IonIcon } from '@ionic/react';\nimport { call, camera, bookmark, heart, pin } from 'ionicons/icons';\n\nexport const SegmentButtonExamples: React.FC = () => {\n return (\n \n \n \n SegmentButton\n \n \n \n {/*-- Segment buttons with text and click listener --*/}\n console.log(`${e.detail.value} segment selected`)}>\n \n Friends\n \n \n Enemies\n \n \n\n {/*-- Segment buttons with the first checked and the last disabled --*/}\n \n \n Paid\n \n \n Free\n \n \n Top\n \n \n\n {/*-- Segment buttons with values and icons --*/}\n \n \n \n \n \n \n \n \n\n {/*-- Segment with a value that checks the last button --*/}\n \n \n Bookmarks\n \n \n Reading List\n \n \n Shared Links\n \n \n\n {/*-- Label only --*/}\n \n \n Item One\n \n \n Item Two\n \n \n Item Three\n \n \n\n {/*-- Icon only --*/}\n \n \n \n \n \n \n \n \n \n \n \n\n {/*-- Icon top --*/}\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n \n\n {/*-- Icon bottom --*/}\n \n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n\n {/*-- Icon start --*/}\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n \n\n {/*-- Icon end --*/}\n \n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n \n \n );\n};\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'segment-button-example',\n styleUrl: 'segment-button-example.css'\n})\nexport class SegmentButtonExample {\n segmentChanged(ev: any) {\n console.log('Segment changed', ev);\n }\n\n render() {\n return [\n // Segment buttons with text and click listener\n this.segmentChanged(ev)}>\n \n Friends\n \n \n Enemies\n \n ,\n\n // Segment buttons with the first checked and the last disabled\n \n \n Paid\n \n \n Free\n \n \n Top\n \n ,\n\n // Segment buttons with values and icons\n \n \n \n \n \n \n \n ,\n\n // Segment with a value that checks the last button\n \n \n Bookmarks\n \n \n Reading List\n \n \n Shared Links\n \n ,\n\n // Label only\n \n \n Item One\n \n \n Item Two\n \n \n Item Three\n \n ,\n\n // Icon only\n \n \n \n \n \n \n \n \n \n \n ,\n\n // Icon top\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n ,\n\n // Icon bottom\n \n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n ,\n\n // Icon start\n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n ,\n\n // Icon end\n \n \n \n Item One\n \n \n \n Item Two\n \n \n \n Item Three\n \n \n ];\n }\n}\n```", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the segment button.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "layout", - "type": "\"icon-bottom\" | \"icon-end\" | \"icon-hide\" | \"icon-start\" | \"icon-top\" | \"label-hide\" | undefined", - "mutable": false, - "attr": "layout", - "reflectToAttr": false, - "docs": "Set the layout of the text and icon in the segment.", - "docsTags": [], - "default": "'icon-top'", - "values": [ - { - "value": "icon-bottom", - "type": "string" - }, - { - "value": "icon-end", - "type": "string" - }, - { - "value": "icon-hide", - "type": "string" - }, - { - "value": "icon-start", - "type": "string" - }, - { - "value": "icon-top", - "type": "string" - }, - { - "value": "label-hide", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "type", - "type": "\"button\" | \"reset\" | \"submit\"", - "mutable": false, - "attr": "type", - "reflectToAttr": false, - "docs": "The type of the button.", - "docsTags": [], - "default": "'button'", - "values": [ - { - "value": "button", - "type": "string" - }, - { - "value": "reset", - "type": "string" - }, - { - "value": "submit", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "string", - "mutable": false, - "attr": "value", - "reflectToAttr": false, - "docs": "The value of the segment button.", - "docsTags": [], - "default": "'ion-sb-' + (ids++)", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the segment button" - }, - { - "name": "--background-checked", - "annotation": "prop", - "docs": "Background of the checked segment button" - }, - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background of the segment button when focused with the tab key" - }, - { - "name": "--background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the segment button background when focused with the tab key" - }, - { - "name": "--background-hover", - "annotation": "prop", - "docs": "Background of the segment button on hover" - }, - { - "name": "--background-hover-opacity", - "annotation": "prop", - "docs": "Opacity of the segment button background on hover" - }, - { - "name": "--border-color", - "annotation": "prop", - "docs": "Color of the segment button border" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Radius of the segment button border" - }, - { - "name": "--border-style", - "annotation": "prop", - "docs": "Style of the segment button border" - }, - { - "name": "--border-width", - "annotation": "prop", - "docs": "Width of the segment button border" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the segment button" - }, - { - "name": "--color-checked", - "annotation": "prop", - "docs": "Color of the checked segment button" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Color of the segment button when focused with the tab key" - }, - { - "name": "--color-hover", - "annotation": "prop", - "docs": "Color of the segment button on hover" - }, - { - "name": "--indicator-box-shadow", - "annotation": "prop", - "docs": "Box shadow on the indicator for the checked segment button" - }, - { - "name": "--indicator-color", - "annotation": "prop", - "docs": "Color of the indicator for the checked segment button" - }, - { - "name": "--indicator-height", - "annotation": "prop", - "docs": "Height of the indicator for the checked segment button" - }, - { - "name": "--indicator-transform", - "annotation": "prop", - "docs": "Transform of the indicator for the checked segment button" - }, - { - "name": "--indicator-transition", - "annotation": "prop", - "docs": "Transition of the indicator for the checked segment button" - }, - { - "name": "--margin-bottom", - "annotation": "prop", - "docs": "Bottom margin of the segment button" - }, - { - "name": "--margin-end", - "annotation": "prop", - "docs": "Right margin if direction is left-to-right, and left margin if direction is right-to-left of the segment button" - }, - { - "name": "--margin-start", - "annotation": "prop", - "docs": "Left margin if direction is left-to-right, and right margin if direction is right-to-left of the segment button" - }, - { - "name": "--margin-top", - "annotation": "prop", - "docs": "Top margin of the segment button" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the segment button" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the segment button" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the segment button" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the segment button" - }, - { - "name": "--transition", - "annotation": "prop", - "docs": "Transition of the segment button" - } - ], - "slots": [], - "parts": [ - { - "name": "indicator", - "docs": "The indicator displayed on the checked segment button." - }, - { - "name": "indicator-background", - "docs": "The background element for the indicator displayed on the checked segment button." - }, - { - "name": "native", - "docs": "The native HTML button element that wraps all child elements." - } - ], - "dependents": [], - "dependencies": [ - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-segment-button": [ - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/select/select.tsx", - "encapsulation": "shadow", - "tag": "ion-select", - "readme": "# ion-select\n\nSelects are form controls to select an option, or options, from a set of options, similar to a native `` element. When a user taps the select, a dialog appears with all of the options in a large, easy to select list.\n\nA select should be used with child `` elements. If the child option is not given a `value` attribute then its text will be used as the value.\n\nIf `value` is set on the ``, the selected option will be chosen based on that value.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "placeholder - The text displayed in the select when there is no value." - }, - { - "name": "part", - "text": "text - The displayed value of the select." - }, - { - "name": "part", - "text": "icon - The select icon container." - } - ], - "usage": { - "angular": "### Single Selection\n\n```html\n\n \n \n Single Selection\n \n \n\n \n Gender\n \n Female\n Male\n \n \n\n \n Hair Color\n \n Brown\n Blonde\n Black\n Red\n \n \n\n\n```\n\n### Multiple Selection\n\n```html\n\n \n \n Multiple Selection\n \n \n\n \n Toppings\n \n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Pets\n \n Bird\n Cat\n Dog\n Honey Badger\n \n \n\n```\n\n### Objects as Values\n\n```html\n\n \n \n Objects as Values (compareWith)\n \n \n\n \n Users\n \n {{user.first + ' ' + user.last}}\n \n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\ninterface User {\n id: number;\n first: string;\n last: string;\n}\n\n@Component({\n selector: 'select-example',\n templateUrl: 'select-example.html',\n styleUrls: ['./select-example.css'],\n})\nexport class SelectExample {\n users: User[] = [\n {\n id: 1,\n first: 'Alice',\n last: 'Smith',\n },\n {\n id: 2,\n first: 'Bob',\n last: 'Davis',\n },\n {\n id: 3,\n first: 'Charlie',\n last: 'Rosenburg',\n }\n ];\n\n compareWith(o1: User, o2: User) {\n return o1 && o2 ? o1.id === o2.id : o1 === o2;\n }\n}\n```\n\n### Objects as Values with Multiple Selection\n\n```html\n\n \n \n Objects as Values (compareWith)\n \n \n\n \n Users\n \n {{user.first + ' ' + user.last}}\n \n \n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\ninterface User {\n id: number;\n first: string;\n last: string;\n}\n\n@Component({\n selector: 'select-example',\n templateUrl: 'select-example.html',\n styleUrls: ['./select-example.css'],\n})\nexport class SelectExample {\n users: User[] = [\n {\n id: 1,\n first: 'Alice',\n last: 'Smith',\n },\n {\n id: 2,\n first: 'Bob',\n last: 'Davis',\n },\n {\n id: 3,\n first: 'Charlie',\n last: 'Rosenburg',\n }\n ];\n\n compareWith(o1: User, o2: User | User[]) {\n if (!o1 || !o2) {\n return o1 === o2;\n }\n\n if (Array.isArray(o2)) {\n return o2.some((u: User) => u.id === o1.id);\n }\n\n return o1.id === o2.id;\n }\n}\n```\n\n### Interface Options\n\n```html\n\n \n \n Interface Options\n \n \n\n \n Alert\n \n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Popover\n \n Brown\n Blonde\n Black\n Red\n \n \n\n \n Action Sheet\n \n Red\n Purple\n Yellow\n Orange\n Green\n \n \n\n\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'select-example',\n templateUrl: 'select-example.html',\n styleUrls: ['./select-example.css'],\n})\nexport class SelectExample {\n customAlertOptions: any = {\n header: 'Pizza Toppings',\n subHeader: 'Select your toppings',\n message: '$1.00 per topping',\n translucent: true\n };\n\n customPopoverOptions: any = {\n header: 'Hair Color',\n subHeader: 'Select your hair color',\n message: 'Only select your dominant hair color'\n };\n\n customActionSheetOptions: any = {\n header: 'Colors',\n subHeader: 'Select your favorite color'\n };\n}\n```\n", - "javascript": "### Single Selection\n\n```html\n\n \n \n Single Selection\n \n \n\n \n Gender\n \n Female\n Male\n \n \n\n \n Hair Color\n \n Brown\n Blonde\n Black\n Red\n \n \n\n\n```\n\n### Multiple Selection\n\n```html\n\n \n \n Multiple Selection\n \n \n\n \n Toppings\n \n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Pets\n \n Bird\n Cat\n Dog\n Honey Badger\n \n \n\n```\n\n```javascript\nconst select = document.querySelector('multiple');\nselect.value = ['bird', 'dog'];\n```\n\n### Objects as Values\n\n```html\n\n \n \n Objects as Values (compareWith)\n \n \n\n \n Users\n \n \n\n```\n\n```javascript\n let objectOptions = [\n {\n id: 1,\n first: 'Alice',\n last: 'Smith',\n },\n {\n id: 2,\n first: 'Bob',\n last: 'Davis',\n },\n {\n id: 3,\n first: 'Charlie',\n last: 'Rosenburg',\n }\n ];\n\n let compareWithFn = (o1, o2) => {\n return o1 && o2 ? o1.id === o2.id : o1 === o2;\n };\n\n let objectSelectElement = document.getElementById('objectSelectCompareWith');\n objectSelectElement.compareWith = compareWithFn;\n\n objectOptions.forEach((option, i) => {\n let selectOption = document.createElement('ion-select-option');\n selectOption.value = option;\n selectOption.textContent = option.first + ' ' + option.last;\n\n objectSelectElement.appendChild(selectOption)\n });\n\n objectSelectElement.value = objectOptions[0];\n}\n```\n\n### Interface Options\n\n```html\n\n \n \n Interface Options\n \n \n\n \n Alert\n \n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Popover\n \n Brown\n Blonde\n Black\n Red\n \n \n\n \n Action Sheet\n \n Red\n Purple\n Yellow\n Orange\n Green\n \n \n\n\n```\n\n```javascript\nvar customAlertSelect = document.getElementById('customAlertSelect');\nvar customAlertOptions = {\n header: 'Pizza Toppings',\n subHeader: 'Select your toppings',\n message: '$1.00 per topping',\n translucent: true\n};\ncustomAlertSelect.interfaceOptions = customAlertOptions;\n\nvar customPopoverSelect = document.getElementById('customPopoverSelect');\nvar customPopoverOptions = {\n header: 'Hair Color',\n subHeader: 'Select your hair color',\n message: 'Only select your dominant hair color'\n};\ncustomPopoverSelect.interfaceOptions = customPopoverOptions;\n\nvar customActionSheetSelect = document.getElementById('customActionSheetSelect');\nvar customActionSheetOptions = {\n header: 'Colors',\n subHeader: 'Select your favorite color'\n};\ncustomActionSheetSelect.interfaceOptions = customActionSheetOptions;\n```", - "react": "### Single Selection\n\n```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonItem, IonLabel, IonList, IonListHeader, IonSelect, IonSelectOption, IonPage, IonItemDivider } from '@ionic/react';\n\nexport const SingleSelection: React.FC = () => {\n\n const [gender, setGender] = useState();\n const [hairColor, setHairColor] = useState('brown');\n\n return (\n \n \n \n \n \n Single Selection\n \n \n\n \n Gender\n setGender(e.detail.value)}>\n Female\n Male\n \n \n\n \n Hair Color\n setHairColor(e.detail.value)}>\n Brown\n Blonde\n Black\n Red\n \n \n Your Selections\n Gender: {gender ?? '(none selected)'}\n Hair Color: {hairColor}\n \n \n \n );\n};\n```\n\n\n### Multiple Selection\n\n```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonItem, IonLabel, IonList, IonListHeader, IonSelect, IonSelectOption, IonPage, IonItemDivider } from '@ionic/react';\n\nexport const MultipleSelection: React.FC = () => {\n\n const [toppings, setToppings] = useState([]);\n const [pets, setPets] = useState(['bird', 'dog']);\n\n return (\n \n \n \n \n \n Multiple Selection\n \n \n\n \n Toppings\n setToppings(e.detail.value)}>\n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Pets\n setPets(e.detail.value)}>\n Bird\n Cat\n Dog\n Honey Badger\n \n \n Your Selections\n Toppings: {toppings.length ? toppings.reduce((curr, prev) => prev + ', ' + curr, '') : '(none selected)'}\n Pets: {pets.length ? pets.reduce((curr, prev) => prev + ', ' + curr, '') : '(none selected)'}\n \n \n \n );\n};\n```\n\n\n### Objects as Values\n\n```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonItem, IonLabel, IonList, IonListHeader, IonSelect, IonSelectOption, IonPage, IonItemDivider } from '@ionic/react';\n\nconst users = [\n {\n id: 1,\n first: 'Alice',\n last: 'Smith'\n },\n {\n id: 2,\n first: 'Bob',\n last: 'Davis'\n },\n {\n id: 3,\n first: 'Charlie',\n last: 'Rosenburg',\n }\n];\n\ntype User = typeof users[number];\n\nconst compareWith = (o1: User, o2: User) => {\n return o1 && o2 ? o1.id === o2.id : o1 === o2;\n};\n\nexport const ObjectSelection: React.FC = () => {\n\n const [selectedUsers, setSelectedUsers] = useState([]);\n\n return (\n \n \n \n \n \n Objects as Values (compareWith)\n \n \n \n Users\n setSelectedUsers(e.detail.value)}>\n {users.map(user => (\n \n {user.first} {user.last}\n \n ))}\n \n \n Selected Users\n {selectedUsers.length ?\n selectedUsers.map(user => {user.first} {user.last}) :\n (none selected)\n }\n \n \n \n );\n};\n```\n\n\n### Interface Options\n\n```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonItem, IonLabel, IonList, IonListHeader, IonSelect, IonSelectOption, IonPage, IonItemDivider } from '@ionic/react';\n\nconst customAlertOptions = {\n header: 'Pizza Toppings',\n subHeader: 'Select your toppings',\n message: '$1.00 per topping',\n translucent: true\n};\n\nconst customPopoverOptions = {\n header: 'Hair Color',\n subHeader: 'Select your hair color',\n message: 'Only select your dominant hair color'\n};\n\nconst customActionSheetOptions = {\n header: 'Colors',\n subHeader: 'Select your favorite color'\n};\n\nexport const InterfaceOptionsSelection: React.FC = () => {\n\n const [toppings, setToppings] = useState([]);\n const [hairColor, setHairColor] = useState('brown');\n const [color, setColor] = useState();\n\n return (\n \n \n \n \n \n Interface Options\n \n \n\n \n Alert\n setToppings(e.detail.value)}\n value={toppings}\n >\n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Popover\n setHairColor(e.detail.value)}\n value={hairColor}>\n Brown\n Blonde\n Black\n Red\n \n \n\n \n Action Sheet\n setColor(e.detail.value)}\n value={color}\n >\n Red\n Purple\n Yellow\n Orange\n Green\n \n \n\n Your Selections\n Toppings: {toppings.length ? toppings.reduce((curr, prev) => prev + ', ' + curr, '') : '(none selected)'}\n Hair Color: {hairColor}\n Color: {color ?? '(none selected)'}\n \n \n \n );\n};\n```", - "stencil": "### Single Selection\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'select-example',\n styleUrl: 'select-example.css'\n})\nexport class SelectExample {\n render() {\n return [\n \n \n \n Single Selection\n \n \n\n \n Gender\n \n Female\n Male\n \n \n\n \n Hair Color\n \n Brown\n Blonde\n Black\n Red\n \n \n\n \n ];\n }\n}\n```\n\n### Multiple Selection\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'select-example',\n styleUrl: 'select-example.css'\n})\nexport class SelectExample {\n render() {\n return [\n \n \n \n Multiple Selection\n \n \n\n \n Toppings\n \n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Pets\n \n Bird\n Cat\n Dog\n Honey Badger\n \n \n \n ];\n }\n}\n```\n\n### Objects as Values\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'select-example',\n styleUrl: 'select-example.css'\n})\nexport class SelectExample {\n private users: any[] = [\n {\n id: 1,\n first: 'Alice',\n last: 'Smith',\n },\n {\n id: 2,\n first: 'Bob',\n last: 'Davis',\n },\n {\n id: 3,\n first: 'Charlie',\n last: 'Rosenburg',\n }\n ];\n\n compareWith = (o1, o2) => {\n return o1 && o2 ? o1.id === o2.id : o1 === o2;\n };\n\n render() {\n return [\n \n \n \n Objects as Values (compareWith)\n \n \n\n \n Users\n \n {this.users.map(user =>\n \n {user.first + ' ' + user.last}\n \n )}\n \n \n \n ];\n }\n}\n```\n\n### Interface Options\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'select-example',\n styleUrl: 'select-example.css'\n})\nexport class SelectExample {\n private customAlertOptions: any = {\n header: 'Pizza Toppings',\n subHeader: 'Select your toppings',\n message: '$1.00 per topping',\n translucent: true\n };\n\n private customPopoverOptions: any = {\n header: 'Hair Color',\n subHeader: 'Select your hair color',\n message: 'Only select your dominant hair color'\n };\n\n private customActionSheetOptions: any = {\n header: 'Colors',\n subHeader: 'Select your favorite color'\n };\n\n render() {\n return [\n \n \n \n Interface Options\n \n \n\n \n Alert\n \n Bacon\n Black Olives\n Extra Cheese\n Green Peppers\n Mushrooms\n Onions\n Pepperoni\n Pineapple\n Sausage\n Spinach\n \n \n\n \n Popover\n \n Brown\n Blonde\n Black\n Red\n \n \n\n \n Action Sheet\n \n Red\n Purple\n Yellow\n Orange\n Green\n \n \n \n ];\n }\n}\n```", - "vue": "### Single Selection\n\n```html\n\n\n\n```\n\n### Multiple Selection\n\n```html\n\n\n\n```\n\n### Interface Options\n\n```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "cancelText", - "type": "string", - "mutable": false, - "attr": "cancel-text", - "reflectToAttr": false, - "docs": "The text to display on the cancel button.", - "docsTags": [], - "default": "'Cancel'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "compareWith", - "type": "((currentValue: any, compareValue: any) => boolean) | null | string | undefined", - "mutable": false, - "attr": "compare-with", - "reflectToAttr": false, - "docs": "A property name or function used to compare object values", - "docsTags": [], - "values": [ - { - "type": "((currentValue: any, compareValue: any) => boolean)" - }, - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the select.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "interface", - "type": "\"action-sheet\" | \"alert\" | \"popover\"", - "mutable": false, - "attr": "interface", - "reflectToAttr": false, - "docs": "The interface the select should use: `action-sheet`, `popover` or `alert`.", - "docsTags": [], - "default": "'alert'", - "values": [ - { - "value": "action-sheet", - "type": "string" - }, - { - "value": "alert", - "type": "string" - }, - { - "value": "popover", - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "interfaceOptions", - "type": "any", - "mutable": false, - "attr": "interface-options", - "reflectToAttr": false, - "docs": "Any additional options that the `alert`, `action-sheet` or `popover` interface\ncan take. See the [ion-alert docs](../alert), the\n[ion-action-sheet docs](../action-sheet) and the\n[ion-popover docs](../popover) for the\ncreate options for each interface.\n\nNote: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.", - "docsTags": [], - "default": "{}", - "values": [ - { - "type": "any" - } - ], - "optional": false, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "multiple", - "type": "boolean", - "mutable": false, - "attr": "multiple", - "reflectToAttr": false, - "docs": "If `true`, the select can accept multiple values.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "this.inputId", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "okText", - "type": "string", - "mutable": false, - "attr": "ok-text", - "reflectToAttr": false, - "docs": "The text to display on the ok button.", - "docsTags": [], - "default": "'OK'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "placeholder", - "type": "string | undefined", - "mutable": false, - "attr": "placeholder", - "reflectToAttr": false, - "docs": "The text to display when the select is empty.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "selectedText", - "type": "null | string | undefined", - "mutable": false, - "attr": "selected-text", - "reflectToAttr": false, - "docs": "The text to display instead of the selected option's value.", - "docsTags": [], - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "value", - "type": "any", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "the value of the select.", - "docsTags": [], - "values": [ - { - "type": "any" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "open", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "open(event?: UIEvent | undefined) => Promise", - "parameters": [], - "docs": "Open the select overlay. The overlay is either an alert, action sheet, or popover,\ndepending on the `interface` property on the `ion-select`.", - "docsTags": [ - { - "name": "param", - "text": "event The user interface event that called the open." - } - ] - } - ], - "events": [ - { - "event": "ionBlur", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the select loses focus.", - "docsTags": [] - }, - { - "event": "ionCancel", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the selection is cancelled.", - "docsTags": [] - }, - { - "event": "ionChange", - "detail": "SelectChangeEventDetail", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the value has changed.", - "docsTags": [] - }, - { - "event": "ionFocus", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the select has focus.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the select" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the select" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the select" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the select" - }, - { - "name": "--placeholder-color", - "annotation": "prop", - "docs": "Color of the select placeholder text" - }, - { - "name": "--placeholder-opacity", - "annotation": "prop", - "docs": "Opacity of the select placeholder text" - } - ], - "slots": [], - "parts": [ - { - "name": "icon", - "docs": "The select icon container." - }, - { - "name": "placeholder", - "docs": "The text displayed in the select when there is no value." - }, - { - "name": "text", - "docs": "The displayed value of the select." - } - ], - "dependents": [], - "dependencies": [ - "ion-select-popover", - "ion-popover", - "ion-action-sheet", - "ion-alert" - ], - "dependencyGraph": { - "ion-select": [ - "ion-select-popover", - "ion-popover", - "ion-action-sheet", - "ion-alert" - ], - "ion-select-popover": [ - "ion-item", - "ion-checkbox", - "ion-label", - "ion-radio-group", - "ion-radio", - "ion-list", - "ion-list-header" - ], - "ion-item": [ - "ion-icon", - "ion-ripple-effect", - "ion-note" - ], - "ion-popover": [ - "ion-backdrop" - ], - "ion-action-sheet": [ - "ion-backdrop", - "ion-icon", - "ion-ripple-effect" - ], - "ion-alert": [ - "ion-ripple-effect", - "ion-backdrop" - ] - } - }, - { - "filePath": "./src/components/select-option/select-option.tsx", - "encapsulation": "shadow", - "tag": "ion-select-option", - "readme": "# ion-select-option\n\nSelect Options are components that are child elements of a Select. Each option defined is passed and displayed in the Select dialog. For more information, see the [Select docs](../select).\n\n## Customization\n\nEach `ion-select-option` component that is added as a child of an `ion-select` is passed to the interface to display it in the dialog. It's important to note that the `ion-select-option` element itself is hidden from the view. This means that attempting to style it will not have any effect on the option in the dialog:\n\n```css\n/* DOES NOT work */\nion-select-option {\n color: red;\n}\n```\n\nInstead, each interface option has the class `.select-interface-option` which can be styled. Keep in mind that due to the overlays being scoped components the selector by itself will not work and a custom `cssClass` is recommended to be passed to the interface.\n\n```css\n/* This will NOT work on its own */\n.select-interface-option {\n color: red;\n}\n\n/*\n * \"my-custom-interface\" needs to be passed in through\n * the cssClass of the interface options for this to work\n */\n.my-custom-interface .select-interface-option {\n color: red;\n}\n```\n\n> Note: Some interfaces require more in depth styling due to how the options are rendered. See usage for expanded information on this.\n\nThe options can be styled individually by adding your own class on the `ion-select-option` which gets passed to the interface option. See the [Usage](#usage) section below for examples of styling and setting individual classes on options.\n\n", - "docs": "Select Options are components that are child elements of a Select. Each option defined is passed and displayed in the Select dialog. For more information, see the [Select docs](../select).", - "docsTags": [], - "usage": { - "javascript": "```html\n\n Select\n \n Brown\n Blonde\n Black\n Red\n \n\n```\n\n### Customizing Options\n\n```html\n\n Select: Alert Interface\n \n Brown\n Blonde\n Black\n Red\n \n\n\n\n Select: Alert Interface (Multiple Selection)\n \n Brown\n Blonde\n Black\n Red\n \n\n\n\n Select: Popover Interface\n \n Brown\n Blonde\n Black\n Red\n \n\n\n\n Select: Action Sheet Interface\n \n Brown\n Blonde\n Black\n Red\n \n\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .select-interface-option {\n --color: #971e49;\n --color-hover: #79193b;\n}\n\n/* Action Sheet Interface: set color for the action sheet using its button CSS variables */\n.my-custom-interface .select-interface-option {\n --button-color: #971e49;\n --button-color-hover: #79193b;\n}\n\n/* Alert Interface: set color for alert options (single selection) */\n.my-custom-interface .select-interface-option .alert-radio-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for alert options (multiple selection) */\n.my-custom-interface .select-interface-option .alert-checkbox-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for checked alert options (single selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-radio-label {\n color: #79193b;\n}\n\n/* Alert Interface: set color for checked alert options (multiple selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-checkbox-label {\n color: #79193b;\n}\n```\n\n```javascript\n// Pass a custom class to each select interface for styling\nconst selects = document.querySelectorAll('.custom-options');\n\nfor (var i = 0; i < selects.length; i++) {\n selects[i].interfaceOptions = {\n cssClass: 'my-custom-interface'\n };\n};\n```\n\n> Note: In the CSS examples, some of the selectors could be combined together, but are separated out in order to better explain what each selector is for.\n\n### Customizing Individual Options\n\nTo customize an individual option, set a class on the `ion-select-option`:\n\n```html\n\n Select\n \n Brown\n Blonde\n Black\n Red\n \n\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .brown-option {\n --color: #5e3e2c;\n --color-hover: #362419;\n}\n```\n\n```javascript\n// Pass a custom class to each select interface for styling\nconst select = document.querySelector('.custom-options');\nselect.interfaceOptions = {\n cssClass: 'my-custom-interface'\n};\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonContent, IonItem, IonLabel, IonSelect, IonSelectOption, IonPage } from '@ionic/react';\n\nexport const SelectOptionExample: React.FC = () => {\n return (\n \n \n \n Select\n \n Brown\n Blonde\n Black\n Red\n \n \n \n \n );\n};\n```\n\n### Customizing Options\n\n```tsx\nimport React from 'react';\nimport { IonContent, IonItem, IonLabel, IonSelect, IonSelectOption, IonPage } from '@ionic/react';\n\nconst options = {\n cssClass: 'my-custom-interface'\n};\n\nexport const SelectOptionExample: React.FC = () => {\n return (\n \n \n \n Select: Alert Interface\n \n Brown\n Blonde\n Black\n Red\n \n \n\n \n Select: Alert Interface (Multiple Selection)\n \n Brown\n Blonde\n Black\n Red\n \n \n\n \n Select: Popover Interface\n \n Brown\n Blonde\n Black\n Red\n \n \n\n \n Select: Action Sheet Interface\n \n Brown\n Blonde\n Black\n Red\n \n \n \n \n );\n};\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .select-interface-option {\n --color: #971e49;\n --color-hover: #79193b;\n}\n\n/* Action Sheet Interface: set color for the action sheet using its button CSS variables */\n.my-custom-interface .select-interface-option {\n --button-color: #971e49;\n --button-color-hover: #79193b;\n}\n\n/* Alert Interface: set color for alert options (single selection) */\n.my-custom-interface .select-interface-option .alert-radio-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for alert options (multiple selection) */\n.my-custom-interface .select-interface-option .alert-checkbox-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for checked alert options (single selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-radio-label {\n color: #79193b;\n}\n\n/* Alert Interface: set color for checked alert options (multiple selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-checkbox-label {\n color: #79193b;\n}\n```\n\n> Note: In the CSS examples, some of the selectors could be combined together, but are separated out in order to better explain what each selector is for.\n\n\n### Customizing Individual Options\n\nTo customize an individual option, set a class on the `ion-select-option`:\n\n```tsx\nimport React from 'react';\nimport { IonContent, IonItem, IonLabel, IonSelect, IonSelectOption, IonPage } from '@ionic/react';\n\nconst options = {\n cssClass: 'my-custom-interface'\n};\n\nexport const SelectOptionExample: React.FC = () => {\n return (\n \n \n \n Select\n \n Brown\n Blonde\n Black\n Red\n \n \n \n \n );\n};\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .brown-option {\n --color: #5e3e2c;\n --color-hover: #362419;\n}\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'select-option-example',\n styleUrl: 'select-option-example.css'\n})\nexport class SelectOptionExample {\n render() {\n return [\n \n Select\n \n Brown\n Blonde\n Black\n Red\n \n \n ];\n }\n}\n```\n\n### Customizing Options\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'select-option-example',\n styleUrl: 'select-option-example.css'\n})\nexport class SelectOptionExample {\n options = {\n cssClass: 'my-custom-interface'\n };\n\n render() {\n return [\n \n Select: Alert Interface\n \n Brown\n Blonde\n Black\n Red\n \n ,\n\n \n Select: Alert Interface (Multiple Selection)\n \n Brown\n Blonde\n Black\n Red\n \n ,\n\n \n Select: Popover Interface\n \n Brown\n Blonde\n Black\n Red\n \n ,\n\n \n Select: Action Sheet Interface\n \n Brown\n Blonde\n Black\n Red\n \n \n ];\n }\n}\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .select-interface-option {\n --color: #971e49;\n --color-hover: #79193b;\n}\n\n/* Action Sheet Interface: set color for the action sheet using its button CSS variables */\n.my-custom-interface .select-interface-option {\n --button-color: #971e49;\n --button-color-hover: #79193b;\n}\n\n/* Alert Interface: set color for alert options (single selection) */\n.my-custom-interface .select-interface-option .alert-radio-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for alert options (multiple selection) */\n.my-custom-interface .select-interface-option .alert-checkbox-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for checked alert options (single selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-radio-label {\n color: #79193b;\n}\n\n/* Alert Interface: set color for checked alert options (multiple selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-checkbox-label {\n color: #79193b;\n}\n```\n\n> Note: In the CSS examples, some of the selectors could be combined together, but are separated out in order to better explain what each selector is for.\n\n### Customizing Individual Options\n\nTo customize an individual option, set a class on the `ion-select-option`:\n\n```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'select-option-example',\n styleUrl: 'select-option-example.css'\n})\nexport class SelectOptionExample {\n options = {\n cssClass: 'my-custom-interface'\n };\n\n render() {\n return [\n \n Select\n \n Brown\n Blonde\n Black\n Red\n \n \n ];\n }\n}\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .brown-option {\n --color: #5e3e2c;\n --color-hover: #362419;\n}\n```", - "vue": "```html\n\n\n\n```\n\n### Customizing Options\n\n```html\n\n\n\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .select-interface-option {\n --color: #971e49;\n --color-hover: #79193b;\n}\n\n/* Action Sheet Interface: set color for the action sheet using its button CSS variables */\n.my-custom-interface .select-interface-option {\n --button-color: #971e49;\n --button-color-hover: #79193b;\n}\n\n/* Alert Interface: set color for alert options (single selection) */\n.my-custom-interface .select-interface-option .alert-radio-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for alert options (multiple selection) */\n.my-custom-interface .select-interface-option .alert-checkbox-label {\n color: #971e49;\n}\n\n/* Alert Interface: set color for checked alert options (single selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-radio-label {\n color: #79193b;\n}\n\n/* Alert Interface: set color for checked alert options (multiple selection) */\n.my-custom-interface .select-interface-option[aria-checked=true] .alert-checkbox-label {\n color: #79193b;\n}\n```\n\n> Note: In the CSS examples, some of the selectors could be combined together, but are separated out in order to better explain what each selector is for.\n\n\n### Customizing Individual Options\n\nTo customize an individual option, set a class on the `ion-select-option`:\n\n```html\n\n\n\n```\n\n```css\n/* Popover Interface: set color for the popover using Item's CSS variables */\n.my-custom-interface .brown-option {\n --color: #5e3e2c;\n --color-hover: #362419;\n}\n```\n" - }, - "props": [ - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the select option. This property does not apply when `interface=\"action-sheet\"` as `ion-action-sheet` does not allow for disabled buttons.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "any", - "mutable": false, - "attr": "value", - "reflectToAttr": false, - "docs": "The text value of the option.", - "docsTags": [], - "values": [ - { - "type": "any" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/skeleton-text/skeleton-text.tsx", - "encapsulation": "shadow", - "tag": "ion-skeleton-text", - "readme": "# ion-skeleton-text\n\nSkeleton Text is a component for rendering placeholder content. The element will render a gray block at the specified width.\n\n", - "docs": "Skeleton Text is a component for rendering placeholder content. The element will render a gray block at the specified width.", - "docsTags": [], - "usage": { - "angular": "```html\n\n
\n
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac eros est. Cras iaculis pulvinar arcu non vehicula. Fusce at quam a eros malesuada condimentum. Aliquam tincidunt tincidunt vehicula.\n
\n\n \n \n \n Data\n \n \n \n \n \n \n \n

\n {{ data.heading }}\n

\n

\n {{ data.para1 }}\n

\n

\n {{ data.para2 }}\n

\n
\n
\n \n \n \n \n \n

\n {{ data.heading }}\n

\n

\n {{ data.para1 }}\n

\n

\n {{ data.para2 }}\n

\n
\n
\n \n \n \n

\n {{ data.heading }}\n

\n

\n {{ data.para1 }}\n

\n

\n {{ data.para2 }}\n

\n
\n
\n
\n
\n\n\n
\n
\n \n \n \n \n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n
\n
\n```\n\n```css\n/* Custom Skeleton Line Height and Margin */\n.custom-skeleton ion-skeleton-text {\n line-height: 13px;\n}\n\n.custom-skeleton ion-skeleton-text:last-child {\n margin-bottom: 5px;\n}\n```\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'skeleton-text-example',\n templateUrl: 'skeleton-text-example.html',\n styleUrls: ['./skeleton-text-example.css']\n})\nexport class SkeletonTextExample {\n data: any;\n\n constructor() {}\n\n ionViewWillEnter() {\n setTimeout(() => {\n this.data = {\n 'heading': 'Normal text',\n 'para1': 'Lorem ipsum dolor sit amet, consectetur',\n 'para2': 'adipiscing elit.'\n };\n }, 5000);\n }\n}\n```", - "javascript": "```html\n\n
\n
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac eros est. Cras iaculis pulvinar arcu non vehicula. Fusce at quam a eros malesuada condimentum. Aliquam tincidunt tincidunt vehicula.\n
\n\n \n \n \n Data\n \n \n \n \n \n \n \n

\n Normal text\n

\n

\n Lorem ipsum dolor sit amet, consectetur\n

\n

\n adipiscing elit.\n

\n
\n
\n \n \n \n \n \n

\n Normal text\n

\n

\n Lorem ipsum dolor sit amet, consectetur\n

\n

\n adipiscing elit.\n

\n
\n
\n \n \n \n

\n Normal text\n

\n

\n Lorem ipsum dolor sit amet, consectetur\n

\n

\n adipiscing elit.\n

\n
\n
\n
\n
\n\n\n
\n
\n \n \n \n \n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n
\n
\n```\n\n```css\n#data {\n display: none;\n}\n\n/* Custom Skeleton Line Height and Margin */\n.custom-skeleton ion-skeleton-text {\n line-height: 13px;\n}\n\n.custom-skeleton ion-skeleton-text:last-child {\n margin-bottom: 5px;\n}\n```\n\n```javascript\nfunction onLoad() {\n const skeletonEl = document.getElementById('skeleton');\n const dataEl = document.getElementById('data');\n\n setTimeout(() => {\n skeletonEl.style.display = 'none';\n dataEl.style.display = 'block';\n }, 5000);\n}\n```", - "react": "```tsx\nimport React, { useState } from 'react';\nimport {\n IonContent,\n IonItem,\n IonAvatar,\n IonLabel,\n IonSkeletonText,\n IonListHeader,\n IonIcon,\n IonThumbnail,\n IonList\n} from '@ionic/react';\nimport { call } from 'ionicons/icons';\n\nimport './SkeletonTextExample.css';\n\nexport const SkeletonTextExample: React.FC = () => {\n const [data, setData] = useState();\n\n setTimeout(() => {\n setData({\n heading: 'Normal text',\n para1: 'Lorem ipsum dolor sit amet, consectetur',\n para2: 'adipiscing elit.'\n });\n }, 5000);\n\n return (\n \n {data ? (\n <>\n
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac eros est. Cras iaculis pulvinar\n arcu non vehicula. Fusce at quam a eros malesuada condimentum. Aliquam tincidunt tincidunt\n vehicula.\n
\n\n \n \n \n Data\n \n \n \n \n \n \n \n

{data.heading}

\n

{data.para1}

\n

{data.para2}

\n
\n
\n \n \n \n \n \n

{data.heading}

\n

{data.para1}

\n

{data.para2}

\n
\n
\n \n \n \n

{data.heading}

\n

{data.para1}

\n

{data.para2}

\n
\n
\n
\n \n ) : (\n <>\n
\n \n \n \n \n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n
\n \n )}\n
\n );\n};\n```\n\n```css\n/* Custom Skeleton Line Height and Margin */\n.custom-skeleton ion-skeleton-text {\n line-height: 13px;\n}\n\n.custom-skeleton ion-skeleton-text:last-child {\n margin-bottom: 5px;\n}\n```", - "stencil": "```tsx\nimport { Component, State, h } from '@stencil/core';\n\n@Component({\n tag: 'skeleton-text-example',\n styleUrl: 'skeleton-text-example.css'\n})\nexport class SkeletonTextExample {\n @State() data: any;\n\n componentWillLoad() {\n // Data will show after 5 seconds\n setTimeout(() => {\n this.data = {\n 'heading': 'Normal text',\n 'para1': 'Lorem ipsum dolor sit amet, consectetur',\n 'para2': 'adipiscing elit.'\n };\n }, 5000);\n }\n\n // Render skeleton screen when there is no data\n renderSkeletonScreen() {\n return [\n \n
\n \n \n \n \n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n \n \n \n

\n \n

\n

\n \n

\n

\n \n

\n
\n
\n
\n
\n ];\n }\n\n // Render the elements with data\n renderDataScreen() {\n return [\n \n
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac eros est. Cras iaculis pulvinar arcu non vehicula. Fusce at quam a eros malesuada condimentum. Aliquam tincidunt tincidunt vehicula.\n
\n\n \n \n \n Data\n \n \n \n \n \n \n \n

\n { this.data.heading }\n

\n

\n { this.data.para1 }\n

\n

\n { this.data.para2 }\n

\n
\n
\n \n \n \n \n \n

\n { this.data.heading }\n

\n

\n { this.data.para1 }\n

\n

\n { this.data.para2 }\n

\n
\n
\n \n \n \n

\n { this.data.heading }\n

\n

\n { this.data.para1 }\n

\n

\n { this.data.para2 }\n

\n
\n
\n
\n
\n ];\n }\n\n render() {\n if (this.data) {\n return this.renderDataScreen();\n } else {\n return this.renderSkeletonScreen();\n }\n }\n}\n```\n\n```css\n/* Custom Skeleton Line Height and Margin */\n.custom-skeleton ion-skeleton-text {\n line-height: 13px;\n}\n\n.custom-skeleton ion-skeleton-text:last-child {\n margin-bottom: 5px;\n}\n```", - "vue": "```html\n\n\n\n\n\n```" - }, - "props": [ - { - "name": "animated", - "type": "boolean", - "mutable": false, - "attr": "animated", - "reflectToAttr": false, - "docs": "If `true`, the skeleton text will animate.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the skeleton text" - }, - { - "name": "--background-rgb", - "annotation": "prop", - "docs": "Background of the skeleton text in rgb format" - }, - { - "name": "--border-radius", - "annotation": "prop", - "docs": "Border radius of the skeleton text" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/slide/slide.tsx", - "encapsulation": "none", - "tag": "ion-slide", - "readme": "# ion-slide\n\nThe Slide component is a child component of [Slides](../slides). The template\nshould be written as `ion-slide`. Any slide content should be written\nin this component and it should be used in conjunction with [Slides](../slides).\n\nSee the [Slides API Docs](../slides) for more usage information.\n\n", - "docs": "The Slide component is a child component of [Slides](../slides). The template\nshould be written as `ion-slide`. Any slide content should be written\nin this component and it should be used in conjunction with [Slides](../slides).\n\nSee the [Slides API Docs](../slides) for more usage information.", - "docsTags": [], - "usage": {}, - "props": [], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/slides/slides.tsx", - "encapsulation": "none", - "tag": "ion-slides", - "readme": "# ion-slides\n\nThe Slides component is a multi-section container. Each section can be swiped\nor dragged between. It contains any number of [Slide](../slide) components.\n\nThis guide will cover migration from the deprecated `ion-slides` component to the framework-specific solutions that Swiper.js provides as well as the existing `ion-slides` API for developers who are still using that component.\n\nAdopted from Swiper.js:\nThe most modern mobile touch slider and framework with hardware accelerated transitions.\n\nhttp://www.idangero.us/swiper/\n\nCopyright 2016, Vladimir Kharlampidi\nThe iDangero.us\nhttp://www.idangero.us/\n\nLicensed under MIT\n\n## Migration\n\nWith the release of Ionic Framework v6, the Ionic Team has deprecated the `ion-slides` and `ion-slide` components in favor of using the official framework integrations provided by Swiper. Fear not! You will still be able to use slides components in your application. Additionally, because you are still using Swiper, the functionality of your slides component should remain exactly the same.\n\n### What is Swiper.js?\n\nSwiper.js is the carousel/slider library that powers `ion-slides`. The library is bundled automatically with all versions of Ionic Framework. When Ionic Framework v4. was first released, Swiper did not have framework specific integrations of its library, so `ion-slides` was created as a way of bridging the gap between the core Swiper library and frameworks such as Angular, React, and Vue.\n\nSince then, the Swiper team has released framework specific integrations of Swiper.js for Angular, React, Vue, and more!\n\n### What are the benefits of this change?\n\nThere are several benefits for members of the Ionic Framework community. By using the official Swiper.js framework integrations:\n\n- Developers can now be in control of the exact version of Swiper.js they want to use. Previously, developers would need to rely on the Ionic Team to update the version internally and release a new version of Ionic Framework.\n- The Ionic Team can spend more time triaging and fixing other non-slides issues, speeding up our development process so we can make the framework work better for our community.\n- Developers should experience fewer bugs.\n- Application bundle sizes can shrink in some cases. By installing Swiper.js as a 3rd party dependency in your application, bundlers such as Webpack or Rollup should be able to treeshake your code better.\n- Developers have access to new features that they previously did not have when using `ion-slides`.\n\n### How long do I have to migrate?\n\nWe plan to remove `ion-slides` and `ion-slide` in Ionic Framework v7. `ion-slides` and `ion-slide` will continue to be available for the entire Ionic Framework v6 lifecycle but will only receive critical bug fixes.\n\n### How do I migrate?\n\nSince the underlying technology that powers your slides is the same, the migration process is easy! Follow the guides below for your specific framework.\n\n[Migration for Ionic Angular users](../angular/slides)\n\n[Migration for Ionic React users](../react/slides)\n\n[Migration for Ionic Vue users](../vue/slides)\n\n------\n\nThe following documentation applies to the `ion-slides` component.\n\n## Custom Animations\n\nBy default, Ionic slides use the built-in `slide` animation effect. Custom animations can be provided via the `options` property. Examples of other animations can be found below.\n\n\n### Coverflow\n\n```typescript\nconst slideOpts = {\n slidesPerView: 3,\n coverflowEffect: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n modifier: 1,\n slideShadows: true,\n },\n on: {\n beforeInit() {\n const swiper = this;\n\n swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n\n swiper.params.watchSlidesProgress = true;\n swiper.originalParams.watchSlidesProgress = true;\n },\n setTranslate() {\n const swiper = this;\n const {\n width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid, $\n } = swiper;\n const params = swiper.params.coverflowEffect;\n const isHorizontal = swiper.isHorizontal();\n const transform$$1 = swiper.translate;\n const center = isHorizontal ? -transform$$1 + (swiperWidth / 2) : -transform$$1 + (swiperHeight / 2);\n const rotate = isHorizontal ? params.rotate : -params.rotate;\n const translate = params.depth;\n // Each slide offset from center\n for (let i = 0, length = slides.length; i < length; i += 1) {\n const $slideEl = slides.eq(i);\n const slideSize = slidesSizesGrid[i];\n const slideOffset = $slideEl[0].swiperSlideOffset;\n const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;\n\n let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;\n let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;\n // var rotateZ = 0\n let translateZ = -translate * Math.abs(offsetMultiplier);\n\n let translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);\n let translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;\n\n // Fix for ultra small values\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n\n const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;\n\n $slideEl.transform(slideTransform);\n $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n if (params.slideShadows) {\n // Set shadows\n let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n if ($shadowBeforeEl.length === 0) {\n $shadowBeforeEl = swiper.$(`
`);\n $slideEl.append($shadowBeforeEl);\n }\n if ($shadowAfterEl.length === 0) {\n $shadowAfterEl = swiper.$(`
`);\n $slideEl.append($shadowAfterEl);\n }\n if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;\n }\n }\n\n // Set correct perspective for IE10\n if (swiper.support.pointerEvents || swiper.support.prefixedPointerEvents) {\n const ws = $wrapperEl[0].style;\n ws.perspectiveOrigin = `${center}px 50%`;\n }\n },\n setTransition(duration) {\n const swiper = this;\n swiper.slides\n .transition(duration)\n .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')\n .transition(duration);\n }\n }\n}\n```\n\n### Cube\n\n```typescript\nconst slideOpts = {\n grabCursor: true,\n cubeEffect: {\n shadow: true,\n slideShadows: true,\n shadowOffset: 20,\n shadowScale: 0.94,\n },\n on: {\n beforeInit: function() {\n const swiper = this;\n swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n\n const overwriteParams = {\n slidesPerView: 1,\n slidesPerColumn: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n resistanceRatio: 0,\n spaceBetween: 0,\n centeredSlides: false,\n virtualTranslate: true,\n };\n\n this.params = Object.assign(this.params, overwriteParams);\n this.originalParams = Object.assign(this.originalParams, overwriteParams);\n },\n setTranslate: function() {\n const swiper = this;\n const {\n $el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize,\n } = swiper;\n const params = swiper.params.cubeEffect;\n const isHorizontal = swiper.isHorizontal();\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let wrapperRotate = 0;\n let $cubeShadowEl;\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = swiper.$('
');\n $wrapperEl.append($cubeShadowEl);\n }\n $cubeShadowEl.css({ height: `${swiperWidth}px` });\n } else {\n $cubeShadowEl = $el.find('.swiper-cube-shadow');\n if ($cubeShadowEl.length === 0) {\n $cubeShadowEl = swiper.$('
');\n $el.append($cubeShadowEl);\n }\n }\n }\n\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let slideIndex = i;\n if (isVirtual) {\n slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);\n }\n let slideAngle = slideIndex * 90;\n let round = Math.floor(slideAngle / 360);\n if (rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n let tx = 0;\n let ty = 0;\n let tz = 0;\n if (slideIndex % 4 === 0) {\n tx = -round * 4 * swiperSize;\n tz = 0;\n } else if ((slideIndex - 1) % 4 === 0) {\n tx = 0;\n tz = -round * 4 * swiperSize;\n } else if ((slideIndex - 2) % 4 === 0) {\n tx = swiperSize + (round * 4 * swiperSize);\n tz = swiperSize;\n } else if ((slideIndex - 3) % 4 === 0) {\n tx = -swiperSize;\n tz = (3 * swiperSize) + (swiperSize * 4 * round);\n }\n if (rtl) {\n tx = -tx;\n }\n\n if (!isHorizontal) {\n ty = tx;\n tx = 0;\n }\n\n const transform$$1 = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;\n if (progress <= 1 && progress > -1) {\n wrapperRotate = (slideIndex * 90) + (progress * 90);\n if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90);\n }\n $slideEl.transform(transform$$1);\n if (params.slideShadows) {\n // Set shadows\n let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = swiper.$(`
`);\n $slideEl.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = swiper.$(`
`);\n $slideEl.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n $wrapperEl.css({\n '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,\n '-moz-transform-origin': `50% 50% -${swiperSize / 2}px`,\n '-ms-transform-origin': `50% 50% -${swiperSize / 2}px`,\n 'transform-origin': `50% 50% -${swiperSize / 2}px`,\n });\n\n if (params.shadow) {\n if (isHorizontal) {\n $cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);\n } else {\n const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);\n const multiplier = 1.5 - (\n (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2)\n + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)\n );\n const scale1 = params.shadowScale;\n const scale2 = params.shadowScale / multiplier;\n const offset$$1 = params.shadowOffset;\n $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset$$1}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);\n }\n }\n\n const zFactor = (swiper.browser.isSafari || swiper.browser.isUiWebView) ? (-swiperSize / 2) : 0;\n $wrapperEl\n .transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);\n },\n setTransition: function(duration) {\n const swiper = this;\n const { $el, slides } = swiper;\n slides\n .transition(duration)\n .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')\n .transition(duration);\n if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {\n $el.find('.swiper-cube-shadow').transition(duration);\n }\n },\n }\n}\n```\n\n### Fade\n\n```typescript\nconst slideOpts = {\n on: {\n beforeInit() {\n const swiper = this;\n swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);\n const overwriteParams = {\n slidesPerView: 1,\n slidesPerColumn: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: true,\n };\n swiper.params = Object.assign(swiper.params, overwriteParams);\n swiper.params = Object.assign(swiper.originalParams, overwriteParams);\n },\n setTranslate() {\n const swiper = this;\n const { slides } = swiper;\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = swiper.slides.eq(i);\n const offset$$1 = $slideEl[0].swiperSlideOffset;\n let tx = -offset$$1;\n if (!swiper.params.virtualTranslate) tx -= swiper.translate;\n let ty = 0;\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n const slideOpacity = swiper.params.fadeEffect.crossFade\n ? Math.max(1 - Math.abs($slideEl[0].progress), 0)\n : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);\n $slideEl\n .css({\n opacity: slideOpacity,\n })\n .transform(`translate3d(${tx}px, ${ty}px, 0px)`);\n }\n },\n setTransition(duration) {\n const swiper = this;\n const { slides, $wrapperEl } = swiper;\n slides.transition(duration);\n if (swiper.params.virtualTranslate && duration !== 0) {\n let eventTriggered = false;\n slides.transitionEnd(() => {\n if (eventTriggered) return;\n if (!swiper || swiper.destroyed) return;\n eventTriggered = true;\n swiper.animating = false;\n const triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n for (let i = 0; i < triggerEvents.length; i += 1) {\n $wrapperEl.trigger(triggerEvents[i]);\n }\n });\n }\n },\n }\n}\n```\n\n### Flip\n\n```typescript\nconst slideOpts = {\n on: {\n beforeInit() {\n const swiper = this;\n swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);\n swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);\n const overwriteParams = {\n slidesPerView: 1,\n slidesPerColumn: 1,\n slidesPerGroup: 1,\n watchSlidesProgress: true,\n spaceBetween: 0,\n virtualTranslate: true,\n };\n swiper.params = Object.assign(swiper.params, overwriteParams);\n swiper.originalParams = Object.assign(swiper.originalParams, overwriteParams);\n },\n setTranslate() {\n const swiper = this;\n const { $, slides, rtlTranslate: rtl } = swiper;\n for (let i = 0; i < slides.length; i += 1) {\n const $slideEl = slides.eq(i);\n let progress = $slideEl[0].progress;\n if (swiper.params.flipEffect.limitRotation) {\n progress = Math.max(Math.min($slideEl[0].progress, 1), -1);\n }\n const offset$$1 = $slideEl[0].swiperSlideOffset;\n const rotate = -180 * progress;\n let rotateY = rotate;\n let rotateX = 0;\n let tx = -offset$$1;\n let ty = 0;\n if (!swiper.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n } else if (rtl) {\n rotateY = -rotateY;\n }\n\n $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;\n\n if (swiper.params.flipEffect.slideShadows) {\n // Set shadows\n let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');\n let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = swiper.$(`
`);\n $slideEl.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = swiper.$(`
`);\n $slideEl.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n $slideEl\n .transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`);\n }\n },\n setTransition(duration) {\n const swiper = this;\n const { slides, activeIndex, $wrapperEl } = swiper;\n slides\n .transition(duration)\n .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')\n .transition(duration);\n if (swiper.params.virtualTranslate && duration !== 0) {\n let eventTriggered = false;\n // eslint-disable-next-line\n slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {\n if (eventTriggered) return;\n if (!swiper || swiper.destroyed) return;\n\n eventTriggered = true;\n swiper.animating = false;\n const triggerEvents = ['webkitTransitionEnd', 'transitionend'];\n for (let i = 0; i < triggerEvents.length; i += 1) {\n $wrapperEl.trigger(triggerEvents[i]);\n }\n });\n }\n }\n }\n};\n```\n", - "docs": "The Slides component is a multi-section container. Each section can be swiped\nor dragged between. It contains any number of [Slide](../slide) components.\n\nThis guide will cover migration from the deprecated `ion-slides` component to the framework-specific solutions that Swiper.js provides as well as the existing `ion-slides` API for developers who are still using that component.\n\nAdopted from Swiper.js:\nThe most modern mobile touch slider and framework with hardware accelerated transitions.\n\nhttp://www.idangero.us/swiper/\n\nCopyright 2016, Vladimir Kharlampidi\nThe iDangero.us\nhttp://www.idangero.us/\n\nLicensed under MIT", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'slides-example',\n template: `\n \n \n \n

Slide 1

\n
\n \n

Slide 2

\n
\n \n

Slide 3

\n
\n
\n
\n `\n})\nexport class SlideExample {\n // Optional parameters to pass to the swiper instance.\n // See http://idangero.us/swiper/api/ for valid options.\n slideOpts = {\n initialSlide: 1,\n speed: 400\n };\n constructor() {}\n}\n```\n\n```css\n/* Without setting height the slides will take up the height of the slide's content */\nion-slides {\n height: 100%;\n}\n```\n", - "javascript": "```html\n\n \n \n

Slide 1

\n
\n\n \n

Slide 2

\n
\n\n \n

Slide 3

\n
\n
\n
\n```\n\n```javascript\nvar slides = document.querySelector('ion-slides');\n\n// Optional parameters to pass to the swiper instance.\n// See http://idangero.us/swiper/api/ for valid options.\nslides.options = {\n initialSlide: 1,\n speed: 400\n}\n```\n\n```css\n/* Without setting height the slides will take up the height of the slide's content */\nion-slides {\n height: 100%;\n}\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonSlides, IonSlide, IonContent } from '@ionic/react';\n\n// Optional parameters to pass to the swiper instance.\n// See http://idangero.us/swiper/api/ for valid options.\nconst slideOpts = {\n initialSlide: 1,\n speed: 400\n};\n\nexport const SlidesExample: React.FC = () => (\n \n \n \n

Slide 1

\n
\n \n

Slide 2

\n
\n \n

Slide 3

\n
\n
\n
\n);\n```\n\n```css\n/* Without setting height the slides will take up the height of the slide's content */\nion-slides {\n height: 100%;\n}\n```", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'slides-example',\n styleUrl: 'slides-example.css'\n})\nexport class SlidesExample {\n // Optional parameters to pass to the swiper instance.\n // See http://idangero.us/swiper/api/ for valid options.\n private slideOpts = {\n initialSlide: 1,\n speed: 400\n };\n\n render() {\n return [\n \n \n \n

Slide 1

\n
\n\n \n

Slide 2

\n
\n\n \n

Slide 3

\n
\n
\n
\n ];\n }\n}\n```\n\n```css\n/* Without setting height the slides will take up the height of the slide's content */\nion-slides {\n height: 100%;\n}\n```", - "vue": "```html\n\n\n\n\n```\n" - }, - "props": [ - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "options", - "type": "any", - "mutable": false, - "attr": "options", - "reflectToAttr": false, - "docs": "Options to pass to the swiper instance.\nSee http://idangero.us/swiper/api/ for valid options", - "docsTags": [], - "default": "{}", - "values": [ - { - "type": "any" - } - ], - "optional": false, - "required": false - }, - { - "name": "pager", - "type": "boolean", - "mutable": false, - "attr": "pager", - "reflectToAttr": false, - "docs": "If `true`, show the pagination.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "scrollbar", - "type": "boolean", - "mutable": false, - "attr": "scrollbar", - "reflectToAttr": false, - "docs": "If `true`, show the scrollbar.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [ - { - "name": "getActiveIndex", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getActiveIndex() => Promise", - "parameters": [], - "docs": "Get the index of the active slide.", - "docsTags": [] - }, - { - "name": "getPreviousIndex", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getPreviousIndex() => Promise", - "parameters": [], - "docs": "Get the index of the previous slide.", - "docsTags": [] - }, - { - "name": "getSwiper", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getSwiper() => Promise", - "parameters": [], - "docs": "Get the Swiper instance.\nUse this to access the full Swiper API.\nSee https://idangero.us/swiper/api/ for all API options.", - "docsTags": [] - }, - { - "name": "isBeginning", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "isBeginning() => Promise", - "parameters": [], - "docs": "Get whether or not the current slide is the first slide.", - "docsTags": [] - }, - { - "name": "isEnd", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "isEnd() => Promise", - "parameters": [], - "docs": "Get whether or not the current slide is the last slide.", - "docsTags": [] - }, - { - "name": "length", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "length() => Promise", - "parameters": [], - "docs": "Get the total number of slides.", - "docsTags": [] - }, - { - "name": "lockSwipeToNext", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "lockSwipeToNext(lock: boolean) => Promise", - "parameters": [], - "docs": "Lock or unlock the ability to slide to the next slide.", - "docsTags": [ - { - "name": "param", - "text": "lock If `true`, disable swiping to the next slide." - } - ] - }, - { - "name": "lockSwipeToPrev", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "lockSwipeToPrev(lock: boolean) => Promise", - "parameters": [], - "docs": "Lock or unlock the ability to slide to the previous slide.", - "docsTags": [ - { - "name": "param", - "text": "lock If `true`, disable swiping to the previous slide." - } - ] - }, - { - "name": "lockSwipes", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "lockSwipes(lock: boolean) => Promise", - "parameters": [], - "docs": "Lock or unlock the ability to slide to the next or previous slide.", - "docsTags": [ - { - "name": "param", - "text": "lock If `true`, disable swiping to the next and previous slide." - } - ] - }, - { - "name": "slideNext", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "slideNext(speed?: number | undefined, runCallbacks?: boolean | undefined) => Promise", - "parameters": [], - "docs": "Transition to the next slide.", - "docsTags": [ - { - "name": "param", - "text": "speed The transition duration (in ms)." - }, - { - "name": "param", - "text": "runCallbacks If true, the transition will produce [Transition/SlideChange][Start/End] transition events." - } - ] - }, - { - "name": "slidePrev", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "slidePrev(speed?: number | undefined, runCallbacks?: boolean | undefined) => Promise", - "parameters": [], - "docs": "Transition to the previous slide.", - "docsTags": [ - { - "name": "param", - "text": "speed The transition duration (in ms)." - }, - { - "name": "param", - "text": "runCallbacks If true, the transition will produce the [Transition/SlideChange][Start/End] transition events." - } - ] - }, - { - "name": "slideTo", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "slideTo(index: number, speed?: number | undefined, runCallbacks?: boolean | undefined) => Promise", - "parameters": [], - "docs": "Transition to the specified slide.", - "docsTags": [ - { - "name": "param", - "text": "index The index of the slide to transition to." - }, - { - "name": "param", - "text": "speed The transition duration (in ms)." - }, - { - "name": "param", - "text": "runCallbacks If true, the transition will produce [Transition/SlideChange][Start/End] transition events." - } - ] - }, - { - "name": "startAutoplay", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "startAutoplay() => Promise", - "parameters": [], - "docs": "Start auto play.", - "docsTags": [] - }, - { - "name": "stopAutoplay", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "stopAutoplay() => Promise", - "parameters": [], - "docs": "Stop auto play.", - "docsTags": [] - }, - { - "name": "update", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "update() => Promise", - "parameters": [], - "docs": "Update the underlying slider implementation. Call this if you've added or removed\nchild slides.", - "docsTags": [] - }, - { - "name": "updateAutoHeight", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "updateAutoHeight(speed?: number | undefined) => Promise", - "parameters": [], - "docs": "Force swiper to update its height (when autoHeight is enabled) for the duration\nequal to 'speed' parameter.", - "docsTags": [ - { - "name": "param", - "text": "speed The transition duration (in ms)." - } - ] - } - ], - "events": [ - { - "event": "ionSlideDidChange", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after the active slide has changed.", - "docsTags": [] - }, - { - "event": "ionSlideDoubleTap", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the user double taps on the slide's container.", - "docsTags": [] - }, - { - "event": "ionSlideDrag", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the slider is actively being moved.", - "docsTags": [] - }, - { - "event": "ionSlideNextEnd", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the next slide has ended.", - "docsTags": [] - }, - { - "event": "ionSlideNextStart", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the next slide has started.", - "docsTags": [] - }, - { - "event": "ionSlidePrevEnd", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the previous slide has ended.", - "docsTags": [] - }, - { - "event": "ionSlidePrevStart", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the previous slide has started.", - "docsTags": [] - }, - { - "event": "ionSlideReachEnd", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the slider is at the last slide.", - "docsTags": [] - }, - { - "event": "ionSlideReachStart", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the slider is at its initial position.", - "docsTags": [] - }, - { - "event": "ionSlidesDidLoad", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted after Swiper initialization", - "docsTags": [] - }, - { - "event": "ionSlideTap", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the user taps/clicks on the slide's container.", - "docsTags": [] - }, - { - "event": "ionSlideTouchEnd", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the user releases the touch.", - "docsTags": [] - }, - { - "event": "ionSlideTouchStart", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the user first touches the slider.", - "docsTags": [] - }, - { - "event": "ionSlideTransitionEnd", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the slide transition has ended.", - "docsTags": [] - }, - { - "event": "ionSlideTransitionStart", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted when the slide transition has started.", - "docsTags": [] - }, - { - "event": "ionSlideWillChange", - "detail": "void", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Emitted before the active slide has changed.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--bullet-background", - "annotation": "prop", - "docs": "Background of the pagination bullets" - }, - { - "name": "--bullet-background-active", - "annotation": "prop", - "docs": "Background of the active pagination bullet" - }, - { - "name": "--progress-bar-background", - "annotation": "prop", - "docs": "Background of the pagination progress-bar" - }, - { - "name": "--progress-bar-background-active", - "annotation": "prop", - "docs": "Background of the active pagination progress-bar" - }, - { - "name": "--scroll-bar-background", - "annotation": "prop", - "docs": "Background of the pagination scroll-bar" - }, - { - "name": "--scroll-bar-background-active", - "annotation": "prop", - "docs": "Background of the active pagination scroll-bar" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/spinner/spinner.tsx", - "encapsulation": "shadow", - "tag": "ion-spinner", - "readme": "# ion-spinner\n\nThe Spinner component provides a variety of animated SVG spinners. Spinners are visual indicators that the app is loading content or performing another process that the user needs to wait on.\n\nThe default spinner to use is based on the platform. The default spinner for `ios` is `\"lines\"`, and the default for `android` is `\"crescent\"`. If the platform is not `ios` or `android`, the spinner will default to `crescent`. If the `name` property is set, then that spinner will be used instead of the platform specific spinner.\n\n\n", - "docs": "The Spinner component provides a variety of animated SVG spinners. Spinners are visual indicators that the app is loading content or performing another process that the user needs to wait on.\n\nThe default spinner to use is based on the platform. The default spinner for `ios` is `\"lines\"`, and the default for `android` is `\"crescent\"`. If the platform is not `ios` or `android`, the spinner will default to `crescent`. If the `name` property is set, then that spinner will be used instead of the platform specific spinner.", - "docsTags": [], - "usage": { - "angular": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n```\n", - "javascript": "```html\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonSpinner, IonContent } from '@ionic/react';\n\nexport const SpinnerExample: React.FC = () => (\n \n {/*-- Default Spinner --*/}\n \n\n {/*-- Lines --*/}\n \n\n {/*-- Lines Small --*/}\n \n\n {/*-- Dots --*/}\n \n\n {/*-- Bubbles --*/}\n \n\n {/*-- Circles --*/}\n \n\n {/*-- Crescent --*/}\n \n\n {/*-- Paused Default Spinner --*/}\n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'spinner-example',\n styleUrl: 'spinner-example.css'\n})\nexport class SpinnerExample {\n render() {\n return [\n // Default Spinner\n ,\n\n // Lines\n ,\n\n // Lines Small\n ,\n\n // Dots\n ,\n\n // Bubbles\n ,\n\n // Circles\n ,\n\n // Crescent\n ,\n\n // Paused Default Spinner\n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "duration", - "type": "number | undefined", - "mutable": false, - "attr": "duration", - "reflectToAttr": false, - "docs": "Duration of the spinner animation in milliseconds. The default varies based on the spinner.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "name", - "type": "\"bubbles\" | \"circles\" | \"circular\" | \"crescent\" | \"dots\" | \"lines\" | \"lines-sharp\" | \"lines-sharp-small\" | \"lines-small\" | undefined", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the SVG spinner to use. If a name is not provided, the platform's default\nspinner will be used.", - "docsTags": [], - "values": [ - { - "value": "bubbles", - "type": "string" - }, - { - "value": "circles", - "type": "string" - }, - { - "value": "circular", - "type": "string" - }, - { - "value": "crescent", - "type": "string" - }, - { - "value": "dots", - "type": "string" - }, - { - "value": "lines", - "type": "string" - }, - { - "value": "lines-sharp", - "type": "string" - }, - { - "value": "lines-sharp-small", - "type": "string" - }, - { - "value": "lines-small", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "paused", - "type": "boolean", - "mutable": false, - "attr": "paused", - "reflectToAttr": false, - "docs": "If `true`, the spinner's animation will be paused.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the spinner" - } - ], - "slots": [], - "parts": [], - "dependents": [ - "ion-infinite-scroll-content", - "ion-loading", - "ion-refresher-content" - ], - "dependencies": [], - "dependencyGraph": { - "ion-infinite-scroll-content": [ - "ion-spinner" - ], - "ion-loading": [ - "ion-spinner" - ], - "ion-refresher-content": [ - "ion-spinner" - ] - } - }, - { - "filePath": "./src/components/split-pane/split-pane.tsx", - "encapsulation": "shadow", - "tag": "ion-split-pane", - "readme": "# ion-split-pane\n\nA split pane is useful when creating multi-view layouts. It allows UI elements, like menus, to be\ndisplayed as the viewport width increases.\n\nIf the device's screen width is below a certain size, the split pane will collapse and the menu will be hidden. This is ideal for creating an app that will be served in a browser and deployed through the app store to phones and tablets.\n\n\n## Setting Breakpoints\n\nBy default, the split pane will expand when the screen is larger than 992px. To customize this, pass a breakpoint in the `when` property. The `when` property can accept a boolean value, any valid media query, or one of Ionic's predefined sizes.\n\n\n```html\n\n\n\n\n\n```\n\n\n | Size | Value | Description |\n |------|-----------------------|-----------------------------------------------------------------------|\n | `xs` | `(min-width: 0px)` | Show the split-pane when the min-width is 0px (meaning, always) |\n | `sm` | `(min-width: 576px)` | Show the split-pane when the min-width is 576px |\n | `md` | `(min-width: 768px)` | Show the split-pane when the min-width is 768px |\n | `lg` | `(min-width: 992px)` | Show the split-pane when the min-width is 992px (default break point) |\n | `xl` | `(min-width: 1200px)` | Show the split-pane when the min-width is 1200px |\n\n", - "docs": "A split pane is useful when creating multi-view layouts. It allows UI elements, like menus, to be\ndisplayed as the viewport width increases.\n\nIf the device's screen width is below a certain size, the split pane will collapse and the menu will be hidden. This is ideal for creating an app that will be served in a browser and deployed through the app store to phones and tablets.", - "docsTags": [], - "usage": { - "angular": "```html\n\n \n \n \n \n Menu\n \n \n \n\n \n \n\n```\n", - "javascript": "```html\n\n \n \n \n \n Menu\n \n \n \n\n \n \n

Hello

\n
\n
\n```\n", - "react": "```tsx\nimport React from 'react';\nimport {\n IonSplitPane,\n IonMenu,\n IonHeader,\n IonToolbar,\n IonTitle,\n IonRouterOutlet,\n IonContent,\n IonPage\n} from '@ionic/react';\n\nexport const SplitPlaneExample: React.SFC<{}> = () => (\n \n \n {/*-- the side menu --*/}\n \n \n \n Menu\n \n \n \n\n {/*-- the main content --*/}\n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'split-pane-example',\n styleUrl: 'split-pane-example.css'\n})\nexport class SplitPaneExample {\n render() {\n return [\n \n {/* the side menu */}\n \n \n \n Menu\n \n \n \n\n {/* the main content */}\n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "contentId", - "type": "string | undefined", - "mutable": false, - "attr": "content-id", - "reflectToAttr": true, - "docs": "The `id` of the main content. When using\na router this is typically `ion-router-outlet`.\nWhen not using a router, this is typically\nyour main view's `ion-content`. This is not the\nid of the `ion-content` inside of your `ion-menu`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the split pane will be hidden.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "when", - "type": "boolean | string", - "mutable": false, - "attr": "when", - "reflectToAttr": false, - "docs": "When the split-pane should be shown.\nCan be a CSS media query expression, or a shortcut expression.\nCan also be a boolean expression.", - "docsTags": [], - "default": "QUERY['lg']", - "values": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [ - { - "event": "ionSplitPaneVisible", - "detail": "{ visible: boolean; }", - "bubbles": true, - "cancelable": true, - "composed": true, - "docs": "Expression to be called when the split-pane visibility has changed", - "docsTags": [] - } - ], - "listeners": [], - "styles": [ - { - "name": "--border", - "annotation": "prop", - "docs": "Border between panes" - }, - { - "name": "--side-max-width", - "annotation": "prop", - "docs": "Maximum width of the side pane. Does not apply when split pane is collapsed." - }, - { - "name": "--side-min-width", - "annotation": "prop", - "docs": "Minimum width of the side pane. Does not apply when split pane is collapsed." - }, - { - "name": "--side-width", - "annotation": "prop", - "docs": "Width of the side pane. Does not apply when split pane is collapsed." - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/tab/tab.tsx", - "encapsulation": "shadow", - "tag": "ion-tab", - "readme": "# ion-tab\n\nThe tab component is a child component of [tabs](../tabs). Each tab can contain a top level navigation stack for an app or a single view. An app can have many tabs, all with their own independent navigation.\n\n> Note: This component should only be used with vanilla or Stencil JavaScript projects. For Angular, React, and Vue apps you do not need to use `ion-tab` to declare your tab components.\n\nSee the [tabs documentation](../tabs/) for more details on configuring tabs.\n", - "docs": "The tab component is a child component of [tabs](../tabs). Each tab can contain a top level navigation stack for an app or a single view. An app can have many tabs, all with their own independent navigation.\n\n> Note: This component should only be used with vanilla or Stencil JavaScript projects. For Angular, React, and Vue apps you do not need to use `ion-tab` to declare your tab components.\n\nSee the [tabs documentation](../tabs/) for more details on configuring tabs.", - "docsTags": [], - "usage": {}, - "props": [ - { - "name": "component", - "type": "Function | HTMLElement | null | string | undefined", - "mutable": false, - "attr": "component", - "reflectToAttr": false, - "docs": "The component to display inside of the tab.", - "docsTags": [], - "values": [ - { - "type": "Function" - }, - { - "type": "HTMLElement" - }, - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "tab", - "type": "string", - "mutable": false, - "attr": "tab", - "reflectToAttr": false, - "docs": "A tab id must be provided for each `ion-tab`. It's used internally to reference\nthe selected tab or by the router to switch between them.", - "docsTags": [], - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": true - } - ], - "methods": [ - { - "name": "setActive", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "setActive() => Promise", - "parameters": [], - "docs": "Set the active component for the tab", - "docsTags": [] - } - ], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/tab-bar/tab-bar.tsx", - "encapsulation": "shadow", - "tag": "ion-tab-bar", - "readme": "# ion-tab-bar\n\nThe tab bar is a UI component that contains a set of [tab buttons](../tab-button). A tab bar must be provided inside of [tabs](../tabs) to communicate with each [tab](../tab).\n\n", - "docs": "The tab bar is a UI component that contains a set of [tab buttons](../tab-button). A tab bar must be provided inside of [tabs](../tabs) to communicate with each [tab](../tab).", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n```", - "javascript": "```html\n\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonTabs, IonTabBar, IonTabButton, IonIcon, IonContent } from '@ionic/react';\nimport { call, person, settings } from 'ionicons/icons';\n\nexport const TabBarExample: React.FC = () => (\n \n \n {/*-- Tab bar --*/}\n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'tab-bar-example',\n styleUrl: 'tab-bar-example.css'\n})\nexport class TabBarExample {\n render() {\n return [\n \n {/* Tab views */}\n \n \n \n\n {/* Tab bar */}\n \n \n \n \n \n \n \n \n \n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "selectedTab", - "type": "string | undefined", - "mutable": false, - "attr": "selected-tab", - "reflectToAttr": false, - "docs": "The selected tab component", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "translucent", - "type": "boolean", - "mutable": false, - "attr": "translucent", - "reflectToAttr": false, - "docs": "If `true`, the tab bar will be translucent.\nOnly applies when the mode is `\"ios\"` and the device supports\n[`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the tab bar" - }, - { - "name": "--border", - "annotation": "prop", - "docs": "Border of the tab bar" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the tab bar" - } - ], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/tab-button/tab-button.tsx", - "encapsulation": "shadow", - "tag": "ion-tab-button", - "readme": "# ion-tab-button\n\nA tab button is a UI component that is placed inside of a [tab bar](../tab-bar). The tab button can specify the layout of the icon and label and connect to a [tab view](../tab).\n\nSee the [tabs documentation](../tabs) for more details on configuring tabs.\n\n", - "docs": "A tab button is a UI component that is placed inside of a [tab bar](../tab-bar). The tab button can specify the layout of the icon and label and connect to a [tab view](../tab).\n\nSee the [tabs documentation](../tabs) for more details on configuring tabs.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - }, - { - "name": "part", - "text": "native - The native HTML anchor element that wraps all child elements." - } - ], - "usage": { - "angular": "```html\n\n \n \n \n \n Schedule\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n\n```\n", - "javascript": "```html\n\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n Schedule\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n\n```\n", - "react": "```tsx\nimport React from 'react';\nimport { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonContent } from '@ionic/react';\nimport { calendar, personCircle, map, informationCircle } from 'ionicons/icons';\n\nexport const TabButtonExample: React.FC = () => (\n \n \n {/*-- Tab bar --*/}\n \n \n \n Schedule\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'tab-button-example',\n styleUrl: 'tab-button-example.css'\n})\nexport class TabButtonExample {\n render() {\n return [\n \n {/* Tab views */}\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n {/* Tab bar */}\n \n \n \n Schedule\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the tab button.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "download", - "type": "string | undefined", - "mutable": false, - "attr": "download", - "reflectToAttr": false, - "docs": "This attribute instructs browsers to download a URL instead of navigating to\nit, so the user will be prompted to save it as a local file. If the attribute\nhas a value, it is used as the pre-filled file name in the Save prompt\n(the user can still change the file name if they want).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "href", - "type": "string | undefined", - "mutable": false, - "attr": "href", - "reflectToAttr": false, - "docs": "Contains a URL or a URL fragment that the hyperlink points to.\nIf this property is set, an anchor tag will be rendered.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "layout", - "type": "\"icon-bottom\" | \"icon-end\" | \"icon-hide\" | \"icon-start\" | \"icon-top\" | \"label-hide\" | undefined", - "mutable": true, - "attr": "layout", - "reflectToAttr": false, - "docs": "Set the layout of the text and icon in the tab bar.\nIt defaults to `'icon-top'`.", - "docsTags": [], - "values": [ - { - "value": "icon-bottom", - "type": "string" - }, - { - "value": "icon-end", - "type": "string" - }, - { - "value": "icon-hide", - "type": "string" - }, - { - "value": "icon-start", - "type": "string" - }, - { - "value": "icon-top", - "type": "string" - }, - { - "value": "label-hide", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "rel", - "type": "string | undefined", - "mutable": false, - "attr": "rel", - "reflectToAttr": false, - "docs": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - }, - { - "name": "selected", - "type": "boolean", - "mutable": true, - "attr": "selected", - "reflectToAttr": false, - "docs": "The selected tab component", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "tab", - "type": "string | undefined", - "mutable": false, - "attr": "tab", - "reflectToAttr": false, - "docs": "A tab id must be provided for each `ion-tab`. It's used internally to reference\nthe selected tab or by the router to switch between them.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "target", - "type": "string | undefined", - "mutable": false, - "attr": "target", - "reflectToAttr": false, - "docs": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided.\nSpecial keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": false, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [ - { - "event": "ionTabBarChanged", - "target": "window", - "capture": false, - "passive": false - } - ], - "styles": [ - { - "name": "--background", - "annotation": "prop", - "docs": "Background of the tab button" - }, - { - "name": "--background-focused", - "annotation": "prop", - "docs": "Background of the tab button when focused with the tab key" - }, - { - "name": "--background-focused-opacity", - "annotation": "prop", - "docs": "Opacity of the tab button background when focused with the tab key" - }, - { - "name": "--color", - "annotation": "prop", - "docs": "Color of the tab button" - }, - { - "name": "--color-focused", - "annotation": "prop", - "docs": "Color of the tab button when focused with the tab key" - }, - { - "name": "--color-selected", - "annotation": "prop", - "docs": "Color of the selected tab button" - }, - { - "name": "--padding-bottom", - "annotation": "prop", - "docs": "Bottom padding of the tab button" - }, - { - "name": "--padding-end", - "annotation": "prop", - "docs": "Right padding if direction is left-to-right, and left padding if direction is right-to-left of the tab button" - }, - { - "name": "--padding-start", - "annotation": "prop", - "docs": "Left padding if direction is left-to-right, and right padding if direction is right-to-left of the tab button" - }, - { - "name": "--padding-top", - "annotation": "prop", - "docs": "Top padding of the tab button" - }, - { - "name": "--ripple-color", - "annotation": "prop", - "docs": "Color of the button ripple effect" - } - ], - "slots": [], - "parts": [ - { - "name": "native", - "docs": "The native HTML anchor element that wraps all child elements." - } - ], - "dependents": [], - "dependencies": [ - "ion-ripple-effect" - ], - "dependencyGraph": { - "ion-tab-button": [ - "ion-ripple-effect" - ] - } - }, - { - "filePath": "./src/components/tabs/tabs.tsx", - "encapsulation": "shadow", - "tag": "ion-tabs", - "readme": "# ion-tabs\n\nTabs are a top level navigation component to implement a tab-based navigation.\nThe component is a container of individual [Tab](../tab/) components.\n\nThe `ion-tabs` component does not have any styling and works as a router outlet in order to handle navigation. It does not provide any UI feedback or mechanism to switch between tabs. In order to do so, an `ion-tab-bar` should be provided as a direct child of `ion-tabs`.\n\nBoth `ion-tabs` and `ion-tab-bar` can be used as standalone elements. They don’t depend on each other to work, but they are usually used together in order to implement a tab-based navigation that behaves like a native app.\n\nThe `ion-tab-bar` needs a slot defined in order to be projected to the right place in an `ion-tabs` component.\n\n## Interfaces\n\n### TabsCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface TabsCustomEvent extends CustomEvent {\n detail: { tab: string };\n target: HTMLIonTabsElement;\n}\n```\n\n", - "docs": "Tabs are a top level navigation component to implement a tab-based navigation.\nThe component is a container of individual [Tab](../tab/) components.\n\nThe `ion-tabs` component does not have any styling and works as a router outlet in order to handle navigation. It does not provide any UI feedback or mechanism to switch between tabs. In order to do so, an `ion-tab-bar` should be provided as a direct child of `ion-tabs`.\n\nBoth `ion-tabs` and `ion-tab-bar` can be used as standalone elements. They don’t depend on each other to work, but they are usually used together in order to implement a tab-based navigation that behaves like a native app.\n\nThe `ion-tab-bar` needs a slot defined in order to be projected to the right place in an `ion-tabs` component.", - "docsTags": [ - { - "name": "slot", - "text": "- Content is placed between the named slots if provided without a slot." - }, - { - "name": "slot", - "text": "top - Content is placed at the top of the screen." - }, - { - "name": "slot", - "text": "bottom - Content is placed at the bottom of the screen." - } - ], - "usage": { - "angular": "```html\n\n \n \n \n Schedule\n 6\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n\n```\n\n\n### Router integration\n\nWhen used with Angular's router the `tab` property of the `ion-tab-button` should be a reference to the route path.\n\n```html\n\n \n \n \n Schedule\n \n \n\n```\n\n```typescript\nimport { Routes } from '@angular/router';\nimport { TabsPage } from './tabs-page';\n\nconst routes: Routes = [\n {\n path: 'tabs',\n component: TabsPage,\n children: [\n {\n path: 'schedule',\n children: [\n {\n path: '',\n loadChildren: '../schedule/schedule.module#ScheduleModule'\n }\n ]\n },\n {\n path: '',\n redirectTo: '/app/tabs/schedule',\n pathMatch: 'full'\n }\n ]\n }\n];\n```\n", - "javascript": "```html\n\n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n Schedule\n 6\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n\n\n```\n\n\n### Activating Tabs\n\nEach `ion-tab-button` will activate one of the tabs when pressed. In order to link the `ion-tab-button` to the `ion-tab` container, a matching `tab` property should be set on each component.\n\n```html\n\n ...\n\n\n\n ...\n\n```\n\nThe `ion-tab-button` and `ion-tab` above are linked by the common `tab` property.\n\nThe `tab` property identifies each tab, and it has to be unique within the `ion-tabs`. It's important to always set the `tab` property on the `ion-tab` and `ion-tab-button`, even if one component is not used.\n\n\n### Router integration\n\nWhen used with Ionic's router (`ion-router`) the `tab` property of the `ion-tab` matches the `component` property of an `ion-route`.\n\nThe following route within the scope of an `ion-tabs` outlet:\n\n```html\n\n```\n\nwill match the following tab:\n\n```html\n\n```", - "react": "```tsx\nimport React from 'react';\nimport { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonBadge } from '@ionic/react';\nimport { calendar, personCircle, map, informationCircle } from 'ionicons/icons';\n\n\nexport const TabsExample: React.FC = () => (\n \n \n \n \n Schedule\n 6\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n \n);\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'tabs-example',\n styleUrl: 'tabs-example.css'\n})\nexport class TabsExample {\n render() {\n return [\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n Schedule\n 6\n \n\n \n \n Speakers\n \n\n \n \n Map\n \n\n \n \n About\n \n \n\n \n ];\n }\n}\n```\n\n\n### Activating Tabs\n\nEach `ion-tab-button` will activate one of the tabs when pressed. In order to link the `ion-tab-button` to the `ion-tab` container, a matching `tab` property should be set on each component.\n\n```jsx\n\n ...\n\n\n\n ...\n\n```\n\nThe `ion-tab-button` and `ion-tab` above are linked by the common `tab` property.\n\nThe `tab` property identifies each tab, and it has to be unique within the `ion-tabs`. It's important to always set the `tab` property on the `ion-tab` and `ion-tab-button`, even if one component is not used.\n\n\n### Router integration\n\nWhen used with Ionic's router (`ion-router`) the `tab` property of the `ion-tab` matches the `component` property of an `ion-route`.\n\nThe following route within the scope of an `ion-tabs` outlet:\n\n```tsx\n\n```\n\nwill match the following tab:\n\n```tsx\n\n```", - "vue": "**Tabs.vue**\n```html\n\n\n\n```\n\n**Schedule.vue**\n```html\n\n\n\n```\n\n**Speakers.vue**\n```html\n\n\n\n```" - }, - "props": [], - "methods": [ - { - "name": "getSelected", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getSelected() => Promise", - "parameters": [], - "docs": "Get the currently selected tab.", - "docsTags": [] - }, - { - "name": "getTab", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getTab(tab: string | HTMLIonTabElement) => Promise", - "parameters": [], - "docs": "Get a specific tab by the value of its `tab` property or an element reference.", - "docsTags": [ - { - "name": "param", - "text": "tab The tab instance to select. If passed a string, it should be the value of the tab's `tab` property." - } - ] - }, - { - "name": "select", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "select(tab: string | HTMLIonTabElement) => Promise", - "parameters": [], - "docs": "Select a tab by the value of its `tab` property or an element reference.", - "docsTags": [ - { - "name": "param", - "text": "tab The tab instance to select. If passed a string, it should be the value of the tab's `tab` property." - } - ] - } - ], - "events": [ - { - "event": "ionTabsDidChange", - "detail": "{ tab: string; }", - "bubbles": false, - "cancelable": true, - "composed": true, - "docs": "Emitted when the navigation has finished transitioning to a new component.", - "docsTags": [] - }, - { - "event": "ionTabsWillChange", - "detail": "{ tab: string; }", - "bubbles": false, - "cancelable": true, - "composed": true, - "docs": "Emitted when the navigation is about to transition to a new component.", - "docsTags": [] - } - ], - "listeners": [], - "styles": [], - "slots": [ - { - "name": "", - "docs": "Content is placed between the named slots if provided without a slot." - }, - { - "name": "bottom", - "docs": "Content is placed at the bottom of the screen." - }, - { - "name": "top", - "docs": "Content is placed at the top of the screen." - } - ], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/text/text.tsx", - "encapsulation": "shadow", - "tag": "ion-text", - "readme": "# ion-text\n\nThe text component is a simple component that can be used to style the text color of any element. The `ion-text` element should wrap the element in order to change the text color of that element.\n\n", - "docs": "The text component is a simple component that can be used to style the text color of any element. The `ion-text` element should wrap the element in order to change the text color of that element.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "javascript": "```html\n\n

H1: The quick brown fox jumps over the lazy dog

\n
\n\n\n

H2: The quick brown fox jumps over the lazy dog

\n
\n\n\n

H3: The quick brown fox jumps over the lazy dog

\n
\n\n\n

H4: The quick brown fox jumps over the lazy dog

\n
\n\n\n
H5: The quick brown fox jumps over the lazy dog
\n
\n\n

\n I saw a werewolf with a Chinese menu in his hand.\n Walking through the streets of Soho in the rain.\n He was looking for a place called Lee Ho Fook's.\n Gonna get a big dish of beef chow mein.\n \n

\n```" - }, - "props": [ - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - } - ], - "methods": [], - "events": [], - "listeners": [], - "styles": [], - "slots": [], - "parts": [], - "dependents": [], - "dependencies": [], - "dependencyGraph": {} - }, - { - "filePath": "./src/components/textarea/textarea.tsx", - "encapsulation": "scoped", - "tag": "ion-textarea", - "readme": "# ion-textarea\n\nThe textarea component is used for multi-line text input. A native textarea element is rendered inside of the component. The user experience and interactivity of the textarea component is improved by having control over the native textarea.\n\nUnlike the native textarea element, the Ionic textarea does not support loading its value from the inner content. The textarea value should be set in the `value` attribute.\n\nThe textarea component accepts the [native textarea attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) in addition to the Ionic properties.\n\n## Interfaces\n\n### TextareaChangeEventDetail\n\n```typescript\ninterface TextareaChangeEventDetail {\n value?: string | null;\n}\n```\n\n### TextareaCustomEvent\n\nWhile not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.\n\n```typescript\ninterface TextareaCustomEvent extends CustomEvent {\n detail: TextareaChangeEventDetail;\n target: HTMLIonTextareaElement;\n}\n```\n", - "docs": "The textarea component is used for multi-line text input. A native textarea element is rendered inside of the component. The user experience and interactivity of the textarea component is improved by having control over the native textarea.\n\nUnlike the native textarea element, the Ionic textarea does not support loading its value from the inner content. The textarea value should be set in the `value` attribute.\n\nThe textarea component accepts the [native textarea attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) in addition to the Ionic properties.", - "docsTags": [ - { - "name": "virtualProp", - "text": "{\"ios\" | \"md\"} mode - The mode determines which platform styles to use." - } - ], - "usage": { - "angular": "```html\n\n\n\n\n\n \n\n\n\n\n Description\n \n\n\n\n\n Summary\n \n \n\n\n\n\n Comment\n \n\n\n\n\n Notes\n \n\n```\n", - "javascript": "```html\n\n\n\n\n\n \n\n\n\n\n Description\n \n\n\n\n\n Summary\n \n \n\n\n\n\n Comment\n \n\n\n\n\n Notes\n \n\n```\n", - "react": "```tsx\nimport React, { useState } from 'react';\nimport { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonTextarea, IonItem, IonLabel, IonItemDivider, IonList } from '@ionic/react';\n\nexport const TextAreaExamples: React.FC = () => {\n const [text, setText] = useState();\n\n return (\n \n \n \n TextArea Examples\n \n \n \n \n Default textarea \n \n setText(e.detail.value!)}>\n \n\n Textarea in an item with a placeholder\n \n setText(e.detail.value!)}>\n \n\n Textarea in an item with a floating label\n \n Description\n setText(e.detail.value!)}>\n \n\n Disabled and readonly textarea in an item with a stacked label\n \n Summary\n setText(e.detail.value!)}>\n \n \n\n Textarea that clears the value on edit\n \n Comment\n setText(e.detail.value!)}>\n \n\n Textarea with custom number of rows and cols\n \n Notes\n setText(e.detail.value!)}>\n \n \n \n \n );\n};\n```\n", - "stencil": "```tsx\nimport { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'textarea-example',\n styleUrl: 'textarea-example.css'\n})\nexport class TextareaExample {\n render() {\n return [\n // Default textarea\n ,\n\n // Textarea in an item with a placeholder\n \n \n ,\n\n // Textarea in an item with a floating label\n \n Description\n \n ,\n\n // Disabled and readonly textarea in an item with a stacked label\n \n Summary\n \n \n ,\n\n // Textarea that clears the value on edit\n \n Comment\n \n ,\n\n // Textarea with custom number of rows and cols\n \n Notes\n \n \n ];\n }\n}\n```\n", - "vue": "```html\n\n\n\n```\n" - }, - "props": [ - { - "name": "autoGrow", - "type": "boolean", - "mutable": false, - "attr": "auto-grow", - "reflectToAttr": false, - "docs": "If `true`, the element height will increase based on the value.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "autocapitalize", - "type": "string", - "mutable": false, - "attr": "autocapitalize", - "reflectToAttr": false, - "docs": "Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\nAvailable options: `\"off\"`, `\"none\"`, `\"on\"`, `\"sentences\"`, `\"words\"`, `\"characters\"`.", - "docsTags": [], - "default": "'none'", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "autofocus", - "type": "boolean", - "mutable": false, - "attr": "autofocus", - "reflectToAttr": false, - "docs": "This Boolean attribute lets you specify that a form control should have input focus when the page loads.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "clearOnEdit", - "type": "boolean", - "mutable": true, - "attr": "clear-on-edit", - "reflectToAttr": false, - "docs": "If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "color", - "type": "string | undefined", - "mutable": false, - "attr": "color", - "reflectToAttr": true, - "docs": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics).", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "cols", - "type": "number | undefined", - "mutable": false, - "attr": "cols", - "reflectToAttr": false, - "docs": "The visible width of the text control, in average character widths. If it is specified, it must be a positive integer.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "debounce", - "type": "number", - "mutable": false, - "attr": "debounce", - "reflectToAttr": false, - "docs": "Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.", - "docsTags": [], - "default": "0", - "values": [ - { - "type": "number" - } - ], - "optional": false, - "required": false - }, - { - "name": "disabled", - "type": "boolean", - "mutable": false, - "attr": "disabled", - "reflectToAttr": false, - "docs": "If `true`, the user cannot interact with the textarea.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "enterkeyhint", - "type": "\"done\" | \"enter\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined", - "mutable": false, - "attr": "enterkeyhint", - "reflectToAttr": false, - "docs": "A hint to the browser for which enter key to display.\nPossible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n`\"previous\"`, `\"search\"`, and `\"send\"`.", - "docsTags": [], - "values": [ - { - "value": "done", - "type": "string" - }, - { - "value": "enter", - "type": "string" - }, - { - "value": "go", - "type": "string" - }, - { - "value": "next", - "type": "string" - }, - { - "value": "previous", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "send", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "inputmode", - "type": "\"decimal\" | \"email\" | \"none\" | \"numeric\" | \"search\" | \"tel\" | \"text\" | \"url\" | undefined", - "mutable": false, - "attr": "inputmode", - "reflectToAttr": false, - "docs": "A hint to the browser for which keyboard to display.\nPossible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n`\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.", - "docsTags": [], - "values": [ - { - "value": "decimal", - "type": "string" - }, - { - "value": "email", - "type": "string" - }, - { - "value": "none", - "type": "string" - }, - { - "value": "numeric", - "type": "string" - }, - { - "value": "search", - "type": "string" - }, - { - "value": "tel", - "type": "string" - }, - { - "value": "text", - "type": "string" - }, - { - "value": "url", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "maxlength", - "type": "number | undefined", - "mutable": false, - "attr": "maxlength", - "reflectToAttr": false, - "docs": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "minlength", - "type": "number | undefined", - "mutable": false, - "attr": "minlength", - "reflectToAttr": false, - "docs": "If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "mode", - "type": "\"ios\" | \"md\"", - "mutable": false, - "attr": "mode", - "reflectToAttr": false, - "docs": "The mode determines which platform styles to use.", - "docsTags": [], - "values": [ - { - "value": "ios", - "type": "string" - }, - { - "value": "md", - "type": "string" - } - ], - "optional": true, - "required": false - }, - { - "name": "name", - "type": "string", - "mutable": false, - "attr": "name", - "reflectToAttr": false, - "docs": "The name of the control, which is submitted with the form data.", - "docsTags": [], - "default": "this.inputId", - "values": [ - { - "type": "string" - } - ], - "optional": false, - "required": false - }, - { - "name": "placeholder", - "type": "string | undefined", - "mutable": false, - "attr": "placeholder", - "reflectToAttr": false, - "docs": "Instructional text that shows before the input has a value.", - "docsTags": [], - "values": [ - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "readonly", - "type": "boolean", - "mutable": false, - "attr": "readonly", - "reflectToAttr": false, - "docs": "If `true`, the user cannot modify the value.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "required", - "type": "boolean", - "mutable": false, - "attr": "required", - "reflectToAttr": false, - "docs": "If `true`, the user must fill in a value before submitting a form.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "rows", - "type": "number | undefined", - "mutable": false, - "attr": "rows", - "reflectToAttr": false, - "docs": "The number of visible text lines for the control.", - "docsTags": [], - "values": [ - { - "type": "number" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "spellcheck", - "type": "boolean", - "mutable": false, - "attr": "spellcheck", - "reflectToAttr": false, - "docs": "If `true`, the element will have its spelling and grammar checked.", - "docsTags": [], - "default": "false", - "values": [ - { - "type": "boolean" - } - ], - "optional": false, - "required": false - }, - { - "name": "value", - "type": "null | string | undefined", - "mutable": true, - "attr": "value", - "reflectToAttr": false, - "docs": "The value of the textarea.", - "docsTags": [], - "default": "''", - "values": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - }, - { - "name": "wrap", - "type": "\"hard\" | \"off\" | \"soft\" | undefined", - "mutable": false, - "attr": "wrap", - "reflectToAttr": false, - "docs": "Indicates how the control wraps text.", - "docsTags": [], - "values": [ - { - "value": "hard", - "type": "string" - }, - { - "value": "off", - "type": "string" - }, - { - "value": "soft", - "type": "string" - }, - { - "type": "undefined" - } - ], - "optional": true, - "required": false - } - ], - "methods": [ - { - "name": "getInputElement", - "returns": { - "type": "Promise", - "docs": "" - }, - "signature": "getInputElement() => Promise", - "parameters": [], - "docs": "Returns the native `