Skip to main content

css

Description

Optional. Adds a custom CSS class to the dropdown

Usage

css?: string;

Example

import { Dropdown, Calendar } from "@svar-ui/react-core";
import "./MyDropdown.css";

function MyDropdown({ popup }) {
return (
<>
{popup && (
<Dropdown css="my-dropdown">
<Calendar value={new Date(2023, 2, 15)} />
</Dropdown>
)}
</>
);
}

export default MyDropdown;
/* MyDropdown.css */
.my-dropdown {
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

Related article: Styling Dropdown