Dropdown API Overview
Initialization
import { Dropdown } from "@svar-ui/react-core";
export function Example() {
return (
<Dropdown>
{/* a component to put inside a dropdown */}
<div>Dropdown content</div>
</Dropdown>
);
}
tip
Visit the Features Guide to learn more about the functionality of this layout element.
Dropdown Properties
| align | Optional. Defines how the dropdown is aligned horizontally relative to the input field |
| autoFit | Optional. Enables automatic position calculation for inline dropdowns |
| cancel | sets the function that closes a dropdown |
| css | Optional. Adds a custom CSS class to the dropdown |
| inline | Optional. Defines the rendering mode of the dropdown |
| position | Optional. Defines the position of a dropdown relative to the input |
| trackScroll | Optional. Defines whether the dropdown closes when its container is scrolled |
| width | Optional. Sets the width of a dropdown |
Dropdown Events
| cancel | Sets the function that closes a dropdown |