Skip to main content

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.

alignOptional. Defines how the dropdown is aligned horizontally relative to the input field
autoFitOptional. Enables automatic position calculation for inline dropdowns
cancelsets the function that closes a dropdown
cssOptional. Adds a custom CSS class to the dropdown
inlineOptional. Defines the rendering mode of the dropdown
positionOptional. Defines the position of a dropdown relative to the input
trackScrollOptional. Defines whether the dropdown closes when its container is scrolled
widthOptional. Sets the width of a dropdown
cancelSets the function that closes a dropdown