Search Component Types (search/types.ts)

vant · packages/vant/src/search/types.ts · typescript · MIT
ui, search, lang:typescript, fw:vue

TypeScript definitions for Vant's Search component, including shape options, exposed focus/blur methods, instance typing, and theme variable keys for styling.

// Source: https://github.com/youzan/vant | License: MIT | Copyright Youzan
// Provided via justclaw.it.com; keep this notice with the code.
import type { ComponentPublicInstance } from 'vue';
import type { SearchProps } from './Search';

export type SearchShape = 'square' | 'round';

export type SearchExpose = {
  focus: () => void;
  blur: () => void;
};

export type SearchInstance = ComponentPublicInstance<SearchProps, SearchExpose>;

export type SearchThemeVars = {
  searchPadding?: string;
  searchBackground?: string;
  searchContentBackground?: string;
  searchInputHeight?: string;
  searchLabelPadding?: string;
  searchLabelColor?: string;
  searchLabelFontSize?: string;
  searchLeftIconColor?: string;
  searchActionPadding?: string;
  searchActionTextColor?: string;
  searchActionF

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key