UNPKG

@neynar/ui

Version:

React UI component library built on shadcn/ui and Tailwind CSS

51 lines (40 loc) 1.04 kB
# DialogTrigger **Type**: component DialogTrigger - The element that opens the dialog when clicked Typically wraps a button or other interactive element. Use asChild prop to render as the child element instead of a button. The trigger automatically receives focus management and ARIA attributes. ## JSX Usage ```jsx import { DialogTrigger } from '@neynar/ui'; <DialogTrigger asChild={true} className="value" > {/* Your content here */} </DialogTrigger> ``` ## Component Props ### asChild - **Type**: `boolean` - **Required**: No - **Description**: No description available ### className - **Type**: `string` - **Required**: No - **Description**: No description available ### children - **Type**: `React.ReactNode` - **Required**: No - **Description**: No description available ## Examples ### Example 1 ```tsx <DialogTrigger asChild> <Button>Open Dialog</Button> </DialogTrigger> ``` ### Example 2 ```tsx // Direct button without asChild <DialogTrigger className="custom-trigger-style"> Click to open </DialogTrigger> ```