ਸਹੀ ਕੰਪੋਨੈਂਟ ਸਮਝੌਤਾ ਲੱਭੋ

ਭਾਗ ਲੱਭੋ। ਉਸ ਦਾ ਸਹੀ API ਪੜ੍ਹੋ।

ਜਨਤਕ ਸੂਚੀ, ਬਣਤਰ ਵਾਲਾ API ਇੰਡੈਕਸ, ਵੱਖਰੇ ਹਵਾਲੇ ਅਤੇ MCP ਖੋਜ ਕੰਪੋਨੈਂਟ ਦੇ ਗੁਣ, ਘਟਨਾਵਾਂ, slots, ਨਿਰਭਰਤਾਵਾਂ ਅਤੇ ਮਾਈਗ੍ਰੇਸ਼ਨ ਰਾਹ ਦਿਖਾਉਂਦੇ ਹਨ। ਕੋਡਿੰਗ ਏਜੰਟ ਮਾਰਕਅੱਪ ਲਿਖਣ ਤੋਂ ਪਹਿਲਾਂ ਸਹੀ ਸੀਮਤ ਸਮਝੌਤਾ ਪੜ੍ਹ ਸਕਦੇ ਹਨ।

ਉਦਾਹਰਨ

ਕੰਪੋਨੈਂਟ ਲੱਭੋ, ਫਿਰ ਉਸ ਦਾ ਸਹੀ API ਪੜ੍ਹੋ।

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);
}

ਕੰਪੋਨੈਂਟ ਵੇਖੋ · ਗਾਈਡ ਪੜ੍ਹੋ (ਅੰਗਰੇਜ਼ੀ ਵਿੱਚ)