> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trydailybread.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Recipes

> Scale recipes, track costs, and produce consistent results

export const MediaToggle = ({mobile, desktop, isVideo = false, alt = ''}) => {
  const [view, setView] = useState(typeof window !== 'undefined' && window.innerWidth >= 640 ? 'desktop' : 'mobile');
  useEffect(() => {
    function handleResize() {
      setView(window.innerWidth >= 640 ? 'desktop' : 'mobile');
    }
    window.addEventListener('resize', handleResize);
    return () => {
      window.removeEventListener('resize', handleResize);
    };
  }, []);
  const buttonBaseClasses = "rounded-xl flex items-center px-3 text-gray-700 dark:text-gray-300 py-1.5 border border-gray-200 dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5";
  const iconClasses = "inline-flex items-center h-5 w-5";
  const videoClasses = "rounded-lg border border-gray-200";
  return <div className="mt-6">
      <div className="flex mb-4">
        <button onClick={() => setView('mobile')} className={`${buttonBaseClasses} ${view === 'mobile' ? 'hidden' : ''}`}>
          <span className={`${iconClasses}`}>
            <Icon icon="mobile" iconType="solid" />
          </span>
          <span className="text-sm">Show mobile example</span>
        </button>
        <button onClick={() => setView('desktop')} className={`${buttonBaseClasses} ${view === 'desktop' ? 'hidden' : ''}`}>
          <span className={`${iconClasses} mr-1`}>
              <Icon icon="desktop" iconType="solid" />
          </span>
          <span className="text-sm">Show desktop example</span>
        </button>
      </div>
      {isVideo ? <div>
          <div className={`flex justify-center ${view === 'desktop' ? 'hidden' : ''}`}>
            <video autoPlay muted loop playsInline className={`mobile-video mint-max-h-[32rem] rounded-lg m-0 ${videoClasses}`} src={mobile} preload="none"></video>
          </div>
          <div className={`${videoClasses} ${view === 'mobile' ? 'hidden' : ''}`}>
            <video autoPlay muted loop playsInline className="desktop-video rounded-lg m-0 max-h-[32rem]" src={desktop} preload="none"></video>
          </div>
      </div> : <img src={view === 'mobile' ? mobile : desktop} alt={alt} className="w-auto rounded-lg border border-gray-200 max-h-[32rem] object-cover m-auto" />}
    </div>;
};

## Viewing Recipes

All of your recipes are stored in the "Recipes" page. You can view all of your recipes, and you can filter them by category and change the published
state. You can also search for recipes by name or description. This is a great way to find recipes that you want to use, or to find recipes that
you want to edit.

<MediaToggle mobile="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/recipe-nav-side-highlight-mobile.mp4" desktop="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/recipe-nav-side-highlight.mp4" alt="clicking the view recipes menu button" isVideo={true} />

Click on any of the recipes in this list to see the edit page if you have access.  If you do not, you will be taken to the view recipe page.

### Ingredient Checklist

When following a recipe, you can cross off the ingredients as you go. This is a great way to keep track of what you've done, and to make sure that you
don't miss any steps.

<MediaToggle mobile="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/ingredient-checklist-mobile.mp4" desktop="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/ingredient-checklist.mp4" alt="crossing off ingredients" isVideo={true} />

### Scaling Recipes

To scale a recipe, you can use the "Scale" buttons on the top-left of the recipe page. This will allow you to change the yield of the recipe, and
it will automatically adjust the ingredient amounts for you.

By default, you can scale the recipe by 2 or 3. If you need to scale it by a different amount, you can use the "Custom" button. Clicking this button
will show a new input.  Typing in a number will scale the recipe by that amount.

<MediaToggle mobile="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/recipe-scaling-mobile.mp4" desktop="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/recipe-scaling.mp4" alt="scaling a recipe" isVideo={true} />

#### Scaling tooltips

When you hover over the "info" icon next to a scaled ingredient, it will tell you the original quantity of that item for a given recipe. This ensures
you can keep the original context in mind when scaling recipes up or down.

<img src="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/images/recipes/recipe-scale-tooltip.png" className="w-auto rounded-lg border border-gray-200 max-h-[32rem] object-cover m-auto sm:m-0" alt="Recipe scale tooltip" />

[Step-ingredients](/recipes/managing-recipes#adding-ingredients-to-steps) will also be scaled, and have the same tooltip as recipe ingredients.

### Highlighting Steps

When following a recipe, you can highlight the steps as you go. This is a great way to keep track of what you've done, and to make sure that you
don't miss any steps.

<MediaToggle mobile="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/highlight-recipe-steps-mobile.mp4" desktop="https://dailybread.nyc3.cdn.digitaloceanspaces.com/production/public/docs/videos/recipes/highlight-recipe-steps.mp4" alt="highlighting recipe steps" isVideo={true} />
