Skip to content

Commit

Permalink
docs(input): add start/end slot section back into v7 docs (#3509)
Browse files Browse the repository at this point in the history
* docs(input): add start/end slot section back into v7 docs

* fix demo imports
  • Loading branch information
averyjohnston authored Mar 12, 2024
1 parent e1711ba commit bfe4357
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/usage/v7/input/start-end-slots/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Input</title>
<link rel="stylesheet" href="../../../common.css" />
<script src="../../../common.js"></script>
<link rel="stylesheet" href="../../common.css" />
<script src="../../common.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core@7/dist/ionic/ionic.esm.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core@7/css/ionic.bundle.css" />
</head>
Expand Down
16 changes: 16 additions & 0 deletions versioned_docs/version-v7/api/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,22 @@ Please submit bug reports with Maskito to the [Maskito Github repository](https:

:::

## Start and End Slots (experimental)

The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the input.

Note that this feature is considered experimental because it relies on a simulated version of [Web Component slots](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots). As a result, the simulated behavior may not exactly match the native slot behavior.

:::note
In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.

If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to.
:::

import StartEndSlots from '@site/static/usage/v7/input/start-end-slots/index.md';

<StartEndSlots />

## Theming

### Colors
Expand Down

0 comments on commit bfe4357

Please sign in to comment.