Panggihan kontrak komponén anu pas

Téangan komponén. Baca API-na nu pas.

Katalog umum, indéks API terstruktur, rujukan nu dipisah, jeung pamilarian MCP muka properti, kajadian, slot, dependénsi, jeung pituduh migrasi komponén. Ku kituna agén pamrograman bisa mariksa kontrak nu husus saméméh nulis markup.

Conto

Téangan komponén, tuluy baca API-na anu pasti.

const origin = 'https://www.lyra-ui.com/api/v1/components';
const search = await fetch(origin + '/search?q=combobox');
if (!search.ok) throw new Error('Component search failed');
const { matches } = await search.json();
const tag = matches[0]?.tag;
if (tag) {
  const response = await fetch(origin + '/' + encodeURIComponent(tag));
  if (!response.ok) throw new Error('Component reference failed');
  const reference = await response.json();
  console.log(reference.markdown);
}

Jajah komponén · Baca pituduh (basa Inggris)