dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
33 lines • 1.29 kB
TypeScript
import { VariantProps } from 'class-variance-authority';
import * as React from 'react';
/**
* Input style variants using CVA.
* @property {'default'|'failure'} variant - Visual state of the input.
* @example
* ```tsx
* <Input variant="default" />
* <Input variant="failure" />
* ```
*/
declare const inputVariants: (props?: ({
variant?: "default" | "failure" | null | undefined;
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
/**
* Props for the Input component.
* @property {string} [className] - Additional CSS classes for the input.
* @property {string} [type='text'] - The type of the input (e.g., 'text', 'password', 'email').
* @property {'default'|'failure'} [variant='default'] - Visual state of the input, mapping to `inputVariants`.
*/
export interface InputProps extends React.ComponentProps<'input'>, VariantProps<typeof inputVariants> {
}
/**
* Input - Text input with optional password visibility toggle.
* @returns {JSX.Element} The rendered Input component.
* @example
* ```tsx
* <Input placeholder="Enter your name" />
* ```
*/
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
export { Input, inputVariants };
//# sourceMappingURL=input.d.ts.map