vueless
Version:
Vue Styleless UI Component Library, powered by Tailwind CSS.
63 lines (49 loc) • 992 B
text/typescript
import defaultConfig from "./config";
import type { ComponentConfig } from "../types";
export type Config = typeof defaultConfig;
export interface Props {
/**
* Label text.
*/
label?: string;
/**
* Set input id for label `for` attribute.
*/
for?: string;
/**
* Component id (used for ARIA attributes).
*/
id?: string;
/**
* Label description.
*/
description?: string;
/**
* Label error message, or `true` for error styling without showing message text.
*/
error?: string | boolean;
/**
* Label align.
*/
align?: "top" | "topInside" | "topWithDesc" | "left" | "right";
/**
* Label size.
*/
size?: "sm" | "md" | "lg";
/**
* Make label disabled.
*/
disabled?: boolean;
/**
* Centre label horizontally.
*/
centred?: boolean;
/**
* Component config object.
*/
config?: ComponentConfig<Config>;
/**
* Data-test attribute for automated testing.
*/
dataTest?: string | null;
}