diff --git a/docs/components/content/examples/SelectMenuExampleClearableCustomization.vue b/docs/components/content/examples/SelectMenuExampleClearableCustomization.vue new file mode 100644 index 00000000..a36b2996 --- /dev/null +++ b/docs/components/content/examples/SelectMenuExampleClearableCustomization.vue @@ -0,0 +1,105 @@ + + + diff --git a/docs/content/2.components/select-menu.md b/docs/content/2.components/select-menu.md index 859bc109..1b9bba4a 100644 --- a/docs/content/2.components/select-menu.md +++ b/docs/content/2.components/select-menu.md @@ -161,7 +161,7 @@ componentProps: :: ## Clearable -Use the `clearable` prop to enable the remove selected option. +The `clearable` prop allows users to easily remove their selected option(s) with a clear button. ::component-example --- @@ -171,6 +171,26 @@ componentProps: --- :: + +### Customization +#### Slot Props +The slot provides four key props: + +| Prop | Type | Description | +|------|------|-------------| +| `selected` | `Object` | The currently selected value/item in the component | +| `disabled` | `Boolean` | Whether the component is in a disabled state | +| `loading` | `Boolean` | Whether the component is in a loading state | +| `onClear` | `Function` | Callback function to clear the selected value when the clear button is clicked | + +::component-example +--- +component: 'select-menu-example-clearable-customization' +componentProps: + class: 'w-full lg:w-52' +--- +:: + ## Creatable Use the `creatable` prop to enable the creation of new options when the search doesn't return any results (only works with `searchable`).